@quasar/quasar-ui-qcalendar
Advanced tools
Comparing version 1.5.3 to 1.5.4
/*! | ||
* @quasar/quasar-ui-qcalendar v1.5.3 | ||
* @quasar/quasar-ui-qcalendar v1.5.4 | ||
* (c) 2020 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
"use strict";var quasar=require("quasar"),version="1.5.3",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){var r=copyTimestamp(e);if(1===r.day||0===r.weekday)for(;!t.includes(r.weekday);)nextDay(r);return findWeekday(r,t[0],prevDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){var r=copyTimestamp(e);if(daysInMonth(r.year,r.month)===r.day||6===r.weekday)for(;!t.includes(r.weekday);)prevDay(r);return findWeekday(r,t[t.length-1],nextDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,r,n){var i=getDayIdentifier(e);void 0!==t&&(i<=getDayIdentifier(parsed(t))&&(e.disabled=!0));!0!==e.disabled&&void 0!==a&&(i>=getDayIdentifier(parsed(a))&&(e.disabled=!0));if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(r[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n){if(getDayIdentifier(parseTimestamp(n[o]+" 00:00"))===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);return quasar.date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return 1==(e%4==0^e%100==0^e%400==0)}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+(e.hasTime?" "+getTime(e):"")}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function moveRelativeDays(e,t,a,r){return void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]),relativeDays(e,t,a,r)}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s,o,d,l){void 0===s&&(s=[]),void 0===o&&(o=[]),void 0===d&&(d=42),void 0===l&&(l=0);var u=getDayIdentifier(t),h=[],c=copyTimestamp(e),y=0,m=y===u;if(u<getDayIdentifier(e))return h;for(;(!m||h.length<l)&&h.length<d&&(y=getDayIdentifier(c),!(m=m||y>u));)if(0!==r[c.weekday]){var p=copyTimestamp(c);updateFormatted(p),updateRelative(p,a),updateDisabled(p,n,i,s,o),h.push(p),c=relativeDays(c,nextDay)}else c=nextDay(c);return h}function createIntervalList(e,t,a,r,n){for(var i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){var n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),s=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=s}function isOverlappingDates(e,t,a,r){var n=getDayIdentifier(e),i=getDayIdentifier(t),s=getDayIdentifier(a),o=getDayIdentifier(r);return n>=s&&n<=o||i>=s&&i<=o||s>=n&&i>=o}function addToDate(e,t){var a,r=copyTimestamp(e);return __forEachObject(t,function(e,t){if(void 0!==r[t]){r[t]+=parseInt(e,10);var n=NORMALIZE_TYPES.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&__normalize(r,NORMALIZE_TYPES[a]),updateFormatted(r),r}var NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(e,t){Object.keys(e).forEach(function(a){return t(e[a],a)})}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){if(e.month>MONTH_MAX){var t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){var a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){var a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/DAYS_IN_WEEK)}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},beforeMount:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.1",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:function(){return[]}},hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},selectedDates:Array,miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},agenda:{leftColumnOptions:Array,rightColumnOptions:Array,columnOptionsId:String,columnOptionsLabel:String},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},bordered:Boolean,dark:Boolean}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:0,direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{arrayHasDate:function(e,t){return e&&e.length>0&&e.includes(t.date)},getRelativeClasses:function(e,t,a){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t,"q-selected-date":this.arrayHasDate(a,e)}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorHeader",n="backgroundHeader",i=this.getThemeColors([r,n]),s=this.setBothColors),e("div",s(i.get(r),i.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"}}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},l=s&&!0===s.current?this.color:void 0,u=convertToUnit(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),h=this.getThemeColors([a,r]),c=this.setBothColors),e("div",c(void 0!==l?l:h.get(a),h.get(r),{key:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?u:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,l=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),u=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,h=new Map,c=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),h=this.getThemeColors([r,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(r),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o,this.isMiniMode?void 0:this.selectedDates),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!u?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&u?this.__renderDayMonth(e,t):"",e("div",{staticClass:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(l):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},t,{miniMode:this.isMiniMode}),l=new Map,u=this.useDefaultTheme,h=this.isMiniMode&&this.selectedDates&&this.selectedDates.length>0&&this.selectedDates.includes(t.date),c=this.value===t.date;return!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),l=this.getThemeColors([a,r]),u=this.setBothColors),e(quasar.QBtn,u(void 0!==i?i:l.get(a),l.get(r),{staticClass:"q-calendar-weekly__day-label",class:[{"q-selected-date":h,"q-active-date":!0!==this.noActiveDate&&c}],props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:!0===t.disabled||!0===n},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[o?o(d):s])},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(n):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{computedWidth:function(){return 100/this.days.length}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=this.$scopedSlots["day-header-label"],i=this.getScopeForSlot(t),s=!0===t.current?this.color:void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",d(void 0!==s?s:o.get(a),o.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[n&&n(i)||this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=this.value===t.date,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),o=this.setBothColors),e(quasar.QBtn,o(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&i}],style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,i,s=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:l+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,i=convertToUnit(this.intervalHeight),s=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:i},s(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),s)])}},render:function(e){return e("div",{staticClass:"q-calendar-daily",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,i=!0===t.current?this.color:void 0,s=this.value===t.date,o={day:t,idx:a},d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),d=this.getThemeColors([r,n]),l=this.setBothColors),e(quasar.QBtn,l(void 0!==i?i:d.get(r),d.get(n),{staticClass:"q-calendar-scheduler__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&s}],style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return o})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,i=100/this.days.length,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],l=this.getScopeForSlot(a,r,t),u={height:s};return u=Object.assign(u,o(l)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:u,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(l):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,i=this.$scopedSlots["scheduler-resource"],s={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",l=this.getThemeColors([r,n]),u=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return s})},[i?i(s):e("div",u(l.get(r),l.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{staticClass:"q-calendar-scheduler",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],props:Object.assign({},props.agenda),computed:{computedColumnCount:function(){return this.days.length+(!0===this.leftColumnOptionsValid?this.leftColumnOptions.length:0)+(!0===this.rightColumnOptionsValid?this.rightColumnOptions.length:0)},computedWidth:function(){return 100/this.computedColumnCount},leftColumnOptionsValid:function(){return void 0!==this.leftColumnOptions&&Array.isArray(this.leftColumnOptions)},rightColumnOptionsValid:function(){return void 0!==this.rightColumnOptions&&Array.isArray(this.rightColumnOptions)}},methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},this.__renderHeadDays(e))},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)}),this.days.map(function(a){return t.__renderHeadDay(e,a)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)})]},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderColumnHead:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-header"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:{"q-column-day":!0,"q-calendar-daily__head-day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column",a))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column",a)}},on:this.getDefaultMouseEventHandlers(":column:head",function(e){return s})}),[!0!==this.noDefaultHeaderText&&this.__renderHeadColumn(e,t),i&&i(s)])},__renderHeadColumn:function(e,t){var a=this.$scopedSlots["column-header-label"],r=t,n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(n=this.getThemeColors([void 0,void 0]),i=this.setBothColors),e("div",i(n.get(void 0),n.get(void 0),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[a&&a(r),!a&&this.__renderHeadColumnLabel(e,void 0!==this.columnOptionsLabel?t[this.columnOptionsLabel]:t.label)])},__renderHeadColumnLabel:function(e,t){return e("span",{staticClass:"ellipsis"},t)},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)}),this.days.map(function(a,r){return t.__renderDay(e,a,r)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)})]},__renderColumn:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-body"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+"-body-"+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:{"q-column-day":!0,"q-calendar-daily__day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column")}},on:this.getDefaultMouseEventHandlers(":column",function(e){return s})}),[i&&i(s)])},__renderDay:function(e,t,a,r){var n,i,s,o=this,d=this.$scopedSlots["day-body"],l=Object.assign({},t),u=this.computedWidth,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),h=this.getThemeColors([i,s]),c=this.setBothColors),e("div",c(h.get(i),h.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),[d&&d(l)])}},render:function(e){return e("div",{staticClass:"q-calendar-agenda",class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},QCalendar={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler,props.agenda),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},beforeMount:function(){this.__checkChange()},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(){var e=this.renderProps,t=e.start,a=e.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&t.date===this.lastStart&&a.date===this.lastEnd||(this.lastStart=t.date,this.lastEnd=a.date,this.$emit("change",{start:t,end:a})),this.keyValue=getDayIdentifier(t)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":case"scheduler":relativeDays(t,r,s,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,i=a.maxDays,s=a.component;this.keyValue=getDayIdentifier(r);var o={staticClass:"q-calendar"+(!0===this.dark?" q-calendar--dark":""),class:{"q-calendar-daily__bordered":this.bordered},key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,moveRelativeDays:moveRelativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};module.exports=Plugin; | ||
"use strict";var quasar=require("quasar"),version="1.5.4",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){var r=copyTimestamp(e);if(1===r.day||0===r.weekday)for(;!t.includes(r.weekday);)nextDay(r);return findWeekday(r,t[0],prevDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){var r=copyTimestamp(e);if(daysInMonth(r.year,r.month)===r.day||6===r.weekday)for(;!t.includes(r.weekday);)prevDay(r);return findWeekday(r,t[t.length-1],nextDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,r,n){var i=getDayIdentifier(e);void 0!==t&&(i<=getDayIdentifier(parsed(t))&&(e.disabled=!0));!0!==e.disabled&&void 0!==a&&(i>=getDayIdentifier(parsed(a))&&(e.disabled=!0));if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(r[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n){if(getDayIdentifier(parseTimestamp(n[o]+" 00:00"))===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);return quasar.date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return 1==(e%4==0^e%100==0^e%400==0)}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+(e.hasTime?" "+getTime(e):"")}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function moveRelativeDays(e,t,a,r){return void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]),relativeDays(e,t,a,r)}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s,o,d,l){void 0===s&&(s=[]),void 0===o&&(o=[]),void 0===d&&(d=42),void 0===l&&(l=0);var u=getDayIdentifier(t),h=[],c=copyTimestamp(e),y=0,m=y===u;if(u<getDayIdentifier(e))return h;for(;(!m||h.length<l)&&h.length<d&&(y=getDayIdentifier(c),!(m=m||y>u));)if(0!==r[c.weekday]){var p=copyTimestamp(c);updateFormatted(p),updateRelative(p,a),updateDisabled(p,n,i,s,o),h.push(p),c=relativeDays(c,nextDay)}else c=nextDay(c);return h}function createIntervalList(e,t,a,r,n){for(var i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){var n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),s=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=s}function isOverlappingDates(e,t,a,r){var n=getDayIdentifier(e),i=getDayIdentifier(t),s=getDayIdentifier(a),o=getDayIdentifier(r);return n>=s&&n<=o||i>=s&&i<=o||s>=n&&i>=o}function addToDate(e,t){var a,r=copyTimestamp(e);return __forEachObject(t,function(e,t){if(void 0!==r[t]){r[t]+=parseInt(e,10);var n=NORMALIZE_TYPES.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&__normalize(r,NORMALIZE_TYPES[a]),updateFormatted(r),r}var NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(e,t){Object.keys(e).forEach(function(a){return t(e[a],a)})}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){if(e.month>MONTH_MAX){var t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){var a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){var a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/DAYS_IN_WEEK)}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},beforeMount:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.1",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:function(){return[]}},hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},selectedDates:Array,miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},agenda:{leftColumnOptions:Array,rightColumnOptions:Array,columnOptionsId:String,columnOptionsLabel:String},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},bordered:Boolean,dark:Boolean}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:0,direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{arrayHasDate:function(e,t){return e&&e.length>0&&e.includes(t.date)},getRelativeClasses:function(e,t,a){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t,"q-selected-date":this.arrayHasDate(a,e)}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorHeader",n="backgroundHeader",i=this.getThemeColors([r,n]),s=this.setBothColors),e("div",s(i.get(r),i.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"}}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:(this.isMiniMode,"auto")}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},l=s&&!0===s.current?this.color:void 0,u=convertToUnit(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),h=this.getThemeColors([a,r]),c=this.setBothColors),e("div",c(void 0!==l?l:h.get(a),h.get(r),{key:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?u:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,l=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),u=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,h=new Map,c=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),h=this.getThemeColors([r,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(r),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o,this.isMiniMode?void 0:this.selectedDates),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!u?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&u?this.__renderDayMonth(e,t):"",e("div",{staticClass:"q-calendar-weekly__day--content full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(l):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},t,{miniMode:this.isMiniMode}),l=new Map,u=this.useDefaultTheme,h=this.isMiniMode&&this.selectedDates&&this.selectedDates.length>0&&this.selectedDates.includes(t.date),c=this.value===t.date;return!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),l=this.getThemeColors([a,r]),u=this.setBothColors),e(quasar.QBtn,u(void 0!==i?i:l.get(a),l.get(r),{staticClass:"q-calendar-weekly__day-label",class:[{"q-selected-date":h,"q-active-date":!0!==this.noActiveDate&&c}],props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:!0===t.disabled||!0===n},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[o?o(d):s])},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(n):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{computedWidth:function(){return 100/this.days.length}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=this.$scopedSlots["day-header-label"],i=this.getScopeForSlot(t),s=!0===t.current?this.color:void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",d(void 0!==s?s:o.get(a),o.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[n&&n(i)||this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=this.value===t.date,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),o=this.setBothColors),e(quasar.QBtn,o(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&i}],style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,i,s=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:l+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,i=convertToUnit(this.intervalHeight),s=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:i},s(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),s)])}},render:function(e){return e("div",{staticClass:"q-calendar-daily",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,i=!0===t.current?this.color:void 0,s=this.value===t.date,o={day:t,idx:a},d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),d=this.getThemeColors([r,n]),l=this.setBothColors),e(quasar.QBtn,l(void 0!==i?i:d.get(r),d.get(n),{staticClass:"q-calendar-scheduler__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&s}],style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return o})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,i=100/this.days.length,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],l=this.getScopeForSlot(a,r,t),u={height:s};return u=Object.assign(u,o(l)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:u,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(l):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,i=this.$scopedSlots["scheduler-resource"],s={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",l=this.getThemeColors([r,n]),u=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return s})},[i?i(s):e("div",u(l.get(r),l.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{staticClass:"q-calendar-scheduler",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],props:Object.assign({},props.agenda),computed:{computedColumnCount:function(){return this.days.length+(!0===this.leftColumnOptionsValid?this.leftColumnOptions.length:0)+(!0===this.rightColumnOptionsValid?this.rightColumnOptions.length:0)},computedWidth:function(){return 100/this.computedColumnCount},leftColumnOptionsValid:function(){return void 0!==this.leftColumnOptions&&Array.isArray(this.leftColumnOptions)},rightColumnOptionsValid:function(){return void 0!==this.rightColumnOptions&&Array.isArray(this.rightColumnOptions)}},methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},this.__renderHeadDays(e))},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)}),this.days.map(function(a){return t.__renderHeadDay(e,a)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)})]},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderColumnHead:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-header"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:{"q-column-day":!0,"q-calendar-daily__head-day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column",a))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column",a)}},on:this.getDefaultMouseEventHandlers(":column:head",function(e){return s})}),[!0!==this.noDefaultHeaderText&&this.__renderHeadColumn(e,t),i&&i(s)])},__renderHeadColumn:function(e,t){var a=this.$scopedSlots["column-header-label"],r=t,n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(n=this.getThemeColors([void 0,void 0]),i=this.setBothColors),e("div",i(n.get(void 0),n.get(void 0),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[a&&a(r),!a&&this.__renderHeadColumnLabel(e,void 0!==this.columnOptionsLabel?t[this.columnOptionsLabel]:t.label)])},__renderHeadColumnLabel:function(e,t){return e("span",{staticClass:"ellipsis"},t)},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)}),this.days.map(function(a,r){return t.__renderDay(e,a,r)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)})]},__renderColumn:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-body"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+"-body-"+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:{"q-column-day":!0,"q-calendar-daily__day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column")}},on:this.getDefaultMouseEventHandlers(":column",function(e){return s})}),[i&&i(s)])},__renderDay:function(e,t,a,r){var n,i,s,o=this,d=this.$scopedSlots["day-body"],l=Object.assign({},t),u=this.computedWidth,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),h=this.getThemeColors([i,s]),c=this.setBothColors),e("div",c(h.get(i),h.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),[d&&d(l)])}},render:function(e){return e("div",{staticClass:"q-calendar-agenda",class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},QCalendar={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler,props.agenda),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},beforeMount:function(){this.__checkChange()},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(){var e=this.renderProps,t=e.start,a=e.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&t.date===this.lastStart&&a.date===this.lastEnd||(this.lastStart=t.date,this.lastEnd=a.date,this.$emit("change",{start:t,end:a})),this.keyValue=getDayIdentifier(t)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":case"scheduler":relativeDays(t,r,s,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,i=a.maxDays,s=a.component;this.keyValue=getDayIdentifier(r);var o={staticClass:"q-calendar"+(!0===this.dark?" q-calendar--dark":""),class:{"q-calendar-daily__bordered":this.bordered},key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,moveRelativeDays:moveRelativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};module.exports=Plugin; |
/*! | ||
* @quasar/quasar-ui-qcalendar v1.5.3 | ||
* @quasar/quasar-ui-qcalendar v1.5.4 | ||
* (c) 2020 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
import{date,QBtn}from"quasar";var version="1.5.3",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){var r=copyTimestamp(e);if(1===r.day||0===r.weekday)for(;!t.includes(r.weekday);)nextDay(r);return findWeekday(r,t[0],prevDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){var r=copyTimestamp(e);if(daysInMonth(r.year,r.month)===r.day||6===r.weekday)for(;!t.includes(r.weekday);)prevDay(r);return findWeekday(r,t[t.length-1],nextDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,r,n){var i=getDayIdentifier(e);void 0!==t&&(i<=getDayIdentifier(parsed(t))&&(e.disabled=!0));!0!==e.disabled&&void 0!==a&&(i>=getDayIdentifier(parsed(a))&&(e.disabled=!0));if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(r[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n){if(getDayIdentifier(parseTimestamp(n[o]+" 00:00"))===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);return date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return 1==(e%4==0^e%100==0^e%400==0)}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+(e.hasTime?" "+getTime(e):"")}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function moveRelativeDays(e,t,a,r){return void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]),relativeDays(e,t,a,r)}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s,o,d,l){void 0===s&&(s=[]),void 0===o&&(o=[]),void 0===d&&(d=42),void 0===l&&(l=0);var u=getDayIdentifier(t),h=[],c=copyTimestamp(e),y=0,m=y===u;if(u<getDayIdentifier(e))return h;for(;(!m||h.length<l)&&h.length<d&&(y=getDayIdentifier(c),!(m=m||y>u));)if(0!==r[c.weekday]){var p=copyTimestamp(c);updateFormatted(p),updateRelative(p,a),updateDisabled(p,n,i,s,o),h.push(p),c=relativeDays(c,nextDay)}else c=nextDay(c);return h}function createIntervalList(e,t,a,r,n){for(var i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){var n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),s=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=s}function isOverlappingDates(e,t,a,r){var n=getDayIdentifier(e),i=getDayIdentifier(t),s=getDayIdentifier(a),o=getDayIdentifier(r);return n>=s&&n<=o||i>=s&&i<=o||s>=n&&i>=o}function addToDate(e,t){var a,r=copyTimestamp(e);return __forEachObject(t,function(e,t){if(void 0!==r[t]){r[t]+=parseInt(e,10);var n=NORMALIZE_TYPES.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&__normalize(r,NORMALIZE_TYPES[a]),updateFormatted(r),r}var NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(e,t){Object.keys(e).forEach(function(a){return t(e[a],a)})}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){if(e.month>MONTH_MAX){var t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){var a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){var a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/DAYS_IN_WEEK)}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},beforeMount:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.1",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:function(){return[]}},hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},selectedDates:Array,miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},agenda:{leftColumnOptions:Array,rightColumnOptions:Array,columnOptionsId:String,columnOptionsLabel:String},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},bordered:Boolean,dark:Boolean}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:0,direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{arrayHasDate:function(e,t){return e&&e.length>0&&e.includes(t.date)},getRelativeClasses:function(e,t,a){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t,"q-selected-date":this.arrayHasDate(a,e)}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorHeader",n="backgroundHeader",i=this.getThemeColors([r,n]),s=this.setBothColors),e("div",s(i.get(r),i.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"}}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},l=s&&!0===s.current?this.color:void 0,u=convertToUnit(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),h=this.getThemeColors([a,r]),c=this.setBothColors),e("div",c(void 0!==l?l:h.get(a),h.get(r),{key:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?u:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,l=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),u=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,h=new Map,c=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),h=this.getThemeColors([r,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(r),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o,this.isMiniMode?void 0:this.selectedDates),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!u?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&u?this.__renderDayMonth(e,t):"",e("div",{staticClass:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(l):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},t,{miniMode:this.isMiniMode}),l=new Map,u=this.useDefaultTheme,h=this.isMiniMode&&this.selectedDates&&this.selectedDates.length>0&&this.selectedDates.includes(t.date),c=this.value===t.date;return!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),l=this.getThemeColors([a,r]),u=this.setBothColors),e(QBtn,u(void 0!==i?i:l.get(a),l.get(r),{staticClass:"q-calendar-weekly__day-label",class:[{"q-selected-date":h,"q-active-date":!0!==this.noActiveDate&&c}],props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:!0===t.disabled||!0===n},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[o?o(d):s])},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(n):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{computedWidth:function(){return 100/this.days.length}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=this.$scopedSlots["day-header-label"],i=this.getScopeForSlot(t),s=!0===t.current?this.color:void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",d(void 0!==s?s:o.get(a),o.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[n&&n(i)||this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=this.value===t.date,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),o=this.setBothColors),e(QBtn,o(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&i}],style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,i,s=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:l+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,i=convertToUnit(this.intervalHeight),s=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:i},s(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),s)])}},render:function(e){return e("div",{staticClass:"q-calendar-daily",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,i=!0===t.current?this.color:void 0,s=this.value===t.date,o={day:t,idx:a},d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),d=this.getThemeColors([r,n]),l=this.setBothColors),e(QBtn,l(void 0!==i?i:d.get(r),d.get(n),{staticClass:"q-calendar-scheduler__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&s}],style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return o})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,i=100/this.days.length,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],l=this.getScopeForSlot(a,r,t),u={height:s};return u=Object.assign(u,o(l)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:u,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(l):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,i=this.$scopedSlots["scheduler-resource"],s={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",l=this.getThemeColors([r,n]),u=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return s})},[i?i(s):e("div",u(l.get(r),l.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{staticClass:"q-calendar-scheduler",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],props:Object.assign({},props.agenda),computed:{computedColumnCount:function(){return this.days.length+(!0===this.leftColumnOptionsValid?this.leftColumnOptions.length:0)+(!0===this.rightColumnOptionsValid?this.rightColumnOptions.length:0)},computedWidth:function(){return 100/this.computedColumnCount},leftColumnOptionsValid:function(){return void 0!==this.leftColumnOptions&&Array.isArray(this.leftColumnOptions)},rightColumnOptionsValid:function(){return void 0!==this.rightColumnOptions&&Array.isArray(this.rightColumnOptions)}},methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},this.__renderHeadDays(e))},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)}),this.days.map(function(a){return t.__renderHeadDay(e,a)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)})]},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderColumnHead:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-header"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:{"q-column-day":!0,"q-calendar-daily__head-day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column",a))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column",a)}},on:this.getDefaultMouseEventHandlers(":column:head",function(e){return s})}),[!0!==this.noDefaultHeaderText&&this.__renderHeadColumn(e,t),i&&i(s)])},__renderHeadColumn:function(e,t){var a=this.$scopedSlots["column-header-label"],r=t,n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(n=this.getThemeColors([void 0,void 0]),i=this.setBothColors),e("div",i(n.get(void 0),n.get(void 0),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[a&&a(r),!a&&this.__renderHeadColumnLabel(e,void 0!==this.columnOptionsLabel?t[this.columnOptionsLabel]:t.label)])},__renderHeadColumnLabel:function(e,t){return e("span",{staticClass:"ellipsis"},t)},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)}),this.days.map(function(a,r){return t.__renderDay(e,a,r)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)})]},__renderColumn:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-body"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+"-body-"+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:{"q-column-day":!0,"q-calendar-daily__day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column")}},on:this.getDefaultMouseEventHandlers(":column",function(e){return s})}),[i&&i(s)])},__renderDay:function(e,t,a,r){var n,i,s,o=this,d=this.$scopedSlots["day-body"],l=Object.assign({},t),u=this.computedWidth,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),h=this.getThemeColors([i,s]),c=this.setBothColors),e("div",c(h.get(i),h.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),[d&&d(l)])}},render:function(e){return e("div",{staticClass:"q-calendar-agenda",class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},QCalendar={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler,props.agenda),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},beforeMount:function(){this.__checkChange()},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(){var e=this.renderProps,t=e.start,a=e.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&t.date===this.lastStart&&a.date===this.lastEnd||(this.lastStart=t.date,this.lastEnd=a.date,this.$emit("change",{start:t,end:a})),this.keyValue=getDayIdentifier(t)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":case"scheduler":relativeDays(t,r,s,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,i=a.maxDays,s=a.component;this.keyValue=getDayIdentifier(r);var o={staticClass:"q-calendar"+(!0===this.dark?" q-calendar--dark":""),class:{"q-calendar-daily__bordered":this.bordered},key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,moveRelativeDays:moveRelativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};export default Plugin;export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAYS_IN_WEEK,DAY_MIN,FIRST_HOUR,HOURS_IN_DAY,MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE,MINUTES_IN_HOUR,MONTH_MAX,MONTH_MIN,PARSE_REGEX,PARSE_TIME,QCalendar,TimeObject,Timestamp,addToDate,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getEndOfMonth,getEndOfWeek,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdaySkips,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,makeDate,makeDateTime,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; | ||
import{date,QBtn}from"quasar";var version="1.5.4",PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_TIME=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,DAYS_IN_MONTH=[0,31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP=[0,31,29,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_MIN=28,DAYS_IN_MONTH_MAX=31,MONTH_MAX=12,MONTH_MIN=1,DAY_MIN=1,DAYS_IN_WEEK=7,MINUTES_IN_HOUR=60,HOURS_IN_DAY=24,FIRST_HOUR=0,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,Timestamp={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},TimeObject={hour:0,minute:0};function getStartOfWeek(e,t,a){var r=copyTimestamp(e);if(1===r.day||0===r.weekday)for(;!t.includes(r.weekday);)nextDay(r);return findWeekday(r,t[0],prevDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getEndOfWeek(e,t,a){var r=copyTimestamp(e);if(daysInMonth(r.year,r.month)===r.day||6===r.weekday)for(;!t.includes(r.weekday);)prevDay(r);return findWeekday(r,t[t.length-1],nextDay),updateFormatted(r),a&&updateRelative(r,a,r.hasTime),r}function getStartOfMonth(e){var t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){var t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=PARSE_TIME.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){var t=PARSE_REGEX.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function parseTimestamp(e,t){var a=parsed(e);return null===a?null:(updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function getDayIdentifier(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function getTimeIdentifier(e){return 100*e.hour+e.minute}function diffTimestamp(e,t,a){var r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&n<r?0:n-r}function updateRelative(e,t,a){void 0===a&&(a=!1);var r=getDayIdentifier(t),n=getDayIdentifier(e),i=r===n;return e.hasTime&&a&&i&&(i=(r=getTimeIdentifier(t))===(n=getTimeIdentifier(e))),e.past=n<r,e.current=i,e.future=n>r,e}function updateMinutes(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/MINUTES_IN_HOUR),e.minute=t%MINUTES_IN_HOUR,e.time=getTime(e),a&&updateRelative(e,a,!0),e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateWorkWeek(e){return e.workweek=getWorkWeek(e),e}function updateDisabled(e,t,a,r,n){var i=getDayIdentifier(e);void 0!==t&&(i<=getDayIdentifier(parsed(t))&&(e.disabled=!0));!0!==e.disabled&&void 0!==a&&(i>=getDayIdentifier(parsed(a))&&(e.disabled=!0));if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(var s in r)if(r[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n){if(getDayIdentifier(parseTimestamp(n[o]+" 00:00"))===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.time=getTime(e),e.date=getDate(e),e.weekday=getWeekday(e),e.doy=getDayOfYear(e),e.workweek=getWorkWeek(e),e}function getDayOfYear(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function getWorkWeek(e){if(0!==e.year){var t=makeDate(e);return date.getWeekOfYear(t)}}function getWeekday(e){if(e.hasDay){var t=Math.floor,a=e.day,r=(e.month+9)%MONTH_MAX+1,n=t(e.year/100),i=e.year%100-(e.month<=2?1:0);return((a+t(2.6*r-.2)-2*n+i+t(i/4)+t(n/4))%7+7)%7}return e.weekday}function isLeapYear(e){return 1==(e%4==0^e%100==0^e%400==0)}function daysInMonth(e,t){return isLeapYear(e)?DAYS_IN_MONTH_LEAP[t]:DAYS_IN_MONTH[t]}function copyTimestamp(e){return Object.assign({},e)}function padNumber(e,t){for(var a=String(e);a.length<t;)a="0"+a;return a}function getDate(e){var t=padNumber(e.year,4)+"-"+padNumber(e.month,2);return e.hasDay&&(t+="-"+padNumber(e.day,2)),t}function getTime(e){return e.hasTime?padNumber(e.hour,2)+":"+padNumber(e.minute,2):""}function getDateTime(e){return getDate(e)+(e.hasTime?" "+getTime(e):"")}function nextDay(e){return++e.day,e.weekday=(e.weekday+1)%DAYS_IN_WEEK,e.day>DAYS_IN_MONTH_MIN&&e.day>daysInMonth(e.year,e.month)&&(e.day=DAY_MIN,++e.month,e.month>MONTH_MAX&&(e.month=MONTH_MIN,++e.year)),e}function prevDay(e){return e.day--,e.weekday=(e.weekday+6)%DAYS_IN_WEEK,e.day<DAY_MIN&&(e.month--,e.month<MONTH_MIN&&(e.year--,e.month=MONTH_MAX),e.day=daysInMonth(e.year,e.month)),e}function moveRelativeDays(e,t,a,r){return void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]),relativeDays(e,t,a,r)}function relativeDays(e,t,a,r){for(void 0===t&&(t=nextDay),void 0===a&&(a=1),void 0===r&&(r=[0,1,2,3,4,5,6]);--a>=0;)t(e),r.length<7&&!r.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a,r){for(void 0===a&&(a=nextDay),void 0===r&&(r=6);e.weekday!==t&&--r>=0;)a(e);return e}function getWeekdaySkips(e){for(var t=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0],r=0;r<e.length;++r)a[e[r]]=1;for(var n=0;n<DAYS_IN_WEEK;++n){for(var i=1,s=1;s<DAYS_IN_WEEK;++s){if(a[(n+s)%DAYS_IN_WEEK])break;++i}t[n]=a[n]*i}return t}function createDayList(e,t,a,r,n,i,s,o,d,l){void 0===s&&(s=[]),void 0===o&&(o=[]),void 0===d&&(d=42),void 0===l&&(l=0);var u=getDayIdentifier(t),h=[],c=copyTimestamp(e),y=0,m=y===u;if(u<getDayIdentifier(e))return h;for(;(!m||h.length<l)&&h.length<d&&(y=getDayIdentifier(c),!(m=m||y>u));)if(0!==r[c.weekday]){var p=copyTimestamp(c);updateFormatted(p),updateRelative(p,a),updateDisabled(p,n,i,s,o),h.push(p),c=relativeDays(c,nextDay)}else c=nextDay(c);return h}function createIntervalList(e,t,a,r,n){for(var i=[],s=0;s<r;++s){var o=(t+s)*a,d=copyTimestamp(e);i.push(updateMinutes(d,o,n))}return i}function createNativeLocaleFormatter(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(a,r){try{return new Intl.DateTimeFormat(e||void 0,t(a,r)).format(makeDateTime(a))}catch(e){return""}}}function makeDate(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function makeDateTime(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function validateNumber(e){return isFinite(parseInt(e,10))}function isBetweenDates(e,t,a,r){var n=getDayIdentifier(e)+(!0===r?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===r?getTimeIdentifier(t):0),s=getDayIdentifier(a)+(!0===r?getTimeIdentifier(a):0);return n>=i&&n<=s}function isOverlappingDates(e,t,a,r){var n=getDayIdentifier(e),i=getDayIdentifier(t),s=getDayIdentifier(a),o=getDayIdentifier(r);return n>=s&&n<=o||i>=s&&i<=o||s>=n&&i>=o}function addToDate(e,t){var a,r=copyTimestamp(e);return __forEachObject(t,function(e,t){if(void 0!==r[t]){r[t]+=parseInt(e,10);var n=NORMALIZE_TYPES.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&__normalize(r,NORMALIZE_TYPES[a]),updateFormatted(r),r}var NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(e,t){Object.keys(e).forEach(function(a){return t(e[a],a)})}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){var t=Math.floor(e.minute/MINUTES_IN_HOUR);e.minute-=t*MINUTES_IN_HOUR,e.hour+=t,__normalizeHour(e)}return e}function __normalizeHour(e){if(e.hour>=HOURS_IN_DAY||e.hour<0){var t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(e){__normalizeMonth(e);var t=daysInMonth(e.year,e.month);if(e.day>t){++e.month,e.month>MONTH_MAX&&__normalizeMonth(e);var a=e.day-t;t=daysInMonth(e.year,e.month);do{a>t&&(++e.month,e.month>MONTH_MAX&&__normalizeMonth(e),a-=t,t=daysInMonth(e.year,e.month))}while(a>t);e.day=a}else if(e.day<=0){var r=-1*e.day;--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month);do{r>t&&(r-=t,--e.month,e.month<=0&&__normalizeMonth(e),t=daysInMonth(e.year,e.month))}while(r>t);e.day=t-r}return e}function __normalizeMonth(e){if(e.month>MONTH_MAX){var t=Math.floor(e.month/MONTH_MAX);e.month=e.month%MONTH_MAX,e.year+=t}else e.month<MONTH_MIN&&(e.month+=MONTH_MAX,--e.year);return e}function __normalize(e,t){switch(t){case"minute":return __normalizeMinute(e);case"hour":return __normalizeHour(e);case"day":return __normalizeDay(e);case"month":return __normalizeMonth(e)}}function daysBetween(e,t){var a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){var a=copyTimestamp(e),r=copyTimestamp(t);return a=findWeekday(a,0),r=findWeekday(r,6),Math.ceil(daysBetween(a,r)/DAYS_IN_WEEK)}var Times={name:"Times",props:{now:{type:String,validator:function(e){return""===e||validateTimestamp(e)}}},data:function(){return{times:{now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}}},computed:{parsedNow:function(){return this.now?parseTimestamp(this.now):null}},watch:{parsedNow:"updateCurrent"},beforeMount:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return parseDate(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},Mouse={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var a;return this.getMouseEventHandlers(((a={})["click"+e]={event:"click"},a["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},a["mousedown"+e]={event:"mousedown"},a["mousemove"+e]={event:"mousemove"},a["mouseup"+e]={event:"mouseup"},a["mouseenter"+e]={event:"mouseenter"},a["mouseleave"+e]={event:"mouseleave"},a["touchstart"+e]={event:"touchstart"},a["touchmove"+e]={event:"touchmove"},a["touchend"+e]={event:"touchend"},a),t)},getMouseEventHandlers:function(e,t){var a=this,r={},n=function(n){var i=e[n];if(a.$listeners[n]){var s=(i.passive?"&":(i.once?"~":"")+(i.capture?"!":""))+i.event,o=function(e){var r=e;return(void 0===i.button||r.buttons>0&&r.button===i.button)&&(i.prevent&&e.preventDefault(),i.stop&&e.stopPropagation(),a.$emit(n,t(e))),i.result};s in r?Array.isArray(r[s])?r[s].push(o):r[s]=[r[s],o]:r[s]=o}};for(var i in e)n(i);return r}}},version$1="1.0.6",CSS_COLOR_NAMES=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],QColorizeMixin={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&CSS_COLOR_NAMES.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,a){return void 0===a&&(a={}),this.setTextColor(e,this.setBackgroundColor(t,a))},setBackgroundColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["bg-"+n]=!0,a))}return t},setTextColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+r,"caret-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["text-"+n]=!0,a))}return t},setBorderColor:function(e,t){var a;if(void 0===t&&(t={}),this.isValidCssColor(e)){var r=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+r})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((a={})["border-"+n]=!0,a))}return t}}};QColorizeMixin.version=version$1;var version$2="1.0.1",QThemeMixin={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,a){return void 0===a&&(a={}),a},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var a=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){a.set(e,t.theme[e])}),a}}};function validateView(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}QThemeMixin.version=version$2;var props={base:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:function(){return[]}},hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:validateNumber},intervalMinutes:{type:[Number,String],default:60,validator:validateNumber},intervalStart:{type:[Number,String],default:0,validator:validateNumber},intervalCount:{type:[Number,String],default:24,validator:validateNumber},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},weeks:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:validateNumber,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},selectedDates:Array,miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:validateNumber},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||validateNumber(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},agenda:{leftColumnOptions:Array,rightColumnOptions:Array,columnOptionsId:String,columnOptionsLabel:String},calendar:{view:{type:String,default:"month",validator:validateView},value:{type:String,validator:function(e){return""===e||validateTimestamp(e)}},bordered:Boolean,dark:Boolean}},CalendarBase={name:"CalendarBase",mixins:[QColorizeMixin,QThemeMixin,Mouse,Times],props:Object.assign({},props.base,{start:{type:String,validator:validateTimestamp,default:function(){return parseDate(new Date).date}},end:{type:String,validator:validateTimestamp,default:"0000-00-00"}}),data:function(){return{keyValue:0,direction:"next"}},computed:{weekdaySkips:function(){return getWeekdaySkips(this.weekdays)},parsedStart:function(){return parseTimestamp(this.start)},parsedEnd:function(){return parseTimestamp(this.end)},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(this.locale,function(t,a){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})}},methods:{arrayHasDate:function(e,t){return e&&e.length>0&&e.includes(t.date)},getRelativeClasses:function(e,t,a){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t,"q-selected-date":this.arrayHasDate(a,e)}},getStartOfWeek:function(e){return getStartOfWeek(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return getEndOfWeek(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function convertToUnit(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function indexOf(e,t){for(var a=0;a<e.length;a++)if(!0===t(e[a],a))return a;return-1}var QCalendarWeekly={name:"QCalendarWeekly",mixins:[CalendarBase],props:props.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return createDayList(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return createDayList(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(this.locale,function(a,r){return r?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=convertToUnit(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=getDayIdentifier(e);return t<getDayIdentifier(this.parsedStart)||t>getDayIdentifier(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,a,r=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",a="backgroundHeader",r=this.getThemeColors([t,a]),n=this.setBothColors),e("div",n(r.get(t),r.get(a),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(a,r){return t.__renderHeadDay(e,a,r)})},__renderHeadDay:function(e,t,a){var r,n,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorHeader",n="backgroundHeader",i=this.getThemeColors([r,n]),s=this.setBothColors),e("div",s(i.get(r),i.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"}}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,a){var r=this.weekdayFormatter(t,a);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?r.charAt(0):r)},__renderWeeks:function(e){for(var t=this.days,a=this.weekdays.length,r=[],n=0;n<t.length;n+=a)r.push(this.__renderWeek(e,t.slice(n,n+a)));return r},__renderWeek:function(e,t){var a=this,r=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},i=convertToUnit(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?i:(this.isMiniMode,"auto")}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return a.__renderDay(e,t)})),void 0!==r?e("div",{staticClass:"q-calendar-weekly__week-events"},r(n)):""])])},__renderWorkWeekGutter:function(e,t){var a,r,n=this.$scopedSlots.workweek,i=t.length>2?t[2]:t[0],s=this.isCurrentWeek(t).timestamp,o=Number(i.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},l=s&&!0===s.current?this.color:void 0,u=convertToUnit(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(s&&!0===s.current||!0===i.current?(a="colorWorkWeekCurrent",r="backgroundWorkWeekCurrent"):s&&!0===s.past||!0===i.past?(a="colorWorkWeekPast",r="backgroundWorkWeekPast"):(s&&!0===s.future||!0===i.future)&&(a="colorWorkWeekFuture",r="backgroundWorkWeekFuture"),h=this.getThemeColors([a,r]),c=this.setBothColors),e("div",c(void 0!==l?l:h.get(a),h.get(r),{key:i.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==s?s:i,!1),style:{height:this.dayHeight&&this.dayHeight>0?u:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var a,r,n,i=this,s=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,l=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),u=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,h=new Map,c=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(r="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),h=this.getThemeColors([r,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),s(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(r),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o,this.isMiniMode?void 0:this.selectedDates),{"q-calendar-weekly__day--droppable":a})],style:y,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!u?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&u?this.__renderDayMonth(e,t):"",e("div",{staticClass:"q-calendar-weekly__day--content full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(l):"")])},__renderDayLabel:function(e,t){var a,r,n=this.isOutside(t),i=!0===t.current?this.color:void 0,s=this.dayFormatter(t,!1),o=this.$scopedSlots["day-label"],d=Object.assign({},{dayLabel:s},t,{miniMode:this.isMiniMode}),l=new Map,u=this.useDefaultTheme,h=this.isMiniMode&&this.selectedDates&&this.selectedDates.length>0&&this.selectedDates.includes(t.date),c=this.value===t.date;return!0===this.enableTheme&&(!0===n?(a="colorDayLabelOutside",r="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),l=this.getThemeColors([a,r]),u=this.setBothColors),e(QBtn,u(void 0!==i?i:l.get(a),l.get(r),{staticClass:"q-calendar-weekly__day-label",class:[{"q-selected-date":h,"q-active-date":!0!==this.noActiveDate&&c}],props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:!0===t.disabled||!0===n},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[o?o(d):s])},__renderDayOfYearLabel:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),r?r(n):t.doy)},__renderDayMonth:function(e,t){var a=!0===t.current?this.color:void 0,r=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),i=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(a,{staticClass:"q-calendar-weekly__day-month"}),r?r(i):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}},QCalendarMonthly={name:"QCalendarMonthly",mixins:[QCalendarWeekly],computed:{parsedStart:function(){return getStartOfMonth(parseTimestamp(this.start))},parsedEnd:function(){return getEndOfMonth(parseTimestamp(this.end))}}},Resize={name:"resize",inserted:function(e,t){var a=t.value,r=t.options||{passive:!0};window.addEventListener("resize",a,r),e._onResize={callback:a,options:r},t.modifiers&&t.modifiers.quiet||a()},unbind:function(e){if(e._onResize){var t=e._onResize,a=t.callback,r=t.options;window.removeEventListener("resize",a,r),delete e._onResize}}},CalendarIntervals={name:"CalendarWithIntervals",mixins:[CalendarBase],props:Object.assign({},props.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,a=this.parsedIntervalMinutes,r=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return createIntervalList(e,t,a,r,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},a={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(this.locale,function(r,n){return n?0===r.minute?a:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var a=copyTimestamp(t),r=e.currentTarget.getBoundingClientRect(),n=this.startMinute,i=e,s=e,o=i.changedTouches||i.touches,d=((o&&o[0]?o[0].clientY:s.clientY)-r.top)/this.parsedIntervalHeight;return updateMinutes(a,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var a=copyTimestamp(e);return a.timeStartPos=this.timeStartPos,a.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(a.index=t),a},scrollToTime:function(e){var t=this.timeStartPos(e),a=this.$refs.scrollArea;return!(!1===t||!a)&&(a.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=parseTime(e);if(!1===a)return!1;var r=(a-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}},QCalendarDaily={name:"QCalendarDaily",mixins:[CalendarIntervals],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},computed:{computedWidth:function(){return 100/this.days.length}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,a,r=this.$scopedSlots["intervals-header"],n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",a="backgroundIntervalHeader",n=this.getThemeColors([t,a]),i=this.setBothColors),e("div",i(n.get(t),n.get(a),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,a),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=this.$scopedSlots["day-header-label"],i=this.getScopeForSlot(t),s=!0===t.current?this.color:void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",d(void 0!==s?s:o.get(a),o.get(r),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[n&&n(i)||this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=this.value===t.date,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),s=this.getThemeColors([a,r]),o=this.setBothColors),e(QBtn,o(void 0!==n?n:s.get(a),s.get(r),{staticClass:"q-calendar-daily__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&i}],style:{color:!0===t.current?n:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-daily__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a,r){var n,i,s=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,r),l=this.computedWidth,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",i="backgroundBodyFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:l+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,t),r)})}),this.__renderDayIntervals(e,a,r).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,a){var r=this;return this.intervals[t].map(function(t){return r.__renderDayInterval(e,t,a)})},__renderDayInterval:function(e,t,a){var r,n=this,i=convertToUnit(this.intervalHeight),s=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,a);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":r},style:Object.assign({},{height:i},s(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,a,r=this,n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",a="backgroundIntervalBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return r.getTimestampAtEvent(e,r.parsedStart)})};return e("div",i(n.get(t),n.get(a),s),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(a){return t.__renderIntervalLabel(e,a)})},__renderIntervalLabel:function(e,t){var a,r,n=convertToUnit(this.intervalHeight),i=this.shortIntervalLabel,s=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,i):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorIntervalText",r="backgroundIntervalText",o=this.getThemeColors([a,r]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(a),o.get(r),{staticClass:"q-calendar-daily__interval-text"}),s)])}},render:function(e){return e("div",{staticClass:"q-calendar-daily",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},CalendarScheduler={name:"CalendarWithScheduler",mixins:[CalendarBase],props:Object.assign({},props.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return createDayList(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return updateRelative(copyTimestamp(t),this.times.now,!1)},getScopeForSlot:function(e,t,a){var r={};return r.day=copyTimestamp(e),void 0!==t&&(r.index=t),void 0!==a&&(r.resource=a),r}}},QCalendarScheduler={name:"QCalendarScheduler",mixins:[CalendarScheduler],directives:{Resize:Resize},data:function(){return{scrollWidth:0}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var a=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,a,r=this.$scopedSlots["scheduler-resources-header"],n=convertToUnit(this.resourceWidth),i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",a="backgroundSchedulerHeader",i=this.getThemeColors([t,a]),s=this.setBothColors),e("div",s(i.get(t),i.get(a),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[r&&r(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)}):this.days.map(function(a){return t.__renderHeadDay(e,a)})},__renderHeadDay:function(e,t,a){var r,n,i,s=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,a),l=100/this.days.length,u=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",i="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",i="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",i="backgroundHeaderFuture"),u=this.getThemeColors([n,i]),h=this.setBothColors),e("div",h(u.get(n),u.get(i),{key:t.date+(void 0!==a?"-"+a:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":r}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day",a)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,a),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,a),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,a),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,a)])},__renderHeadWeekday:function(e,t){var a,r,n=!0===t.current?this.color:void 0,i=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",r="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",r="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",r="backgroundDayLabelFuture"),i=this.getThemeColors([a,r]),s=this.setBothColors),e("div",s(void 0!==n?n:i.get(a),i.get(r),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,a){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,a))},__renderHeadDayBtn:function(e,t,a){var r,n,i=!0===t.current?this.color:void 0,s=this.value===t.date,o={day:t,idx:a},d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",n="backgroundDayLabelFuture"),d=this.getThemeColors([r,n]),l=this.setBothColors),e(QBtn,l(void 0!==i?i:d.get(r),d.get(n),{staticClass:"q-calendar-scheduler__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&s}],style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return o})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[r&&r(n)])},__renderColumnHeaderAfter:function(e,t,a){var r=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=a,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[r&&r(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:convertToUnit(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)}):this.days.map(function(a,r){return t.__renderDay(e,a,r)})},__renderDay:function(e,t,a){var r,n,i=100/this.days.length,s=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(r="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(r="colorBodyFuture",n="backgroundBodyFuture"),s=this.getThemeColors([r,n]),o=this.setBothColors),e("div",o(s.get(r),s.get(n),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:i+"%"}}),[].concat(this.__renderDayResources(e,t,a)))},__renderDayResources:function(e,t,a){var r=this;return this.resources.map(function(n){return r.__renderDayResource(e,n,t,a)})},__renderDayResource:function(e,t,a,r){var n,i=this,s=convertToUnit(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],l=this.getScopeForSlot(a,r,t),u={height:s};return u=Object.assign(u,o(l)),e("div",{key:t[this.resourceKey]+"-"+r,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:u,domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(n=i.dragOverFunc(e,t,"resource",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"resource",r)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,a),r,t)})},d?d(l):void 0)},__renderBodyResources:function(e){var t,a,r=convertToUnit(this.resourceWidth),n=new Map,i=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",a="backgroundSchedulerBody",n=this.getThemeColors([t,a]),i=this.setBothColors);var s={staticClass:"q-calendar-scheduler__resources-body",style:{width:r}};return e("div",i(n.get(t),n.get(a),s),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(a,r){return t.__renderResourceLabel(e,a,r)})},__renderResourceLabel:function(e,t,a){var r,n,i=this.$scopedSlots["scheduler-resource"],s={resource:t,index:a},o=convertToUnit(this.resourceHeight),d=t.label,l=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorSchedulerText",n="backgroundSchedulerText",l=this.getThemeColors([r,n]),u=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return s})},[i?i(s):e("div",u(l.get(r),l.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{staticClass:"q-calendar-scheduler",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},QCalendarAgenda={name:"QCalendarAgenda",mixins:[QCalendarDaily],props:Object.assign({},props.agenda),computed:{computedColumnCount:function(){return this.days.length+(!0===this.leftColumnOptionsValid?this.leftColumnOptions.length:0)+(!0===this.rightColumnOptionsValid?this.rightColumnOptions.length:0)},computedWidth:function(){return 100/this.computedColumnCount},leftColumnOptionsValid:function(){return void 0!==this.leftColumnOptions&&Array.isArray(this.leftColumnOptions)},rightColumnOptionsValid:function(){return void 0!==this.rightColumnOptions&&Array.isArray(this.rightColumnOptions)}},methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},this.__renderHeadDays(e))},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderHeadDay(e,t.days[0],a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)}),this.days.map(function(a){return t.__renderHeadDay(e,a)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumnHead(e,a,r)})]},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderColumnHead:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-header"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+(void 0!==a?"-"+a:""),staticClass:"q-calendar-daily__head-day",class:{"q-column-day":!0,"q-calendar-daily__head-day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column",a))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column",a)}},on:this.getDefaultMouseEventHandlers(":column:head",function(e){return s})}),[!0!==this.noDefaultHeaderText&&this.__renderHeadColumn(e,t),i&&i(s)])},__renderHeadColumn:function(e,t){var a=this.$scopedSlots["column-header-label"],r=t,n=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(n=this.getThemeColors([void 0,void 0]),i=this.setBothColors),e("div",i(n.get(void 0),n.get(void 0),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[a&&a(r),!a&&this.__renderHeadColumnLabel(e,void 0!==this.columnOptionsLabel?t[this.columnOptionsLabel]:t.label)])},__renderHeadColumnLabel:function(e,t){return e("span",{staticClass:"ellipsis"},t)},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,a){return a+parseInt(t.columnIndexStart,10)}).map(function(a){return t.__renderDay(e,t.days[0],0,a)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)}),this.days.map(function(a,r){return t.__renderDay(e,a,r)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(a,r){return t.__renderColumn(e,a,r)})]},__renderColumn:function(e,t,a){var r,n=this,i=this.$scopedSlots["column-body"],s=t,o=this.computedWidth,d=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),l=this.setBothColors),e("div",l(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+"-body-"+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:{"q-column-day":!0,"q-calendar-daily__day--droppable":r},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(r=n.dragOverFunc(e,t,"column"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column")}},on:this.getDefaultMouseEventHandlers(":column",function(e){return s})}),[i&&i(s)])},__renderDay:function(e,t,a,r){var n,i,s,o=this,d=this.$scopedSlots["day-body"],l=Object.assign({},t),u=this.computedWidth,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(i="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(i="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(i="colorBodyFuture",s="backgroundBodyFuture"),h=this.getThemeColors([i,s]),c=this.setBothColors),e("div",c(h.get(i),h.get(s),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),r)})}),[d&&d(l)])}},render:function(e){return e("div",{staticClass:"q-calendar-agenda",class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},QCalendar={name:"QCalendar",mixins:[CalendarBase],props:Object.assign({},props.calendar,props.weeks,props.intervals,props.scheduler,props.agenda),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return parseTimestamp(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",a=this.maxDays,r=e,n=e;switch(this.view){case"month":t=QCalendarMonthly,r=getStartOfMonth(e),n=getEndOfMonth(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=this.getStartOfWeek(e),n=this.getEndOfWeek(e),a=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=1,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=2,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=3,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=4,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=5,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,a=6,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,a,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?QCalendarScheduler:QCalendarAgenda,updateFormatted(n=relativeDays(copyTimestamp(n),nextDay,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?QCalendarAgenda:this.view.endsWith("-scheduler")?QCalendarScheduler:QCalendarDaily,r=getStartOfMonth(e),updateFormatted(n=getEndOfMonth(e)),a=DAYS_IN_MONTH_MAX}return{component:t,start:r,end:n,maxDays:a}}},beforeMount:function(){this.__checkChange()},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(){var e=this.renderProps,t=e.start,a=e.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&t.date===this.lastStart&&a.date===this.lastEnd||(this.lastStart=t.date,this.lastEnd=a.date,this.$emit("change",{start:t,end:a})),this.keyValue=getDayIdentifier(t)},move:function(e){void 0===e&&(e=1);var t=copyTimestamp(this.parsedValue),a=e>0,r=a?nextDay:prevDay,n=a?DAYS_IN_MONTH_MAX:DAY_MIN,i=a?e:-e;this.direction=a?"next":"prev";this.maxDays;for(var s=this.weekdaySkips.filter(function(e){return 0!==e}).length;--i>=0;)switch(this.view){case"month":t.day=n,r(t);break;case"week":case"week-scheduler":case"week-agenda":case"scheduler":relativeDays(t,r,s,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":relativeDays(t,r,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":relativeDays(t,r,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":relativeDays(t,r,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":relativeDays(t,r,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":relativeDays(t,r,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":relativeDays(t,r,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":relativeDays(t,r,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,r(t)}updateWeekday(t),updateFormatted(t),updateDayOfYear(t),updateRelative(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var a=this.$children[0];return!(!a||!a.timeStartPos)&&a.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,a){return e(t,a)}},render:function(e){var t=this,a=this.renderProps,r=a.start,n=a.end,i=a.maxDays,s=a.component;this.keyValue=getDayIdentifier(r);var o={staticClass:"q-calendar"+(!0===this.dark?" q-calendar--dark":""),class:{"q-calendar-daily__bordered":this.bordered},key:this.keyValue,props:Object.assign({},this.$props,{start:r.date,end:n.date,maxDays:i}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,s,o)]):this.__renderComponent(e,s,o)}},Plugin={version:version,QCalendar:QCalendar,PARSE_REGEX:PARSE_REGEX,PARSE_TIME:PARSE_TIME,DAYS_IN_MONTH:DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP:DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MIN:DAYS_IN_MONTH_MIN,DAYS_IN_MONTH_MAX:DAYS_IN_MONTH_MAX,MONTH_MAX:MONTH_MAX,MONTH_MIN:MONTH_MIN,DAY_MIN:DAY_MIN,DAYS_IN_WEEK:DAYS_IN_WEEK,MINUTES_IN_HOUR:MINUTES_IN_HOUR,HOURS_IN_DAY:HOURS_IN_DAY,FIRST_HOUR:FIRST_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE:MILLISECONDS_IN_MINUTE,Timestamp:Timestamp,TimeObject:TimeObject,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,diffTimestamp:diffTimestamp,updateRelative:updateRelative,updateMinutes:updateMinutes,updateWeekday:updateWeekday,updateDayOfYear:updateDayOfYear,updateWorkWeek:updateWorkWeek,updateDisabled:updateDisabled,updateFormatted:updateFormatted,getDayOfYear:getDayOfYear,getWorkWeek:getWorkWeek,getWeekday:getWeekday,isLeapYear:isLeapYear,daysInMonth:daysInMonth,copyTimestamp:copyTimestamp,padNumber:padNumber,getDate:getDate,getTime:getTime,getDateTime:getDateTime,nextDay:nextDay,prevDay:prevDay,relativeDays:relativeDays,moveRelativeDays:moveRelativeDays,findWeekday:findWeekday,getWeekdaySkips:getWeekdaySkips,createDayList:createDayList,createIntervalList:createIntervalList,createNativeLocaleFormatter:createNativeLocaleFormatter,makeDate:makeDate,makeDateTime:makeDateTime,validateNumber:validateNumber,isBetweenDates:isBetweenDates,isOverlappingDates:isOverlappingDates,daysBetween:daysBetween,weeksBetween:weeksBetween,addToDate:addToDate,convertToUnit:convertToUnit,indexOf:indexOf,install:function(e){e.component(QCalendar.name,QCalendar)}};export default Plugin;export{DAYS_IN_MONTH,DAYS_IN_MONTH_LEAP,DAYS_IN_MONTH_MAX,DAYS_IN_MONTH_MIN,DAYS_IN_WEEK,DAY_MIN,FIRST_HOUR,HOURS_IN_DAY,MILLISECONDS_IN_DAY,MILLISECONDS_IN_HOUR,MILLISECONDS_IN_MINUTE,MINUTES_IN_HOUR,MONTH_MAX,MONTH_MIN,PARSE_REGEX,PARSE_TIME,QCalendar,TimeObject,Timestamp,addToDate,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getEndOfMonth,getEndOfWeek,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdaySkips,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,makeDate,makeDateTime,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween}; |
/*! | ||
* @quasar/quasar-ui-qcalendar v1.5.3 | ||
* @quasar/quasar-ui-qcalendar v1.5.4 | ||
* (c) 2020 Jeff Galbraith <jeff@quasar.dev> | ||
* Released under the MIT License. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("quasar")):"function"==typeof define&&define.amd?define(["exports","vue","quasar"],t):t((e=e||self).QCalendar={},e.Vue,e.Quasar)}(this,function(e,t,r){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,n=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=[0,31,29,31,30,31,30,31,31,30,31,30,31],o=28,d=12,u=1,l=1,h=7,c=60,y=24,m=864e5,v={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},f={hour:0,minute:0};function p(e,t,r){var a=P(e);if(1===a.day||0===a.weekday)for(;!t.includes(a.weekday);)z(a);return X(a,t[0],V),x(a),r&&O(a,r,a.hasTime),a}function g(e,t,r){var a=P(e);if(R(a.year,a.month)===a.day||6===a.weekday)for(;!t.includes(a.weekday);)V(a);return X(a,t[t.length-1],z),x(a),r&&O(a,r,a.hasTime),a}function _(e){var t=P(e);return t.day=l,x(t),t}function b(e){var t=P(e);return t.day=R(t.year,t.month),x(t),t}function k(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=n.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function C(e){return!!a.exec(e)}function D(e){var t=a.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function w(e,t){var r=D(e);return null===r?null:(x(r),t&&O(r,t,r.hasTime),r)}function S(e){return x({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function T(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function H(e){return 100*e.hour+e.minute}function M(e,t,r){var a=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===r&&n<a?0:n-a}function O(e,t,r){void 0===r&&(r=!1);var a=T(t),n=T(e),s=a===n;return e.hasTime&&r&&s&&(s=(a=H(t))===(n=H(e))),e.past=n<a,e.current=s,e.future=n>a,e}function I(e,t,r){return e.hasTime=!0,e.hour=Math.floor(t/c),e.minute=t%c,e.time=Y(e),r&&O(e,r,!0),e}function W(e){return e.weekday=N(e),e}function B(e){return e.doy=q(e),e}function F(e){return e.workweek=A(e),e}function L(e,t,r,a,n){var s=T(e);void 0!==t&&(s<=T(D(t))&&(e.disabled=!0));!0!==e.disabled&&void 0!==r&&(s>=T(D(r))&&(e.disabled=!0));if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(var i in a)if(a[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n){if(T(w(n[o]+" 00:00"))===s){e.disabled=!0;break}}return e}function x(e){return e.time=Y(e),e.date=j(e),e.weekday=N(e),e.doy=q(e),e.workweek=A(e),e}function q(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function A(e){if(0!==e.year){var t=te(e);return r.date.getWeekOfYear(t)}}function N(e){if(e.hasDay){var t=Math.floor,r=e.day,a=(e.month+9)%d+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((r+t(2.6*a-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function E(e){return 1==(e%4==0^e%100==0^e%400==0)}function R(e,t){return E(e)?i[t]:s[t]}function P(e){return Object.assign({},e)}function $(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}function j(e){var t=$(e.year,4)+"-"+$(e.month,2);return e.hasDay&&(t+="-"+$(e.day,2)),t}function Y(e){return e.hasTime?$(e.hour,2)+":"+$(e.minute,2):""}function U(e){return j(e)+(e.hasTime?" "+Y(e):"")}function z(e){return++e.day,e.weekday=(e.weekday+1)%h,e.day>o&&e.day>R(e.year,e.month)&&(e.day=l,++e.month,e.month>d&&(e.month=u,++e.year)),e}function V(e){return e.day--,e.weekday=(e.weekday+6)%h,e.day<l&&(e.month--,e.month<u&&(e.year--,e.month=d),e.day=R(e.year,e.month)),e}function Q(e,t,r,a){return void 0===t&&(t=z),void 0===r&&(r=1),void 0===a&&(a=[0,1,2,3,4,5,6]),Z(e,t,r,a)}function Z(e,t,r,a){for(void 0===t&&(t=z),void 0===r&&(r=1),void 0===a&&(a=[0,1,2,3,4,5,6]);--r>=0;)t(e),a.length<7&&!a.includes(e.weekday)&&++r;return e}function X(e,t,r,a){for(void 0===r&&(r=z),void 0===a&&(a=6);e.weekday!==t&&--a>=0;)r(e);return e}function G(e){for(var t=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0],a=0;a<e.length;++a)r[e[a]]=1;for(var n=0;n<h;++n){for(var s=1,i=1;i<h;++i){if(r[(n+i)%h])break;++s}t[n]=r[n]*s}return t}function K(e,t,r,a,n,s,i,o,d,u){void 0===i&&(i=[]),void 0===o&&(o=[]),void 0===d&&(d=42),void 0===u&&(u=0);var l=T(t),h=[],c=P(e),y=0,m=y===l;if(l<T(e))return h;for(;(!m||h.length<u)&&h.length<d&&(y=T(c),!(m=m||y>l));)if(0!==a[c.weekday]){var v=P(c);x(v),O(v,r),L(v,n,s,i,o),h.push(v),c=Z(c,z)}else c=z(c);return h}function J(e,t,r,a,n){for(var s=[],i=0;i<a;++i){var o=(t+i)*r,d=P(e);s.push(I(d,o,n))}return s}function ee(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(r,a){try{return new Intl.DateTimeFormat(e||void 0,t(r,a)).format(re(r))}catch(e){return""}}}function te(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function re(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function ae(e){return isFinite(parseInt(e,10))}function ne(e,t,r,a){var n=T(e)+(!0===a?H(e):0),s=T(t)+(!0===a?H(t):0),i=T(r)+(!0===a?H(r):0);return n>=s&&n<=i}function se(e,t,r,a){var n=T(e),s=T(t),i=T(r),o=T(a);return n>=i&&n<=o||s>=i&&s<=o||i>=n&&s>=o}function ie(e,t){var r,a,n,s=P(e);return a=t,n=function(e,t){if(void 0!==s[t]){s[t]+=parseInt(e,10);var a=oe.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}},Object.keys(a).forEach(function(e){return n(a[e],e)}),void 0!==r&&function(e,t){switch(t){case"minute":return function(e){if(e.minute>=c||e.minute<0){var t=Math.floor(e.minute/c);e.minute-=t*c,e.hour+=t,de(e)}return e}(e);case"hour":return de(e);case"day":return ue(e);case"month":le(e)}}(s,oe[r]),x(s),s}var oe=["minute","hour","day","month"];function de(e){if(e.hour>=y||e.hour<0){var t=Math.floor(e.hour/y);e.hour-=t*y,e.day+=t,ue(e)}return e}function ue(e){le(e);var t=R(e.year,e.month);if(e.day>t){++e.month,e.month>d&&le(e);var r=e.day-t;t=R(e.year,e.month);do{r>t&&(++e.month,e.month>d&&le(e),r-=t,t=R(e.year,e.month))}while(r>t);e.day=r}else if(e.day<=0){var a=-1*e.day;--e.month,e.month<=0&&le(e),t=R(e.year,e.month);do{a>t&&(a-=t,--e.month,e.month<=0&&le(e),t=R(e.year,e.month))}while(a>t);e.day=t-a}return e}function le(e){if(e.month>d){var t=Math.floor(e.month/d);e.month=e.month%d,e.year+=t}else e.month<u&&(e.month+=d,--e.year);return e}function he(e,t){var r=M(e,t,!0);return Math.floor(r/m)}function ce(e,t){var r=P(e),a=P(t);return r=X(r,0),a=X(a,6),Math.ceil(he(r,a)/h)}var ye={name:"Times",props:{now:{type:String,validator:function(e){return""===e||C(e)}}},data:function(){return{times:{now:w("0000-00-00 00:00"),today:w("0000-00-00")}}},computed:{parsedNow:function(){return this.now?w(this.now):null}},watch:{parsedNow:"updateCurrent"},beforeMount:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return S(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},me={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var r;return this.getMouseEventHandlers(((r={})["click"+e]={event:"click"},r["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},r["mousedown"+e]={event:"mousedown"},r["mousemove"+e]={event:"mousemove"},r["mouseup"+e]={event:"mouseup"},r["mouseenter"+e]={event:"mouseenter"},r["mouseleave"+e]={event:"mouseleave"},r["touchstart"+e]={event:"touchstart"},r["touchmove"+e]={event:"touchmove"},r["touchend"+e]={event:"touchend"},r),t)},getMouseEventHandlers:function(e,t){var r=this,a={},n=function(n){var s=e[n];if(r.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var a=e;return(void 0===s.button||a.buttons>0&&a.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),r.$emit(n,t(e))),s.result};i in a?Array.isArray(a[i])?a[i].push(o):a[i]=[a[i],o]:a[i]=o}};for(var s in e)n(s);return a}}},ve=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],fe={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&ve.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,r){return void 0===r&&(r={}),this.setTextColor(e,this.setBackgroundColor(t,r))},setBackgroundColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["bg-"+n]=!0,r))}return t},setTextColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+a,"caret-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["text-"+n]=!0,r))}return t},setBorderColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["border-"+n]=!0,r))}return t}},version:"1.0.6"},pe={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,r){return void 0===r&&(r={}),r},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var r=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){r.set(e,t.theme[e])}),r}}};pe.version="1.0.1";var ge={base:{value:{type:String,validator:function(e){return""===e||C(e)}},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:function(){return[]}},hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{value:{type:String,validator:function(e){return""===e||C(e)}},maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:ae},intervalMinutes:{type:[Number,String],default:60,validator:ae},intervalStart:{type:[Number,String],default:0,validator:ae},intervalCount:{type:[Number,String],default:24,validator:ae},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ae},columnIndexStart:{type:[Number,String],default:0,validator:ae}},weeks:{value:{type:String,validator:function(e){return""===e||C(e)}},dayHeight:{type:[Number,String],default:0,validator:ae},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:ae,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},selectedDates:Array,miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{value:{type:String,validator:function(e){return""===e||C(e)}},resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:ae},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||ae(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ae},columnIndexStart:{type:[Number,String],default:0,validator:ae}},agenda:{leftColumnOptions:Array,rightColumnOptions:Array,columnOptionsId:String,columnOptionsLabel:String},calendar:{view:{type:String,default:"month",validator:function(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}},value:{type:String,validator:function(e){return""===e||C(e)}},bordered:Boolean,dark:Boolean}},_e={name:"CalendarBase",mixins:[fe,pe,me,ye],props:Object.assign({},ge.base,{start:{type:String,validator:C,default:function(){return S(new Date).date}},end:{type:String,validator:C,default:"0000-00-00"}}),data:function(){return{keyValue:0,direction:"next"}},computed:{weekdaySkips:function(){return G(this.weekdays)},parsedStart:function(){return w(this.start)},parsedEnd:function(){return w(this.end)},days:function(){return K(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return ee(this.locale,function(t,r){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return ee(this.locale,function(r,a){return a?t:e})}},methods:{arrayHasDate:function(e,t){return e&&e.length>0&&e.includes(t.date)},getRelativeClasses:function(e,t,r){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t,"q-selected-date":this.arrayHasDate(r,e)}},getStartOfWeek:function(e){return p(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return g(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function be(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function ke(e,t){for(var r=0;r<e.length;r++)if(!0===t(e[r],r))return r;return-1}var Ce={name:"QCalendarMonthly",mixins:[{name:"QCalendarWeekly",mixins:[_e],props:ge.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return K(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return K(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return ee(this.locale,function(r,a){return a?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=be(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=T(e);return t<T(this.parsedStart)||t>T(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,r,a=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",r="backgroundHeader",a=this.getThemeColors([t,r]),n=this.setBothColors),e("div",n(a.get(t),a.get(r),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(r,a){return t.__renderHeadDay(e,r,a)})},__renderHeadDay:function(e,t,r){var a,n,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorHeader",n="backgroundHeader",s=this.getThemeColors([a,n]),i=this.setBothColors),e("div",i(s.get(a),s.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"}}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,r){var a=this.weekdayFormatter(t,r);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?a.charAt(0):a)},__renderWeeks:function(e){for(var t=this.days,r=this.weekdays.length,a=[],n=0;n<t.length;n+=r)a.push(this.__renderWeek(e,t.slice(n,n+r)));return a},__renderWeek:function(e,t){var r=this,a=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},s=be(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?s:this.isMiniMode?"auto":"100px"}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return r.__renderDay(e,t)})),void 0!==a?e("div",{staticClass:"q-calendar-weekly__week-events"},a(n)):""])])},__renderWorkWeekGutter:function(e,t){var r,a,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=Number(s.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=i&&!0===i.current?this.color:void 0,l=be(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(r="colorWorkWeekCurrent",a="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(r="colorWorkWeekPast",a="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(r="colorWorkWeekFuture",a="backgroundWorkWeekFuture"),h=this.getThemeColors([r,a]),c=this.setBothColors),e("div",c(void 0!==u?u:h.get(r),h.get(a),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var r,a,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,u=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),l=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,h=new Map,c=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(a="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),h=this.getThemeColors([a,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),i(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(a),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o,this.isMiniMode?void 0:this.selectedDates),{"q-calendar-weekly__day--droppable":r})],style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!l?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&l?this.__renderDayMonth(e,t):"",e("div",{staticClass:"full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(u):"")])},__renderDayLabel:function(e,t){var a,n,s=this.isOutside(t),i=!0===t.current?this.color:void 0,o=this.dayFormatter(t,!1),d=this.$scopedSlots["day-label"],u=Object.assign({},{dayLabel:o},t,{miniMode:this.isMiniMode}),l=new Map,h=this.useDefaultTheme,c=this.isMiniMode&&this.selectedDates&&this.selectedDates.length>0&&this.selectedDates.includes(t.date),y=this.value===t.date;return!0===this.enableTheme&&(!0===s?(a="colorDayLabelOutside",n="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),l=this.getThemeColors([a,n]),h=this.setBothColors),e(r.QBtn,h(void 0!==i?i:l.get(a),l.get(n),{staticClass:"q-calendar-weekly__day-label",class:[{"q-selected-date":c,"q-active-date":!0!==this.noActiveDate&&y}],props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:!0===t.disabled||!0===s},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[d?d(u):o])},__renderDayOfYearLabel:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),a?a(n):t.doy)},__renderDayMonth:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),s=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month"}),a?a(s):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}}],computed:{parsedStart:function(){return _(w(this.start))},parsedEnd:function(){return b(w(this.end))}}},De={name:"resize",inserted:function(e,t){var r=t.value,a=t.options||{passive:!0};window.addEventListener("resize",r,a),e._onResize={callback:r,options:a},t.modifiers&&t.modifiers.quiet||r()},unbind:function(e){if(e._onResize){var t=e._onResize,r=t.callback,a=t.options;window.removeEventListener("resize",r,a),delete e._onResize}}},we={name:"QCalendarDaily",mixins:[{name:"CalendarWithIntervals",mixins:[_e],props:Object.assign({},ge.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return K(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,r=this.parsedIntervalMinutes,a=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return J(e,t,r,a,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return ee(this.locale,function(a,n){return n?0===a.minute?r:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var r=P(t),a=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-a.top)/this.parsedIntervalHeight;return I(r,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var r=P(e);return r.timeStartPos=this.timeStartPos,r.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(r.index=t),r},scrollToTime:function(e){var t=this.timeStartPos(e),r=this.$refs.scrollArea;return!(!1===t||!r)&&(r.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=k(e);if(!1===r)return!1;var a=(r-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a}}}],directives:{Resize:De},data:function(){return{scrollWidth:0}},computed:{computedWidth:function(){return 100/this.days.length}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,r,a=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",r="backgroundIntervalHeader",n=this.getThemeColors([t,r]),s=this.setBothColors),e("div",s(n.get(t),n.get(r),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,r),u=this.computedWidth,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),h=this.setBothColors),e("div",h(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=this.$scopedSlots["day-header-label"],s=this.getScopeForSlot(t),i=!0===t.current?this.color:void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),o=this.getThemeColors([r,a]),d=this.setBothColors),e("div",d(void 0!==i?i:o.get(r),o.get(a),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[n&&n(s)||this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t){var a,n,s=!0===t.current?this.color:void 0,i=this.value===t.date,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),o=this.getThemeColors([a,n]),d=this.setBothColors),e(r.QBtn,d(void 0!==s?s:o.get(a),o.get(n),{staticClass:"q-calendar-daily__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&i}],style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:be(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r,a){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,a),u=this.computedWidth,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),l=this.getThemeColors([n,s]),h=this.setBothColors),e("div",h(l.get(n),l.get(s),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:u+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),a)})}),this.__renderDayIntervals(e,r,a).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,r){var a=this;return this.intervals[t].map(function(t){return a.__renderDayInterval(e,t,r)})},__renderDayInterval:function(e,t,r){var a,n=this,s=be(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,r);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":a},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,r,a=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",r="backgroundIntervalBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return a.getTimestampAtEvent(e,a.parsedStart)})};return e("div",s(n.get(t),n.get(r),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(r){return t.__renderIntervalLabel(e,r)})},__renderIntervalLabel:function(e,t){var r,a,n=be(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorIntervalText",a="backgroundIntervalText",o=this.getThemeColors([r,a]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(r),o.get(a),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{staticClass:"q-calendar-daily",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},Se={name:"QCalendarScheduler",mixins:[{name:"CalendarWithScheduler",mixins:[_e],props:Object.assign({},ge.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return K(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return O(P(t),this.times.now,!1)},getScopeForSlot:function(e,t,r){var a={};return a.day=P(e),void 0!==t&&(a.index=t),void 0!==r&&(a.resource=r),a}}}],directives:{Resize:De},data:function(){return{scrollWidth:0}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var r=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,r,a=this.$scopedSlots["scheduler-resources-header"],n=be(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",r="backgroundSchedulerHeader",s=this.getThemeColors([t,r]),i=this.setBothColors),e("div",i(s.get(t),s.get(r),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),h=this.setBothColors),e("div",h(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,r),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,r),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),s=this.getThemeColors([r,a]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(r),s.get(a),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t,a){var n,s,i=!0===t.current?this.color:void 0,o=this.value===t.date,d={day:t,idx:a},u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorDayLabelPast",s="backgroundDayLabelPast"):!0===t.current?(n="colorDayLabelCurrent",s="backgroundDayLabelCurrent"):!0===t.future&&(n="colorDayLabelFuture",s="backgroundDayLabelFuture"),u=this.getThemeColors([n,s]),l=this.setBothColors),e(r.QBtn,l(void 0!==i?i:u.get(n),u.get(s),{staticClass:"q-calendar-scheduler__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&o}],style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return d})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:be(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r){var a,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([a,n]),o=this.setBothColors),e("div",o(i.get(a),i.get(n),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,r)))},__renderDayResources:function(e,t,r){var a=this;return this.resources.map(function(n){return a.__renderDayResource(e,n,t,r)})},__renderDayResource:function(e,t,r,a){var n,s=this,i=be(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(r,a,t),l={height:i};return l=Object.assign(l,o(u)),e("div",{key:t[this.resourceKey]+"-"+a,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:l,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",a)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,r),a,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,r,a=be(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",r="backgroundSchedulerBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:a}};return e("div",s(n.get(t),n.get(r),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(r,a){return t.__renderResourceLabel(e,r,a)})},__renderResourceLabel:function(e,t,r){var a,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:r},o=be(this.resourceHeight),d=t.label,u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorSchedulerText",n="backgroundSchedulerText",u=this.getThemeColors([a,n]),l=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",l(u.get(a),u.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{staticClass:"q-calendar-scheduler",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},Te={name:"QCalendarAgenda",mixins:[we],props:Object.assign({},ge.agenda),computed:{computedColumnCount:function(){return this.days.length+(!0===this.leftColumnOptionsValid?this.leftColumnOptions.length:0)+(!0===this.rightColumnOptionsValid?this.rightColumnOptions.length:0)},computedWidth:function(){return 100/this.computedColumnCount},leftColumnOptionsValid:function(){return void 0!==this.leftColumnOptions&&Array.isArray(this.leftColumnOptions)},rightColumnOptionsValid:function(){return void 0!==this.rightColumnOptions&&Array.isArray(this.rightColumnOptions)}},methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},this.__renderHeadDays(e))},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(r,a){return t.__renderColumnHead(e,r,a)}),this.days.map(function(r){return t.__renderHeadDay(e,r)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(r,a){return t.__renderColumnHead(e,r,a)})]},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderColumnHead:function(e,t,r){var a,n=this,s=this.$scopedSlots["column-header"],i=t,o=this.computedWidth,d=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),u=this.setBothColors),e("div",u(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+(void 0!==r?"-"+r:""),staticClass:"q-calendar-daily__head-day",class:{"q-column-day":!0,"q-calendar-daily__head-day--droppable":a},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"column",r))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column",r)}},on:this.getDefaultMouseEventHandlers(":column:head",function(e){return i})}),[!0!==this.noDefaultHeaderText&&this.__renderHeadColumn(e,t),s&&s(i)])},__renderHeadColumn:function(e,t){var r=this.$scopedSlots["column-header-label"],a=t,n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(n=this.getThemeColors([void 0,void 0]),s=this.setBothColors),e("div",s(n.get(void 0),n.get(void 0),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[r&&r(a),!r&&this.__renderHeadColumnLabel(e,void 0!==this.columnOptionsLabel?t[this.columnOptionsLabel]:t.label)])},__renderHeadColumnLabel:function(e,t){return e("span",{staticClass:"ellipsis"},t)},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(r,a){return t.__renderColumn(e,r,a)}),this.days.map(function(r,a){return t.__renderDay(e,r,a)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(r,a){return t.__renderColumn(e,r,a)})]},__renderColumn:function(e,t,r){var a,n=this,s=this.$scopedSlots["column-body"],i=t,o=this.computedWidth,d=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),u=this.setBothColors),e("div",u(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+"-body-"+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:{"q-column-day":!0,"q-calendar-daily__day--droppable":a},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"column"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column")}},on:this.getDefaultMouseEventHandlers(":column",function(e){return i})}),[s&&s(i)])},__renderDay:function(e,t,r,a){var n,s,i,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=this.computedWidth,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),h=this.getThemeColors([s,i]),c=this.setBothColors),e("div",c(h.get(s),h.get(i),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),a)})}),[d&&d(u)])}},render:function(e){return e("div",{staticClass:"q-calendar-agenda",class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},He={name:"QCalendar",mixins:[_e],props:Object.assign({},ge.calendar,ge.weeks,ge.intervals,ge.scheduler,ge.agenda),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return w(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",r=this.maxDays,a=e,n=e;switch(this.view){case"month":t=Ce,a=_(e),n=b(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,a=this.getStartOfWeek(e),n=this.getEndOfWeek(e),r=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,r=1,x(n=Z(P(n),z,r,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,r=2,x(n=Z(P(n),z,r,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,r=3,x(n=Z(P(n),z,r,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,r=4,x(n=Z(P(n),z,r,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,r=5,x(n=Z(P(n),z,r,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,r=6,x(n=Z(P(n),z,r,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,x(n=Z(P(n),z,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?Se:Te,x(n=Z(P(n),z,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:we,a=_(e),x(n=b(e)),r=31}return{component:t,start:a,end:n,maxDays:r}}},beforeMount:function(){this.__checkChange()},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(){var e=this.renderProps,t=e.start,r=e.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&t.date===this.lastStart&&r.date===this.lastEnd||(this.lastStart=t.date,this.lastEnd=r.date,this.$emit("change",{start:t,end:r})),this.keyValue=T(t)},move:function(e){void 0===e&&(e=1);var t=P(this.parsedValue),r=e>0,a=r?z:V,n=r?31:l,s=r?e:-e;this.direction=r?"next":"prev";this.maxDays;for(var i=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,a(t);break;case"week":case"week-scheduler":case"week-agenda":case"scheduler":Z(t,a,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":Z(t,a,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":Z(t,a,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":Z(t,a,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":Z(t,a,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":Z(t,a,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":Z(t,a,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":Z(t,a,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,a(t)}W(t),x(t),B(t),O(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=this.$children[0];return!(!r||!r.timeStartPos)&&r.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,r){return e(t,r)}},render:function(e){var t=this,r=this.renderProps,a=r.start,n=r.end,s=r.maxDays,i=r.component;this.keyValue=T(a);var o={staticClass:"q-calendar"+(!0===this.dark?" q-calendar--dark":""),class:{"q-calendar-daily__bordered":this.bordered},key:this.keyValue,props:Object.assign({},this.$props,{start:a.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},Me={version:"1.5.3",QCalendar:He,PARSE_REGEX:a,PARSE_TIME:n,DAYS_IN_MONTH:s,DAYS_IN_MONTH_LEAP:i,DAYS_IN_MONTH_MIN:o,DAYS_IN_MONTH_MAX:31,MONTH_MAX:d,MONTH_MIN:u,DAY_MIN:l,DAYS_IN_WEEK:h,MINUTES_IN_HOUR:c,HOURS_IN_DAY:y,FIRST_HOUR:0,MILLISECONDS_IN_DAY:m,MILLISECONDS_IN_HOUR:36e5,MILLISECONDS_IN_MINUTE:6e4,Timestamp:v,TimeObject:f,getStartOfWeek:p,getEndOfWeek:g,getStartOfMonth:_,getEndOfMonth:b,parseTime:k,validateTimestamp:C,parsed:D,parseTimestamp:w,parseDate:S,getDayIdentifier:T,getTimeIdentifier:H,diffTimestamp:M,updateRelative:O,updateMinutes:I,updateWeekday:W,updateDayOfYear:B,updateWorkWeek:F,updateDisabled:L,updateFormatted:x,getDayOfYear:q,getWorkWeek:A,getWeekday:N,isLeapYear:E,daysInMonth:R,copyTimestamp:P,padNumber:$,getDate:j,getTime:Y,getDateTime:U,nextDay:z,prevDay:V,relativeDays:Z,moveRelativeDays:Q,findWeekday:X,getWeekdaySkips:G,createDayList:K,createIntervalList:J,createNativeLocaleFormatter:ee,makeDate:te,makeDateTime:re,validateNumber:ae,isBetweenDates:ne,isOverlappingDates:se,daysBetween:he,weeksBetween:ce,addToDate:ie,convertToUnit:be,indexOf:ke,install:function(e){e.component(He.name,He)}};t.use(Me),e.DAYS_IN_MONTH=s,e.DAYS_IN_MONTH_LEAP=i,e.DAYS_IN_MONTH_MAX=31,e.DAYS_IN_MONTH_MIN=o,e.DAYS_IN_WEEK=h,e.DAY_MIN=l,e.FIRST_HOUR=0,e.HOURS_IN_DAY=y,e.MILLISECONDS_IN_DAY=m,e.MILLISECONDS_IN_HOUR=36e5,e.MILLISECONDS_IN_MINUTE=6e4,e.MINUTES_IN_HOUR=c,e.MONTH_MAX=d,e.MONTH_MIN=u,e.PARSE_REGEX=a,e.PARSE_TIME=n,e.QCalendar=He,e.TimeObject=f,e.Timestamp=v,e.addToDate=ie,e.convertToUnit=be,e.copyTimestamp=P,e.createDayList=K,e.createIntervalList=J,e.createNativeLocaleFormatter=ee,e.daysBetween=he,e.daysInMonth=R,e.diffTimestamp=M,e.findWeekday=X,e.getDate=j,e.getDateTime=U,e.getDayIdentifier=T,e.getDayOfYear=q,e.getEndOfMonth=b,e.getEndOfWeek=g,e.getStartOfMonth=_,e.getStartOfWeek=p,e.getTime=Y,e.getTimeIdentifier=H,e.getWeekday=N,e.getWeekdaySkips=G,e.getWorkWeek=A,e.indexOf=ke,e.isBetweenDates=ne,e.isLeapYear=E,e.isOverlappingDates=se,e.makeDate=te,e.makeDateTime=re,e.moveRelativeDays=Q,e.nextDay=z,e.padNumber=$,e.parseDate=S,e.parseTime=k,e.parseTimestamp=w,e.parsed=D,e.prevDay=V,e.relativeDays=Z,e.updateDayOfYear=B,e.updateDisabled=L,e.updateFormatted=x,e.updateMinutes=I,e.updateRelative=O,e.updateWeekday=W,e.updateWorkWeek=F,e.validateNumber=ae,e.validateTimestamp=C,e.version="1.5.3",e.weeksBetween=ce,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("quasar")):"function"==typeof define&&define.amd?define(["exports","vue","quasar"],t):t((e=e||self).QCalendar={},e.Vue,e.Quasar)}(this,function(e,t,r){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,n=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=[0,31,29,31,30,31,30,31,31,30,31,30,31],o=28,d=12,u=1,l=1,h=7,c=60,y=24,m=864e5,v={date:"",time:"",year:0,month:0,day:0,weekday:0,hour:0,minute:0,doy:0,workweek:0,hasDay:!1,hasTime:!1,past:!1,current:!1,future:!1,disabled:!1},f={hour:0,minute:0};function p(e,t,r){var a=P(e);if(1===a.day||0===a.weekday)for(;!t.includes(a.weekday);)z(a);return X(a,t[0],V),q(a),r&&O(a,r,a.hasTime),a}function g(e,t,r){var a=P(e);if(R(a.year,a.month)===a.day||6===a.weekday)for(;!t.includes(a.weekday);)V(a);return X(a,t[t.length-1],z),q(a),r&&O(a,r,a.hasTime),a}function _(e){var t=P(e);return t.day=l,q(t),t}function k(e){var t=P(e);return t.day=R(t.year,t.month),q(t),t}function b(e){switch(Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object String]":var t=n.exec(e);return!!t&&60*parseInt(t[1],10)+parseInt(t[3]||0,10);case"[object Object]":return"number"==typeof e.hour&&"number"==typeof e.minute&&60*e.hour+e.minute}return!1}function C(e){return!!a.exec(e)}function w(e){var t=a.exec(e);return t?{date:e,time:"",year:parseInt(t[1],10),month:parseInt(t[2],10),day:parseInt(t[4],10)||1,hour:parseInt(t[6],10)||0,minute:parseInt(t[8],10)||0,weekday:0,doy:0,workweek:0,hasDay:!!t[4],hasTime:!(!t[6]||!t[8]),past:!1,current:!1,future:!1,disabled:!1}:null}function D(e,t){var r=w(e);return null===r?null:(q(r),t&&O(r,t,r.hasTime),r)}function S(e){return q({date:"",time:"",year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),weekday:e.getDay(),hour:e.getHours(),minute:e.getMinutes(),doy:0,workweek:0,hasDay:!0,hasTime:!0,past:!1,current:!0,future:!1,disabled:!1})}function T(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function H(e){return 100*e.hour+e.minute}function M(e,t,r){var a=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),n=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===r&&n<a?0:n-a}function O(e,t,r){void 0===r&&(r=!1);var a=T(t),n=T(e),s=a===n;return e.hasTime&&r&&s&&(s=(a=H(t))===(n=H(e))),e.past=n<a,e.current=s,e.future=n>a,e}function I(e,t,r){return e.hasTime=!0,e.hour=Math.floor(t/c),e.minute=t%c,e.time=Y(e),r&&O(e,r,!0),e}function W(e){return e.weekday=N(e),e}function B(e){return e.doy=x(e),e}function F(e){return e.workweek=A(e),e}function L(e,t,r,a,n){var s=T(e);void 0!==t&&(s<=T(w(t))&&(e.disabled=!0));!0!==e.disabled&&void 0!==r&&(s>=T(w(r))&&(e.disabled=!0));if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(var i in a)if(a[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(var o in n){if(T(D(n[o]+" 00:00"))===s){e.disabled=!0;break}}return e}function q(e){return e.time=Y(e),e.date=j(e),e.weekday=N(e),e.doy=x(e),e.workweek=A(e),e}function x(e){if(0!==e.year)return(Date.UTC(e.year,e.month-1,e.day)-Date.UTC(e.year,0,0))/24/60/60/1e3}function A(e){if(0!==e.year){var t=te(e);return r.date.getWeekOfYear(t)}}function N(e){if(e.hasDay){var t=Math.floor,r=e.day,a=(e.month+9)%d+1,n=t(e.year/100),s=e.year%100-(e.month<=2?1:0);return((r+t(2.6*a-.2)-2*n+s+t(s/4)+t(n/4))%7+7)%7}return e.weekday}function E(e){return 1==(e%4==0^e%100==0^e%400==0)}function R(e,t){return E(e)?i[t]:s[t]}function P(e){return Object.assign({},e)}function $(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}function j(e){var t=$(e.year,4)+"-"+$(e.month,2);return e.hasDay&&(t+="-"+$(e.day,2)),t}function Y(e){return e.hasTime?$(e.hour,2)+":"+$(e.minute,2):""}function U(e){return j(e)+(e.hasTime?" "+Y(e):"")}function z(e){return++e.day,e.weekday=(e.weekday+1)%h,e.day>o&&e.day>R(e.year,e.month)&&(e.day=l,++e.month,e.month>d&&(e.month=u,++e.year)),e}function V(e){return e.day--,e.weekday=(e.weekday+6)%h,e.day<l&&(e.month--,e.month<u&&(e.year--,e.month=d),e.day=R(e.year,e.month)),e}function Q(e,t,r,a){return void 0===t&&(t=z),void 0===r&&(r=1),void 0===a&&(a=[0,1,2,3,4,5,6]),Z(e,t,r,a)}function Z(e,t,r,a){for(void 0===t&&(t=z),void 0===r&&(r=1),void 0===a&&(a=[0,1,2,3,4,5,6]);--r>=0;)t(e),a.length<7&&!a.includes(e.weekday)&&++r;return e}function X(e,t,r,a){for(void 0===r&&(r=z),void 0===a&&(a=6);e.weekday!==t&&--a>=0;)r(e);return e}function G(e){for(var t=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0],a=0;a<e.length;++a)r[e[a]]=1;for(var n=0;n<h;++n){for(var s=1,i=1;i<h;++i){if(r[(n+i)%h])break;++s}t[n]=r[n]*s}return t}function K(e,t,r,a,n,s,i,o,d,u){void 0===i&&(i=[]),void 0===o&&(o=[]),void 0===d&&(d=42),void 0===u&&(u=0);var l=T(t),h=[],c=P(e),y=0,m=y===l;if(l<T(e))return h;for(;(!m||h.length<u)&&h.length<d&&(y=T(c),!(m=m||y>l));)if(0!==a[c.weekday]){var v=P(c);q(v),O(v,r),L(v,n,s,i,o),h.push(v),c=Z(c,z)}else c=z(c);return h}function J(e,t,r,a,n){for(var s=[],i=0;i<a;++i){var o=(t+i)*r,d=P(e);s.push(I(d,o,n))}return s}function ee(e,t){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(e,t){return""}:function(r,a){try{return new Intl.DateTimeFormat(e||void 0,t(r,a)).format(re(r))}catch(e){return""}}}function te(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function re(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function ae(e){return isFinite(parseInt(e,10))}function ne(e,t,r,a){var n=T(e)+(!0===a?H(e):0),s=T(t)+(!0===a?H(t):0),i=T(r)+(!0===a?H(r):0);return n>=s&&n<=i}function se(e,t,r,a){var n=T(e),s=T(t),i=T(r),o=T(a);return n>=i&&n<=o||s>=i&&s<=o||i>=n&&s>=o}function ie(e,t){var r,a,n,s=P(e);return a=t,n=function(e,t){if(void 0!==s[t]){s[t]+=parseInt(e,10);var a=oe.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}},Object.keys(a).forEach(function(e){return n(a[e],e)}),void 0!==r&&function(e,t){switch(t){case"minute":return function(e){if(e.minute>=c||e.minute<0){var t=Math.floor(e.minute/c);e.minute-=t*c,e.hour+=t,de(e)}return e}(e);case"hour":return de(e);case"day":return ue(e);case"month":le(e)}}(s,oe[r]),q(s),s}var oe=["minute","hour","day","month"];function de(e){if(e.hour>=y||e.hour<0){var t=Math.floor(e.hour/y);e.hour-=t*y,e.day+=t,ue(e)}return e}function ue(e){le(e);var t=R(e.year,e.month);if(e.day>t){++e.month,e.month>d&&le(e);var r=e.day-t;t=R(e.year,e.month);do{r>t&&(++e.month,e.month>d&&le(e),r-=t,t=R(e.year,e.month))}while(r>t);e.day=r}else if(e.day<=0){var a=-1*e.day;--e.month,e.month<=0&&le(e),t=R(e.year,e.month);do{a>t&&(a-=t,--e.month,e.month<=0&&le(e),t=R(e.year,e.month))}while(a>t);e.day=t-a}return e}function le(e){if(e.month>d){var t=Math.floor(e.month/d);e.month=e.month%d,e.year+=t}else e.month<u&&(e.month+=d,--e.year);return e}function he(e,t){var r=M(e,t,!0);return Math.floor(r/m)}function ce(e,t){var r=P(e),a=P(t);return r=X(r,0),a=X(a,6),Math.ceil(he(r,a)/h)}var ye={name:"Times",props:{now:{type:String,validator:function(e){return""===e||C(e)}}},data:function(){return{times:{now:D("0000-00-00 00:00"),today:D("0000-00-00")}}},computed:{parsedNow:function(){return this.now?D(this.now):null}},watch:{parsedNow:"updateCurrent"},beforeMount:function(){this.updateCurrent(),this.setCurrent()},methods:{setCurrent:function(){this.times.now.current=this.times.today.current=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateCurrent:function(){var e=this.parsedNow||this.getNow();this.updateDay(e,this.times.now),this.updateTime(e,this.times.now),this.updateDay(e,this.times.today)},getNow:function(){return S(new Date)},updateDay:function(e,t){e.date!==t.date&&(t.year=e.year,t.month=e.month,t.day=e.day,t.weekday=e.weekday,t.date=e.date)},updateTime:function(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}}},me={name:"Mouse",methods:{getDefaultMouseEventHandlers:function(e,t){var r;return this.getMouseEventHandlers(((r={})["click"+e]={event:"click"},r["contextmenu"+e]={event:"contextmenu",prevent:!0,result:!1},r["mousedown"+e]={event:"mousedown"},r["mousemove"+e]={event:"mousemove"},r["mouseup"+e]={event:"mouseup"},r["mouseenter"+e]={event:"mouseenter"},r["mouseleave"+e]={event:"mouseleave"},r["touchstart"+e]={event:"touchstart"},r["touchmove"+e]={event:"touchmove"},r["touchend"+e]={event:"touchend"},r),t)},getMouseEventHandlers:function(e,t){var r=this,a={},n=function(n){var s=e[n];if(r.$listeners[n]){var i=(s.passive?"&":(s.once?"~":"")+(s.capture?"!":""))+s.event,o=function(e){var a=e;return(void 0===s.button||a.buttons>0&&a.button===s.button)&&(s.prevent&&e.preventDefault(),s.stop&&e.stopPropagation(),r.$emit(n,t(e))),s.result};i in a?Array.isArray(a[i])?a[i].push(o):a[i]=[a[i],o]:a[i]=o}};for(var s in e)n(s);return a}}},ve=["transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],fe={name:"QColorizeMixin",props:{color:String},methods:{isNamedCssColor:function(e){return!!e&&ve.includes(e.toLowerCase())},isCssColor:function(e){return!!e&&(!!e.match(/^(#|(rgb|hsl)a?\()/)||this.isNamedCssColor(e))},isCssVar:function(e){return!!e&&e.startsWith("--")},calculateColor:function(e,t){return void 0===t&&(t="black"),void 0===e&&void 0!==t?this.calculateColor(t):this.isCssColor(e)?e:this.makeQuasarColorVar(e,t)},makeQuasarColorVar:function(e,t){return"var("+(this.isCssVar(e)?e:"--q-color-"+e)+", '"+t+"')"},isValidCssColor:function(e){return this.isCssColor(e)||this.isCssVar(e)},setBothColors:function(e,t,r){return void 0===r&&(r={}),this.setTextColor(e,this.setBackgroundColor(t,r))},setBackgroundColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"background-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["bg-"+n]=!0,r))}return t},setTextColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{color:""+a,"caret-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["text-"+n]=!0,r))}return t},setBorderColor:function(e,t){var r;if(void 0===t&&(t={}),this.isValidCssColor(e)){var a=this.calculateColor(e);void 0===t.style&&(t.style={}),t.style=Object.assign({},t.style,{"border-color":""+a})}else if(e){var n=e.toString().trim();void 0===t.class&&(t.class={}),t.class=Object.assign({},t.class,((r={})["border-"+n]=!0,r))}return t}},version:"1.0.6"},pe={name:"QThemeMixin",props:{theme:{type:Object,default:function(){}},enableTheme:Boolean},methods:{useDefaultTheme:function(e,t,r){return void 0===r&&(r={}),r},getThemeColors:function(e){var t=this;void 0===e&&(e=[]);var r=new Map;return!0===this.enableTheme&&void 0!==this.theme&&e.forEach(function(e){r.set(e,t.theme[e])}),r}}};pe.version="1.0.1";var ge={base:{value:{type:String,validator:function(e){return""===e||C(e)}},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:function(){return[]}},hideHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,locale:{type:String,default:"en-us"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},dragOverFunc:{type:Function},dropFunc:{type:Function}},intervals:{value:{type:String,validator:function(e){return""===e||C(e)}},maxDays:{type:Number,default:7},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:ae},intervalMinutes:{type:[Number,String],default:60,validator:ae},intervalStart:{type:[Number,String],default:0,validator:ae},intervalCount:{type:[Number,String],default:24,validator:ae},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ae},columnIndexStart:{type:[Number,String],default:0,validator:ae}},weeks:{value:{type:String,validator:function(e){return""===e||C(e)}},dayHeight:{type:[Number,String],default:0,validator:ae},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:ae,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,selectedStartEndDates:{type:Array,default:function(){return[]},validator:function(e){return e.length<=2}},selectedDates:Array,miniMode:{type:[Boolean,String],validator:function(e){return void 0===e||!0===e||!1===e||"auto"===e}},breakpoint:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}},monthLabelSize:{type:String,default:"md",validator:function(e){return["xs","sm","md","lg","xl"].includes(e)}}},scheduler:{value:{type:String,validator:function(e){return""===e||C(e)}},resources:Array,resourceKey:{type:String,default:"label"},maxDays:{type:Number,default:7},resourceHeight:{type:[Number,String],default:70,validator:ae},resourceWidth:{type:[Number,String],validator:function(e){return void 0===e||ae(e)}},resourceStyle:{type:Function,default:null},columnHeaderBefore:Boolean,columnHeaderAfter:Boolean,columnCount:{type:[Number,String],default:1,validator:ae},columnIndexStart:{type:[Number,String],default:0,validator:ae}},agenda:{leftColumnOptions:Array,rightColumnOptions:Array,columnOptionsId:String,columnOptionsLabel:String},calendar:{view:{type:String,default:"month",validator:function(e){return["month","week","day","2day","3day","4day","5day","6day","month-scheduler","week-scheduler","custom-scheduler","scheduler","day-scheduler","2day-scheduler","3day-scheduler","4day-scheduler","5day-scheduler","6day-scheduler","month-agenda","week-agenda","custom-agenda","agenda","day-agenda","2day-agenda","3day-agenda","4day-agenda","5day-agenda","6day-agenda","month-interval","custom-interval"].includes(e)}},value:{type:String,validator:function(e){return""===e||C(e)}},bordered:Boolean,dark:Boolean}},_e={name:"CalendarBase",mixins:[fe,pe,me,ye],props:Object.assign({},ge.base,{start:{type:String,validator:C,default:function(){return S(new Date).date}},end:{type:String,validator:C,default:"0000-00-00"}}),data:function(){return{keyValue:0,direction:"next"}},computed:{weekdaySkips:function(){return G(this.weekdays)},parsedStart:function(){return D(this.start)},parsedEnd:function(){return D(this.end)},days:function(){return K(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays)},dayFormatter:function(){var e={timeZone:"UTC",day:"numeric"};return ee(this.locale,function(t,r){return e})},weekdayFormatter:function(){var e={timeZone:"UTC",weekday:"long"},t={timeZone:"UTC",weekday:"short"};return ee(this.locale,function(r,a){return a?t:e})}},methods:{arrayHasDate:function(e,t){return e&&e.length>0&&e.includes(t.date)},getRelativeClasses:function(e,t,r){return void 0===t&&(t=!1),{"q-current-day":e.current,"q-past-day":e.past,"q-future-day":e.future,"q-outside":t,"q-selected-date":this.arrayHasDate(r,e)}},getStartOfWeek:function(e){return p(e,this.weekdays,this.times.today)},getEndOfWeek:function(e){return g(e,this.weekdays,this.times.today)},dayStyleDefault:function(e){}}};function ke(e,t){return void 0===t&&(t="px"),null==e||""===e?void 0:isNaN(e)?String(e):""+Number(e)+t}function be(e,t){for(var r=0;r<e.length;r++)if(!0===t(e[r],r))return r;return-1}var Ce={name:"QCalendarMonthly",mixins:[{name:"QCalendarWeekly",mixins:[_e],props:ge.weeks,computed:{staticClass:function(){return(this.isMiniMode?" q-calendar-mini ":"")+"q-calendar-weekly"},parsedMinWeeks:function(){return parseInt(this.minWeeks,10)},days:function(){var e=this.parsedMinWeeks*this.weekdays.length;return K(this.getStartOfWeek(this.parsedStart),this.getEndOfWeek(this.parsedEnd),this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,Number.MAX_SAFE_INTEGER,e)},todayWeek:function(){var e=this.times.today;return K(this.getStartOfWeek(e),this.getEndOfWeek(e),e,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){var e={timeZone:"UTC",month:"long"},t={timeZone:"UTC",month:"short"};return ee(this.locale,function(r,a){return a?t:e})},styles:function(){var e={};if(this.dayHeight>0){var t=ke(this.dayHeight);e.height=t}return void 0!==this.dayPadding&&(e.padding=this.dayPadding),e.width=100/this.weekdays.length+"%",e},isMiniMode:function(){return!0===this.miniMode||"auto"===this.miniMode&&this.$q.screen.lt[this.breakpoint]}},methods:{isOutside:function(e){var t=T(e);return t<T(this.parsedStart)||t>T(this.parsedEnd)},isCurrentWeek:function(e){for(var t=0;t<e.length;++t)if(!0===e[t].current)return{timestamp:e[t]};return{timestamp:!1}},__renderHead:function(e){return e("div",{staticClass:"q-calendar-weekly__head"},[!0===this.showWorkWeeks&&this.__renderWorkWeekHead(e),this.__renderHeadDays(e)])},__renderWorkWeekHead:function(e){var t,r,a=new Map,n=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorHeader",r="backgroundHeader",a=this.getThemeColors([t,r]),n=this.setBothColors),e("div",n(a.get(t),a.get(r),{staticClass:"q-calendar-weekly__head-workweek"}),"#")},__renderHeadDays:function(e){var t=this;return this.todayWeek.map(function(r,a){return t.__renderHeadDay(e,r,a)})},__renderHeadDay:function(e,t,r){var a,n,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorHeader",n="backgroundHeader",s=this.getThemeColors([a,n]),i=this.setBothColors),e("div",i(s.get(a),s.get(n),{key:t.date,staticClass:"q-calendar-weekly__head-weekday",style:{width:100/this.weekdays.length+"%"}}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel||this.isMiniMode)])},__renderHeadDayLabel:function(e,t,r){var a=this.weekdayFormatter(t,r);return e("span",{staticClass:"ellipsis"},!0===this.isMiniMode&&!0===this.shortWeekdayLabel?a.charAt(0):a)},__renderWeeks:function(e){for(var t=this.days,r=this.weekdays.length,a=[],n=0;n<t.length;n+=r)a.push(this.__renderWeek(e,t.slice(n,n+r)));return a},__renderWeek:function(e,t){var r=this,a=this.$scopedSlots.week,n={week:t,weekdays:this.weekdays,miniMode:this.isMiniMode},s=ke(this.dayHeight);return e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week--wrapper",style:{height:this.dayHeight&&this.dayHeight>0?s:(this.isMiniMode,"auto")}},[!0===this.showWorkWeeks&&this.__renderWorkWeekGutter(e,t),e("div",{key:t[0].date,staticClass:"q-calendar-weekly__week"},[e("div",{staticClass:"q-calendar-weekly__week-days"},t.map(function(t){return r.__renderDay(e,t)})),void 0!==a?e("div",{staticClass:"q-calendar-weekly__week-events"},a(n)):""])])},__renderWorkWeekGutter:function(e,t){var r,a,n=this.$scopedSlots.workweek,s=t.length>2?t[2]:t[0],i=this.isCurrentWeek(t).timestamp,o=Number(s.workweek).toLocaleString(this.locale),d={workweekLabel:o,week:t,miniMode:this.isMiniMode},u=i&&!0===i.current?this.color:void 0,l=ke(this.dayHeight),h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(i&&!0===i.current||!0===s.current?(r="colorWorkWeekCurrent",a="backgroundWorkWeekCurrent"):i&&!0===i.past||!0===s.past?(r="colorWorkWeekPast",a="backgroundWorkWeekPast"):(i&&!0===i.future||!0===s.future)&&(r="colorWorkWeekFuture",a="backgroundWorkWeekFuture"),h=this.getThemeColors([r,a]),c=this.setBothColors),e("div",c(void 0!==u?u:h.get(r),h.get(a),{key:s.workweek,staticClass:"q-calendar-weekly__workweek",class:this.getRelativeClasses(!1!==i?i:s,!1),style:{height:this.dayHeight&&this.dayHeight>0?l:"auto"}}),n?n(d):o)},__renderDay:function(e,t){var r,a,n,s=this,i=this.dayStyle||this.dayStyleDefault,o=this.isOutside(t),d=this.$scopedSlots.day,u=Object.assign({},{outside:o},t,{miniMode:this.isMiniMode}),l=!1===o&&this.days.find(function(e){return e.month===t.month}).day===t.day&&!0===this.showMonthLabel,h=new Map,c=this.useDefaultTheme;!0===this.enableTheme&&(!0===o?(a="colorBodyOutside",n="backgroundBodyOutside"):!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),h=this.getThemeColors([a,n]),c=this.setBothColors);var y=Object.assign(Object.assign({},this.styles),i(t)),m="function"==typeof this.dayClass?this.dayClass(t):null;return e("div",c(h.get(a),h.get(n),{key:t.date,staticClass:"q-calendar-weekly__day",class:[m,Object.assign({},this.getRelativeClasses(t,o,this.isMiniMode?void 0:this.selectedDates),{"q-calendar-weekly__day--droppable":r})],style:y,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(r=s.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":day",function(e){return t})}),[this.__renderDayLabel(e,t),!0!==this.isMiniMode&&this.showDayOfYearLabel&&!l?this.__renderDayOfYearLabel(e,t):"",!0!==this.isMiniMode&&l?this.__renderDayMonth(e,t):"",e("div",{staticClass:"q-calendar-weekly__day--content full-width"+(!0===this.isMiniMode?" row justify-around":"")},d?d(u):"")])},__renderDayLabel:function(e,t){var a,n,s=this.isOutside(t),i=!0===t.current?this.color:void 0,o=this.dayFormatter(t,!1),d=this.$scopedSlots["day-label"],u=Object.assign({},{dayLabel:o},t,{miniMode:this.isMiniMode}),l=new Map,h=this.useDefaultTheme,c=this.isMiniMode&&this.selectedDates&&this.selectedDates.length>0&&this.selectedDates.includes(t.date),y=this.value===t.date;return!0===this.enableTheme&&(!0===s?(a="colorDayLabelOutside",n="backgroundDayLabelOutside"):!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),l=this.getThemeColors([a,n]),h=this.setBothColors),e(r.QBtn,h(void 0!==i?i:l.get(a),l.get(n),{staticClass:"q-calendar-weekly__day-label",class:[{"q-selected-date":c,"q-active-date":!0!==this.noActiveDate&&y}],props:{size:this.isMiniMode?"sm":this.monthLabelSize,unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:!0===t.disabled||!0===s},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),[d?d(u):o])},__renderDayOfYearLabel:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["day-of-year"],n=Object.assign({},t);return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month--day-of-year"}),a?a(n):t.doy)},__renderDayMonth:function(e,t){var r=!0===t.current?this.color:void 0,a=this.$scopedSlots["month-label"],n=this.monthFormatter(t,this.shortMonthLabel),s=Object.assign({},{monthLabel:n},t,{miniMode:this.isMiniMode});return e("div",this.setTextColor(r,{staticClass:"q-calendar-weekly__day-month"}),a?a(s):!0!==this.isMiniMode?n:"")}},render:function(e){return e("div",{staticClass:this.staticClass,on:{dragstart:function(e){e.preventDefault()}}},[!this.hideHeader&&this.__renderHead(e)].concat(this.__renderWeeks(e)))}}],computed:{parsedStart:function(){return _(D(this.start))},parsedEnd:function(){return k(D(this.end))}}},we={name:"resize",inserted:function(e,t){var r=t.value,a=t.options||{passive:!0};window.addEventListener("resize",r,a),e._onResize={callback:r,options:a},t.modifiers&&t.modifiers.quiet||r()},unbind:function(e){if(e._onResize){var t=e._onResize,r=t.callback,a=t.options;window.removeEventListener("resize",r,a),delete e._onResize}}},De={name:"QCalendarDaily",mixins:[{name:"CalendarWithIntervals",mixins:[_e],props:Object.assign({},ge.intervals),computed:{parsedIntervalStart:function(){return parseInt(this.intervalStart,10)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes,10)},parsedIntervalCount:function(){return parseInt(this.intervalCount,10)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},startMinute:function(){return this.parsedIntervalStart*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return K(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)},intervals:function(){var e=this.days,t=this.parsedIntervalStart,r=this.parsedIntervalMinutes,a=this.parsedIntervalCount,n=this.times.now;return 0===e.length&&console.error("QCalendar: days array has no content"),e.map(function(e){return J(e,t,r,a,n)})},intervalFormatter:function(){var e={timeZone:"UTC",hour12:!this.hour24Format,hour:"2-digit",minute:"2-digit"},t={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric",minute:"2-digit"},r={timeZone:"UTC",hour12:!this.hour24Format,hour:"numeric"};return ee(this.locale,function(a,n){return n?0===a.minute?r:t:e})}},methods:{showIntervalLabelDefault:function(e){var t=this.intervals[0][0];return!(t.hour===e.hour&&t.minute===e.minute)&&0===e.minute},intervalStyleDefault:function(e){},getTimestampAtEvent:function(e,t){var r=P(t),a=e.currentTarget.getBoundingClientRect(),n=this.startMinute,s=e,i=e,o=s.changedTouches||s.touches,d=((o&&o[0]?o[0].clientY:i.clientY)-a.top)/this.parsedIntervalHeight;return I(r,n+Math.floor(d*this.parsedIntervalMinutes),this.times.now)},getScopeForSlot:function(e,t){var r=P(e);return r.timeStartPos=this.timeStartPos,r.timeDurationHeight=this.timeDurationHeight,void 0!==t&&(r.index=t),r},scrollToTime:function(e){var t=this.timeStartPos(e),r=this.$refs.scrollArea;return!(!1===t||!r)&&(r.scrollTop=t,!0)},timeDurationHeight:function(e){return e/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=b(e);if(!1===r)return!1;var a=(r-this.startMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return t&&(a<0&&(a=0),a>this.bodyHeight&&(a=this.bodyHeight)),a}}}],directives:{Resize:we},data:function(){return{scrollWidth:0}},computed:{computedWidth:function(){return 100/this.days.length}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadIntervals(e)].concat(this.__renderHeadDays(e)))},__renderHeadIntervals:function(e){var t,r,a=this.$scopedSlots["intervals-header"],n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorIntervalHeader",r="backgroundIntervalHeader",n=this.getThemeColors([t,r]),s=this.setBothColors),e("div",s(n.get(t),n.get(r),{staticClass:"q-calendar-daily__intervals-head q-calendar-daily__intervals-head--text"}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["day-header"],d=this.getScopeForSlot(t,r),u=this.computedWidth,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),h=this.setBothColors),e("div",h(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-daily__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=this.$scopedSlots["day-header-label"],s=this.getScopeForSlot(t),i=!0===t.current?this.color:void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),o=this.getThemeColors([r,a]),d=this.setBothColors),e("div",d(void 0!==i?i:o.get(r),o.get(a),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[n&&n(s)||this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t){var a,n,s=!0===t.current?this.color:void 0,i=this.value===t.date,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorDayLabelPast",n="backgroundDayLabelPast"):!0===t.current?(a="colorDayLabelCurrent",n="backgroundDayLabelCurrent"):!0===t.future&&(a="colorDayLabelFuture",n="backgroundDayLabelFuture"),o=this.getThemeColors([a,n]),d=this.setBothColors),e(r.QBtn,d(void 0!==s?s:o.get(a),o.get(n),{staticClass:"q-calendar-daily__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&i}],style:{color:!0===t.current?s:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-daily__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-daily__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-daily__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{height:ke(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){var t=this.$scopedSlots["day-container"];return e("div",{staticClass:"q-calendar-daily__day-container"},[this.__renderBodyIntervals(e)].concat(this.__renderDays(e),[t&&t(this.days)]))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r,a){var n,s,i=this,o=this.$scopedSlots["day-body"],d=this.getScopeForSlot(t,a),u=this.computedWidth,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorBodyPast",s="backgroundBodyPast"):!0===t.current?(n="colorBodyCurrent",s="backgroundBodyCurrent"):!0===t.future&&(n="colorBodyFuture",s="backgroundBodyFuture"),l=this.getThemeColors([n,s]),h=this.setBothColors),e("div",h(l.get(n),l.get(s),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:this.getRelativeClasses(t),style:{maxWidth:u+"%"},on:this.getDefaultMouseEventHandlers(":time",function(e){return i.getScopeForSlot(i.getTimestampAtEvent(e,t),a)})}),this.__renderDayIntervals(e,r,a).concat([o&&o(d)]))},__renderDayIntervals:function(e,t,r){var a=this;return this.intervals[t].map(function(t){return a.__renderDayInterval(e,t,r)})},__renderDayInterval:function(e,t,r){var a,n=this,s=ke(this.intervalHeight),i=this.intervalStyle||this.intervalStyleDefault,o=this.$scopedSlots.interval,d=this.getScopeForSlot(t,r);return e("div",{key:t.time,staticClass:"q-calendar-daily__day-interval",class:{"q-calendar-daily__day-interval--droppable":a},style:Object.assign({},{height:s},i(t)),domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"interval"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"interval")}}},o?o(d):void 0)},__renderBodyIntervals:function(e){var t,r,a=this,n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorIntervalBody",r="backgroundIntervalBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return a.getTimestampAtEvent(e,a.parsedStart)})};return e("div",s(n.get(t),n.get(r),i),this.__renderIntervalLabels(e))},__renderIntervalLabels:function(e){var t=this;return this.intervals[0].map(function(r){return t.__renderIntervalLabel(e,r)})},__renderIntervalLabel:function(e,t){var r,a,n=ke(this.intervalHeight),s=this.shortIntervalLabel,i=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,s):void 0,o=new Map,d=this.useDefaultTheme;return!0===this.enableTheme&&(r="colorIntervalText",a="backgroundIntervalText",o=this.getThemeColors([r,a]),d=this.setBothColors),e("div",{key:t.time,staticClass:"q-calendar-daily__interval",style:{height:n}},[e("div",d(o.get(r),o.get(a),{staticClass:"q-calendar-daily__interval-text"}),i)])}},render:function(e){return e("div",{staticClass:"q-calendar-daily",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},Se={name:"QCalendarScheduler",mixins:[{name:"CalendarWithScheduler",mixins:[_e],props:Object.assign({},ge.scheduler),computed:{parsedResourceHeight:function(){return parseFloat(this.resourceHeight)},parsedResourceWidth:function(){return parseFloat(this.resourceWidth)},bodyHeight:function(){return this.resources&&this.resources.length>0?this.resources.length*this.parsedResourceHeight:0},days:function(){return K(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.disabledBefore,this.disabledAfter,this.disabledWeekdays,this.disabledDays,this.maxDays)}},methods:{resourceStyleDefault:function(e){},getTimestampAtEvent:function(e,t){return O(P(t),this.times.now,!1)},getScopeForSlot:function(e,t,r){var a={};return a.day=P(e),void 0!==t&&(a.index=t),void 0!==r&&(a.resource=r),a}}}],directives:{Resize:we},data:function(){return{scrollWidth:0}},mounted:function(){this.init()},watch:{noScroll:function(e){!0===e?this.scrollWidth=0:this.$nextTick(this.onResize)}},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollWidth=this.getScrollWidth()},getScrollWidth:function(){var e=this.$refs.scrollArea,t=this.$refs.pane;return e&&t?e.offsetWidth-t.offsetWidth:0},resourceStartPos:function(e,t){void 0===t&&(t=!0);var r=this.resource.indexOf(e)*this.parsedResourceHeight;return t&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r},__renderHead:function(e){return e("div",{staticClass:"q-calendar-scheduler__head",style:{marginRight:this.scrollWidth+"px"}},[this.__renderHeadResources(e)].concat(this.__renderHeadDays(e)))},__renderHeadResources:function(e){var t,r,a=this.$scopedSlots["scheduler-resources-header"],n=ke(this.resourceWidth),s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(t="colorSchedulerHeader",r="backgroundSchedulerHeader",s=this.getThemeColors([t,r]),i=this.setBothColors),e("div",i(s.get(t),s.get(r),{staticClass:"q-calendar-scheduler__resources-head q-calendar-scheduler__resources-head--text",style:{width:n}}),[a&&a(this.days)])},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)}):this.days.map(function(r){return t.__renderHeadDay(e,r)})},__renderHeadDay:function(e,t,r){var a,n,s,i=this,o=this.$scopedSlots["scheduler-day-header"],d=this.getScopeForSlot(t,r),u=100/this.days.length,l=new Map,h=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorHeaderPast",s="backgroundHeaderPast"):!0===t.current?(n="colorHeaderCurrent",s="backgroundHeaderCurrent"):!0===t.future&&(n="colorHeaderFuture",s="backgroundHeaderFuture"),l=this.getThemeColors([n,s]),h=this.setBothColors),e("div",h(l.get(n),l.get(s),{key:t.date+(void 0!==r?"-"+r:""),staticClass:"q-calendar-scheduler__head-day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-scheduler__head-day--droppable":a}),style:{maxWidth:u+"%"},domProps:{ondragover:function(e){void 0!==i.dragOverFunc&&(a=i.dragOverFunc(e,t,"day",r))},ondrop:function(e){void 0!==i.dropFunc&&i.dropFunc(e,t,"day",r)}},on:this.getDefaultMouseEventHandlers(":day",function(e){return d})}),[!0===this.columnHeaderBefore&&this.__renderColumnHeaderBefore(e,t,r),!0!==this.noDefaultHeaderText&&this.__renderHeadWeekday(e,t,r),!0!==this.noDefaultHeaderBtn&&this.__renderHeadDayBtn(e,t,r),o&&o(d),!0===this.columnHeaderAfter&&this.__renderColumnHeaderAfter(e,t,r)])},__renderHeadWeekday:function(e,t){var r,a,n=!0===t.current?this.color:void 0,s=new Map,i=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(r="colorDayLabelPast",a="backgroundDayLabelPast"):!0===t.current?(r="colorDayLabelCurrent",a="backgroundDayLabelCurrent"):!0===t.future&&(r="colorDayLabelFuture",a="backgroundDayLabelFuture"),s=this.getThemeColors([r,a]),i=this.setBothColors),e("div",i(void 0!==n?n:s.get(r),s.get(a),{staticClass:"ellipsis q-calendar-scheduler__head-weekday"}),[this.__renderHeadDayLabel(e,t,this.shortWeekdayLabel)])},__renderHeadDayLabel:function(e,t,r){return e("span",{staticClass:"ellipsis"},this.weekdayFormatter(t,r))},__renderHeadDayBtn:function(e,t,a){var n,s,i=!0===t.current?this.color:void 0,o=this.value===t.date,d={day:t,idx:a},u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(n="colorDayLabelPast",s="backgroundDayLabelPast"):!0===t.current?(n="colorDayLabelCurrent",s="backgroundDayLabelCurrent"):!0===t.future&&(n="colorDayLabelFuture",s="backgroundDayLabelFuture"),u=this.getThemeColors([n,s]),l=this.setBothColors),e(r.QBtn,l(void 0!==i?i:u.get(n),u.get(s),{staticClass:"q-calendar-scheduler__head-day-label",class:[{"q-active-date":!0!==this.noActiveDate&&o}],style:{color:!0===t.current?i:void 0},props:{unelevated:!0,round:!0,dense:!0,noCaps:!0,outline:!0===t.current,disable:t.disabled},on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return d})}),this.dayFormatter(t,!1))},__renderColumnHeaderBefore:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-before"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--before"},[a&&a(n)])},__renderColumnHeaderAfter:function(e,t,r){var a=this.$scopedSlots["scheduler-column-header-after"],n=Object.assign({},t);return n.index=r,e("div",{staticClass:"q-calendar-scheduler__column-header--after"},[a&&a(n)])},__renderBody:function(e){return e("div",{staticClass:"q-calendar-scheduler__body"},[this.__renderScrollArea(e)])},__renderScrollArea:function(e){return void 0!==this.noScroll&&!0===this.noScroll?this.__renderPane(e):e("div",{ref:"scrollArea",staticClass:"q-calendar-scheduler__scroll-area"},[this.__renderPane(e)])},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-scheduler__pane",style:{height:ke(this.bodyHeight)}},[this.__renderDayContainer(e)])},__renderDayContainer:function(e){return e("div",{staticClass:"q-calendar-scheduler__day-container"},[this.__renderBodyResources(e)].concat(this.__renderDays(e)))},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)}):this.days.map(function(r,a){return t.__renderDay(e,r,a)})},__renderDay:function(e,t,r){var a,n,s=100/this.days.length,i=new Map,o=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(a="colorBodyPast",n="backgroundBodyPast"):!0===t.current?(a="colorBodyCurrent",n="backgroundBodyCurrent"):!0===t.future&&(a="colorBodyFuture",n="backgroundBodyFuture"),i=this.getThemeColors([a,n]),o=this.setBothColors),e("div",o(i.get(a),i.get(n),{key:t.date+(void 0!==r?":"+r:""),staticClass:"q-calendar-scheduler__day",class:this.getRelativeClasses(t),style:{maxWidth:s+"%"}}),[].concat(this.__renderDayResources(e,t,r)))},__renderDayResources:function(e,t,r){var a=this;return this.resources.map(function(n){return a.__renderDayResource(e,n,t,r)})},__renderDayResource:function(e,t,r,a){var n,s=this,i=ke(this.resourceHeight),o=this.resourceStyle||this.resourceStyleDefault,d=this.$scopedSlots["scheduler-resource-day"],u=this.getScopeForSlot(r,a,t),l={height:i};return l=Object.assign(l,o(u)),e("div",{key:t[this.resourceKey]+"-"+a,staticClass:"q-calendar-scheduler__day-resource",class:{"q-calendar-scheduler__day-resource--droppable":n},style:l,domProps:{ondragover:function(e){void 0!==s.dragOverFunc&&(n=s.dragOverFunc(e,t,"resource",a))},ondrop:function(e){void 0!==s.dropFunc&&s.dropFunc(e,t,"resource",a)}},on:this.getDefaultMouseEventHandlers(":resource:day",function(e){return s.getScopeForSlot(s.getTimestampAtEvent(e,r),a,t)})},d?d(u):void 0)},__renderBodyResources:function(e){var t,r,a=ke(this.resourceWidth),n=new Map,s=this.useDefaultTheme;!0===this.enableTheme&&(t="colorSchedulerBody",r="backgroundSchedulerBody",n=this.getThemeColors([t,r]),s=this.setBothColors);var i={staticClass:"q-calendar-scheduler__resources-body",style:{width:a}};return e("div",s(n.get(t),n.get(r),i),this.__renderResourceLabels(e))},__renderResourceLabels:function(e){var t=this;return this.resources.map(function(r,a){return t.__renderResourceLabel(e,r,a)})},__renderResourceLabel:function(e,t,r){var a,n,s=this.$scopedSlots["scheduler-resource"],i={resource:t,index:r},o=ke(this.resourceHeight),d=t.label,u=new Map,l=this.useDefaultTheme;return!0===this.enableTheme&&(a="colorSchedulerText",n="backgroundSchedulerText",u=this.getThemeColors([a,n]),l=this.setBothColors),e("div",{key:t.label,staticClass:"q-calendar-scheduler__resource",style:{height:o},on:this.getDefaultMouseEventHandlers(":resource",function(e){return i})},[s?s(i):e("div",l(u.get(a),u.get(n),{staticClass:"q-calendar-scheduler__resource-text"}),d)])},__renderResourcesError:function(e){return e("div",{},"No resources have been defined")}},render:function(e){return e("div",{staticClass:"q-calendar-scheduler",directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&void 0!==this.resources&&this.__renderHead(e),void 0!==this.resources&&this.__renderBody(e),void 0===this.resources&&this.__renderResourcesError(e)])}},Te={name:"QCalendarAgenda",mixins:[De],props:Object.assign({},ge.agenda),computed:{computedColumnCount:function(){return this.days.length+(!0===this.leftColumnOptionsValid?this.leftColumnOptions.length:0)+(!0===this.rightColumnOptionsValid?this.rightColumnOptions.length:0)},computedWidth:function(){return 100/this.computedColumnCount},leftColumnOptionsValid:function(){return void 0!==this.leftColumnOptions&&Array.isArray(this.leftColumnOptions)},rightColumnOptionsValid:function(){return void 0!==this.rightColumnOptions&&Array.isArray(this.rightColumnOptions)}},methods:{__renderHead:function(e){return e("div",{staticClass:"q-calendar-daily__head",style:{marginRight:this.scrollWidth+"px"}},this.__renderHeadDays(e))},__renderHeadDays:function(e){var t=this;return 1===this.days.length&&void 0!==this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderHeadDay(e,t.days[0],r)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(r,a){return t.__renderColumnHead(e,r,a)}),this.days.map(function(r){return t.__renderHeadDay(e,r)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(r,a){return t.__renderColumnHead(e,r,a)})]},__renderPane:function(e){return e("div",{ref:"pane",staticClass:"q-calendar-daily__pane",style:{}},[this.__renderDayContainer(e)])},__renderBodyIntervals:function(e){},__renderColumnHead:function(e,t,r){var a,n=this,s=this.$scopedSlots["column-header"],i=t,o=this.computedWidth,d=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),u=this.setBothColors),e("div",u(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+(void 0!==r?"-"+r:""),staticClass:"q-calendar-daily__head-day",class:{"q-column-day":!0,"q-calendar-daily__head-day--droppable":a},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"column",r))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column",r)}},on:this.getDefaultMouseEventHandlers(":column:head",function(e){return i})}),[!0!==this.noDefaultHeaderText&&this.__renderHeadColumn(e,t),s&&s(i)])},__renderHeadColumn:function(e,t){var r=this.$scopedSlots["column-header-label"],a=t,n=new Map,s=this.useDefaultTheme;return!0===this.enableTheme&&(n=this.getThemeColors([void 0,void 0]),s=this.setBothColors),e("div",s(n.get(void 0),n.get(void 0),{staticClass:"ellipsis q-calendar-daily__head-weekday"}),[r&&r(a),!r&&this.__renderHeadColumnLabel(e,void 0!==this.columnOptionsLabel?t[this.columnOptionsLabel]:t.label)])},__renderHeadColumnLabel:function(e,t){return e("span",{staticClass:"ellipsis"},t)},__renderDays:function(e){var t=this;return 1===this.days.length&&this.columnCount&&parseInt(this.columnCount,10)>0?[Array.apply(null,new Array(parseInt(this.columnCount,10))).map(function(e,r){return r+parseInt(t.columnIndexStart,10)}).map(function(r){return t.__renderDay(e,t.days[0],0,r)})]:[!0===this.leftColumnOptionsValid&&this.leftColumnOptions.map(function(r,a){return t.__renderColumn(e,r,a)}),this.days.map(function(r,a){return t.__renderDay(e,r,a)}),!0===this.rightColumnOptionsValid&&this.rightColumnOptions.map(function(r,a){return t.__renderColumn(e,r,a)})]},__renderColumn:function(e,t,r){var a,n=this,s=this.$scopedSlots["column-body"],i=t,o=this.computedWidth,d=new Map,u=this.useDefaultTheme;return!0===this.enableTheme&&(d=this.getThemeColors([void 0,void 0]),u=this.setBothColors),e("div",u(d.get(void 0),d.get(void 0),{key:(void 0!==this.columnOptionsId?t[this.columnOptionsId]:t.id)+"-body-"+(void 0!==r?":"+r:""),staticClass:"q-calendar-daily__day",class:{"q-column-day":!0,"q-calendar-daily__day--droppable":a},style:{maxWidth:o+"%"},domProps:{ondragover:function(e){void 0!==n.dragOverFunc&&(a=n.dragOverFunc(e,t,"column"))},ondrop:function(e){void 0!==n.dropFunc&&n.dropFunc(e,t,"column")}},on:this.getDefaultMouseEventHandlers(":column",function(e){return i})}),[s&&s(i)])},__renderDay:function(e,t,r,a){var n,s,i,o=this,d=this.$scopedSlots["day-body"],u=Object.assign({},t),l=this.computedWidth,h=new Map,c=this.useDefaultTheme;return!0===this.enableTheme&&(!0===t.past?(s="colorBodyPast",i="backgroundBodyPast"):!0===t.current?(s="colorBodyCurrent",i="backgroundBodyCurrent"):!0===t.future&&(s="colorBodyFuture",i="backgroundBodyFuture"),h=this.getThemeColors([s,i]),c=this.setBothColors),e("div",c(h.get(s),h.get(i),{key:t.date+(void 0!==a?":"+a:""),staticClass:"q-calendar-daily__day",class:Object.assign({},this.getRelativeClasses(t),{"q-calendar-daily__day--droppable":n}),style:{maxWidth:l+"%"},domProps:{ondragover:function(e){void 0!==o.dragOverFunc&&(n=o.dragOverFunc(e,t,"day"))},ondrop:function(e){void 0!==o.dropFunc&&o.dropFunc(e,t,"day")}},on:this.getDefaultMouseEventHandlers(":time",function(e){return o.getScopeForSlot(o.getTimestampAtEvent(e,t),a)})}),[d&&d(u)])}},render:function(e){return e("div",{staticClass:"q-calendar-agenda",class:this.classes,directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[!this.hideHeader&&this.__renderHead(e),this.__renderBody(e)])}},He={name:"QCalendar",mixins:[_e],props:Object.assign({},ge.calendar,ge.weeks,ge.intervals,ge.scheduler,ge.agenda),data:function(){return{lastStart:void 0,lastEnd:void 0}},computed:{parsedValue:function(){return D(this.value)||this.parsedStart||this.times.today},renderProps:function(){var e=this.parsedValue,t="div",r=this.maxDays,a=e,n=e;switch(this.view){case"month":t=Ce,a=_(e),n=k(e);break;case"week":case"week-agenda":case"week-scheduler":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,a=this.getStartOfWeek(e),n=this.getEndOfWeek(e),r=this.weekdays.length;break;case"day":case"day-scheduler":case"day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,r=1,q(n=Z(P(n),z,r,this.weekdays));break;case"2day":case"2day-scheduler":case"2day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,r=2,q(n=Z(P(n),z,r,this.weekdays));break;case"3day":case"3day-scheduler":case"3day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,r=3,q(n=Z(P(n),z,r,this.weekdays));break;case"4day":case"4day-scheduler":case"4day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,r=4,q(n=Z(P(n),z,r,this.weekdays));break;case"5day":case"5day-scheduler":case"5day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,r=5,q(n=Z(P(n),z,r,this.weekdays));break;case"6day":case"6day-scheduler":case"6day-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,r=6,q(n=Z(P(n),z,r,this.weekdays));break;case"custom-interval":case"custom-scheduler":case"custom-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,q(n=Z(P(n),z,this.maxDays,this.weekdays));break;case"scheduler":case"agenda":t="scheduler"===this.view?Se:Te,q(n=Z(P(n),z,this.maxDays,this.weekdays));break;case"month-interval":case"month-scheduler":case"month-agenda":t=this.view.endsWith("-agenda")?Te:this.view.endsWith("-scheduler")?Se:De,a=_(e),q(n=k(e)),r=31}return{component:t,start:a,end:n,maxDays:r}}},beforeMount:function(){this.__checkChange()},watch:{renderProps:"__checkChange"},methods:{__checkChange:function(){var e=this.renderProps,t=e.start,r=e.end;this.keyValue=0,void 0!==this.lastStart&&void 0!==this.lastEnd&&t.date===this.lastStart&&r.date===this.lastEnd||(this.lastStart=t.date,this.lastEnd=r.date,this.$emit("change",{start:t,end:r})),this.keyValue=T(t)},move:function(e){void 0===e&&(e=1);var t=P(this.parsedValue),r=e>0,a=r?z:V,n=r?31:l,s=r?e:-e;this.direction=r?"next":"prev";this.maxDays;for(var i=this.weekdaySkips.filter(function(e){return 0!==e}).length;--s>=0;)switch(this.view){case"month":t.day=n,a(t);break;case"week":case"week-scheduler":case"week-agenda":case"scheduler":Z(t,a,i,this.weekdays);break;case"day":case"day-scheduler":case"day-agenda":Z(t,a,1,this.weekdays);break;case"2day":case"2day-scheduler":case"2day-agenda":Z(t,a,2,this.weekdays);break;case"3day":case"3day-scheduler":case"3day-agenda":Z(t,a,3,this.weekdays);break;case"4day":case"4day-scheduler":case"4day-agenda":Z(t,a,4,this.weekdays);break;case"5day":case"5day-scheduler":case"5day-agenda":Z(t,a,5,this.weekdays);break;case"6day":case"6day-scheduler":case"6day-agenda":Z(t,a,6,this.weekdays);break;case"custom-interval":case"custom-scheduler":case"custom-agenda":case"agenda":Z(t,a,this.maxDays,this.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":t.day=n,a(t)}W(t),q(t),B(t),O(t,this.times.now),this.$emit("input",t.date),this.$emit("moved",t)},next:function(e){void 0===e&&(e=1),this.move(e)},prev:function(e){void 0===e&&(e=1),this.move(-e)},timeStartPos:function(e,t){void 0===t&&(t=!0);var r=this.$children[0];return!(!r||!r.timeStartPos)&&r.timeStartPos(e,t)},timeDurationHeight:function(e){var t=this.$children[0];return t&&t.timeDurationHeight?t.timeDurationHeight(e):-1},scrollToTime:function(e){var t=this.$children[0];return!(!t||!t.scrollToTime)&&t.scrollToTime(e)},__renderComponent:function(e,t,r){return e(t,r)}},render:function(e){var t=this,r=this.renderProps,a=r.start,n=r.end,s=r.maxDays,i=r.component;this.keyValue=T(a);var o={staticClass:"q-calendar"+(!0===this.dark?" q-calendar--dark":""),class:{"q-calendar-daily__bordered":this.bordered},key:this.keyValue,props:Object.assign({},this.$props,{start:a.date,end:n.date,maxDays:s}),on:Object.assign({},this.$listeners,{"click:date":function(e){void 0!==t.$listeners.input&&(void 0!==e.date?t.$emit("input",e.date):void 0!==e.day&&void 0!==e.day.date&&t.$emit("input",e.day.date)),t.$listeners["click:date"]&&t.$emit("click:date",e)}}),scopedSlots:this.$scopedSlots};return!0===this.animated?e("transition",{props:{name:"q-transition--"+("prev"===this.direction?this.transitionPrev:this.transitionNext),appear:!0}},[this.__renderComponent(e,i,o)]):this.__renderComponent(e,i,o)}},Me={version:"1.5.4",QCalendar:He,PARSE_REGEX:a,PARSE_TIME:n,DAYS_IN_MONTH:s,DAYS_IN_MONTH_LEAP:i,DAYS_IN_MONTH_MIN:o,DAYS_IN_MONTH_MAX:31,MONTH_MAX:d,MONTH_MIN:u,DAY_MIN:l,DAYS_IN_WEEK:h,MINUTES_IN_HOUR:c,HOURS_IN_DAY:y,FIRST_HOUR:0,MILLISECONDS_IN_DAY:m,MILLISECONDS_IN_HOUR:36e5,MILLISECONDS_IN_MINUTE:6e4,Timestamp:v,TimeObject:f,getStartOfWeek:p,getEndOfWeek:g,getStartOfMonth:_,getEndOfMonth:k,parseTime:b,validateTimestamp:C,parsed:w,parseTimestamp:D,parseDate:S,getDayIdentifier:T,getTimeIdentifier:H,diffTimestamp:M,updateRelative:O,updateMinutes:I,updateWeekday:W,updateDayOfYear:B,updateWorkWeek:F,updateDisabled:L,updateFormatted:q,getDayOfYear:x,getWorkWeek:A,getWeekday:N,isLeapYear:E,daysInMonth:R,copyTimestamp:P,padNumber:$,getDate:j,getTime:Y,getDateTime:U,nextDay:z,prevDay:V,relativeDays:Z,moveRelativeDays:Q,findWeekday:X,getWeekdaySkips:G,createDayList:K,createIntervalList:J,createNativeLocaleFormatter:ee,makeDate:te,makeDateTime:re,validateNumber:ae,isBetweenDates:ne,isOverlappingDates:se,daysBetween:he,weeksBetween:ce,addToDate:ie,convertToUnit:ke,indexOf:be,install:function(e){e.component(He.name,He)}};t.use(Me),e.DAYS_IN_MONTH=s,e.DAYS_IN_MONTH_LEAP=i,e.DAYS_IN_MONTH_MAX=31,e.DAYS_IN_MONTH_MIN=o,e.DAYS_IN_WEEK=h,e.DAY_MIN=l,e.FIRST_HOUR=0,e.HOURS_IN_DAY=y,e.MILLISECONDS_IN_DAY=m,e.MILLISECONDS_IN_HOUR=36e5,e.MILLISECONDS_IN_MINUTE=6e4,e.MINUTES_IN_HOUR=c,e.MONTH_MAX=d,e.MONTH_MIN=u,e.PARSE_REGEX=a,e.PARSE_TIME=n,e.QCalendar=He,e.TimeObject=f,e.Timestamp=v,e.addToDate=ie,e.convertToUnit=ke,e.copyTimestamp=P,e.createDayList=K,e.createIntervalList=J,e.createNativeLocaleFormatter=ee,e.daysBetween=he,e.daysInMonth=R,e.diffTimestamp=M,e.findWeekday=X,e.getDate=j,e.getDateTime=U,e.getDayIdentifier=T,e.getDayOfYear=x,e.getEndOfMonth=k,e.getEndOfWeek=g,e.getStartOfMonth=_,e.getStartOfWeek=p,e.getTime=Y,e.getTimeIdentifier=H,e.getWeekday=N,e.getWeekdaySkips=G,e.getWorkWeek=A,e.indexOf=be,e.isBetweenDates=ne,e.isLeapYear=E,e.isOverlappingDates=se,e.makeDate=te,e.makeDateTime=re,e.moveRelativeDays=Q,e.nextDay=z,e.padNumber=$,e.parseDate=S,e.parseTime=b,e.parseTimestamp=D,e.parsed=w,e.prevDay=V,e.relativeDays=Z,e.updateDayOfYear=B,e.updateDisabled=L,e.updateFormatted=q,e.updateMinutes=I,e.updateRelative=O,e.updateWeekday=W,e.updateWorkWeek=F,e.validateNumber=ae,e.validateTimestamp=C,e.version="1.5.4",e.weeksBetween=ce,Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "@quasar/quasar-ui-qcalendar", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"author": "Jeff Galbraith <jeff@quasar.dev>", | ||
@@ -55,7 +55,7 @@ "description": "QCalendar - Embed Calendars, Schedules and Agendas in your Quasar Apps", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/preset-env": "^7.9.0", | ||
"@rollup/plugin-buble": "^0.21.1", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@rollup/plugin-json": "^4.0.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"@babel/preset-env": "^7.9.5", | ||
"@rollup/plugin-buble": "^0.21.3", | ||
"@rollup/plugin-commonjs": "^11.1.0", | ||
"@rollup/plugin-json": "^4.0.3", | ||
"@rollup/plugin-node-resolve": "^7.1.3", | ||
"@vue/eslint-config-standard": "^5.1.2", | ||
@@ -65,3 +65,3 @@ "autoprefixer": "^9.7.6", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^25.2.6", | ||
"babel-jest": "^25.4.0", | ||
"babel-plugin-transform-relative-paths": "^0.1.0", | ||
@@ -72,3 +72,3 @@ "chalk": "^4.0.0", | ||
"eslint": "^6.8.0", | ||
"eslint-loader": "^4.0.0", | ||
"eslint-loader": "^4.0.2", | ||
"eslint-plugin-import": "^2.20.2", | ||
@@ -80,6 +80,6 @@ "eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-vue": "^6.2.2", | ||
"jest": "^25.2.7", | ||
"jest": "^25.4.0", | ||
"jest-serializer-vue": "^2.0.2", | ||
"jest-transform-stub": "^2.0.0", | ||
"node-sass": "^4.13.1", | ||
"node-sass": "^4.14.0", | ||
"open": "^7.0.3", | ||
@@ -89,6 +89,6 @@ "postcss": "^7.0.27", | ||
"promise": "^8.1.0", | ||
"quasar": "^1.9.13", | ||
"quasar": "^1.9.16", | ||
"quasar-json-api": "^0.0.21", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.3.3", | ||
"rollup": "^2.7.2", | ||
"uglify-es": "^3.3.9", | ||
@@ -95,0 +95,0 @@ "vue-jest": "^3.0.5", |
@@ -196,3 +196,3 @@ // Quasar | ||
style: { | ||
height: this.dayHeight && this.dayHeight > 0 ? height : (this.isMiniMode ? 'auto' : '100px') | ||
height: this.dayHeight && this.dayHeight > 0 ? height : (this.isMiniMode ? 'auto' : 'auto') | ||
} | ||
@@ -312,3 +312,3 @@ }, [ | ||
h('div', { | ||
staticClass: 'full-width' + (this.isMiniMode === true ? ' row justify-around' : '') | ||
staticClass: 'q-calendar-weekly__day--content full-width' + (this.isMiniMode === true ? ' row justify-around' : '') | ||
}, slot ? slot(slotData) : '') | ||
@@ -315,0 +315,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 too big to display
Sorry, the diff of this file is not supported yet
854384
14474