Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quasar/quasar-ui-qcalendar

Package Overview
Dependencies
Maintainers
6
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quasar/quasar-ui-qcalendar - npm Package Compare versions

Comparing version 4.0.0-beta.2 to 4.0.0-beta.3

4

dist/QCalendarAgenda.esm.min.js
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],l=42,d=0){const s=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===s;if(s<getDayIdentifier(e))return c;while((!p||c.length<d)&&c.length<l){if(m=getDayIdentifier(v),p=p||m>s&&c.length>=d,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=copyTimestamp(t);u.push(updateMinutes(l,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=reactive({width:0,height:0}),o=ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),u=computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),l=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:l}){const d=computed(()=>parseInt(o.intervalStart,10)),p=computed(()=>parseInt(o.intervalMinutes,10)),s=computed(()=>parseInt(o.intervalCount,10)),y=computed(()=>parseFloat(o.intervalHeight)),m=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&l.value&&(e=l.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),f=computed(()=>d.value*p.value),c=computed(()=>s.value*y.value),v=computed(()=>s.value*m.value),h=computed(()=>k(a.value)),g=computed(()=>b(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,p.value,s.value,t.now))});function k(e){return getStartOfWeek(e,o.weekdays,t.today)}function b(e){return getEndOfWeek(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function O(e){}function A(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=f.value,i=e,l=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:l).clientY,c=(s-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function F(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=f.value,i=e,l=e,d=i.changedTouches||i.touches,s=(d&&d[0]?d[0]:l).clientY,c=(s-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return updateMinutes(r,m,n)}function H(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/m.value,c=Math.floor((a?Math.floor(s):s)*p.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function x(e,t){const a={timestamp:e};return a.timeStartPos=U,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function q(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=B,a.timeDurationWidth=z,void 0!==t&&(a.index=t),a}function W(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function R(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/p.value*y.value}function z(e){return e/p.value*m.value}function Y(e){return parseInt(e,10)*p.value/y.value}function P(e){return parseInt(e,10)*p.value/m.value}function U(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=s.value*p.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=s.value*p.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:p,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:m,parsedStartMinute:f,bodyHeight:c,bodyWidth:v,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:C,arrayHasDateTime:_,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:N,styleDefault:O,getTimestampAtEventInterval:A,getTimestampAtEvent:F,getTimestampAtEventX:H,getScopeForSlot:x,getScopeForSlotX:q,scrollToTime:W,scrollToTimeX:R,timeDurationHeight:L,timeDurationWidth:z,heightToMinutes:Y,widthToMinutes:P,timeStartPos:U,timeStartPosX:B}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:l,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:b();break;case 35:T();break;case 36:_();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);s.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);s.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));s.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarAgenda=defineComponent({name:"QCalendarAgenda",directives:[ResizeObserver$1],props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(v,{slots:m,emit:i,expose:e}){const t=ref(null),a=ref(null),n=ref(null),p=ref(null),r=ref(null),y=ref({}),o=ref({}),u=ref({}),l=ref("next"),d=ref(today()),s=ref("0000-00-00"),c=ref(0),f=ref(v.modelValue),g=reactive({width:0,height:0}),w=ref(!1),D=ref(null),k=ref(null),b=computed(()=>{if("month"===v.view)return"month-interval";return v.view}),_=getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:T}=useEmitListeners(_),{isSticky:I}=useCellWidth(v);watch(I,e=>{});const{times:M,setCurrent:S,updateCurrent:C}=useTimes(v);C(),S();const{weekdaySkips:E,parsedStart:N,parsedEnd:O,dayFormatter:A,weekdayFormatter:F,ariaDateFormatter:H,dayStyleDefault:x,getRelativeClasses:q}=useCommon(v,{startDate:d,endDate:s,times:M}),W=computed(()=>{return parseTimestamp(v.modelValue,M.now)||N.value||M.today});r.value=W.value,p.value=W.value.date;const R=computed(()=>{if(0===c.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===B.value||0===B.value.length)return!0;const e=B.value[0];const t=B.value[B.value.length-1];return!0!==isBetweenDates(W.value,e,t)}),{renderValues:L}=useRenderValues(v,{parsedView:b,times:M,parsedValue:W}),{rootRef:z,scrollWidth:Y,__initCalendar:P,__renderCalendar:U}=useCalendar(v,Ee,{scrollArea:t,pane:a}),{days:B,parsedCellWidth:j,getScopeForSlot:V}=useInterval(v,{weekdaySkips:E,times:M,scrollArea:t,parsedStart:N,parsedEnd:O,maxDays:c,size:g,headerColumnRef:n}),{move:X}=useMove(v,{parsedView:b,parsedValue:W,weekdaySkips:E,direction:l,maxDays:c,times:M,emittedValue:f,emit:i}),{getDefaultMouseEventHandlers:$}=useMouse(i,T),{checkChange:K}=useCheckChange(i,{days:B,lastStart:D,lastEnd:k}),{isKeyCode:Z}=useEvents(),{tryFocus:Q}=useKeyboard(v,{rootRef:z,focusRef:p,focusValue:r,datesRef:y,days:B,parsedView:b,parsedValue:W,emittedValue:f,weekdaySkips:E,direction:l,times:M}),G=computed(()=>{return B.value.length+(!0===J.value?v.leftColumnOptions.length:0)+(!0===ee.value?v.rightColumnOptions.length:0)+B.value.length===1&&parseInt(v.columnCount,10)>0?parseInt(v.columnCount,10):0}),J=computed(()=>{return void 0!==v.leftColumnOptions&&Array.isArray(v.leftColumnOptions)}),ee=computed(()=>{return void 0!==v.rightColumnOptions&&Array.isArray(v.rightColumnOptions)}),te=computed(()=>{if(z.value){const e=g.width||z.value.getBoundingClientRect().width;if(e&&G.value)return(e-Y.value)/G.value+"px"}return 100/G.value+"%"});function ae(){f.value=today()}function ne(e=1){X(e)}function re(e=1){X(-e)}function oe({width:e,height:t}){g.width=e,g.height=t}function ue(e){return e.date===f.value}function ie(a,n){const e=m["head-column"],t={column:a,index:n,days:B.value},r=!0===I.value?v.cellWidth:te.value,o=!0===v.focusable&&v.focusType.includes("weekday"),u=void 0!==v.columnOptionsId?a[v.columnOptionsId]:void 0,i={maxWidth:r,width:r};return h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-column",t)?w.value=u:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-column",t)?w.value=u:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-column",t)?w.value=u:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-column",t)?w.value=u:w.value="")},...$("-head-column",(e,t)=>{return{scope:{column:a,index:n},event:e}})},[!0!==v.noDefaultHeaderText&&le(a),e&&e(t),useFocusHelper()])}function le(e){const t=m["head-column-label"],a={column:e},n=void 0!==v.columnOptionsLabel?e[v.columnOptionsLabel]:e.label,r=h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&h("span",{class:"ellipsis"},n)]);return"stacked"===v.dateHeader?r:h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function de(){return h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===I.value},style:{marginRight:Y.value+"px"}},[se()])}function se(){return h("div",{ref:n,class:{"q-calendar-agenda__head--days__column":!0}},[ce(),ve()])}function ce(){return h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...me()])}function ve(){const e=m["head-days-events"];return nextTick(()=>{if(u.value&&0===v.columnCount&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:B.value,ref:u}})]),...pe()])}function me(){return 1===B.value.length&&parseInt(v.columnCount,10)>0?[!0===J.value&&v.leftColumnOptions.map((e,t)=>ie(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>ye(B.value[0],e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>ie(e,t))]:[!0===J.value&&v.leftColumnOptions.map((e,t)=>ie(e,t)),B.value.map(e=>ye(e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>ie(e,t))]}function pe(){return 1===B.value.length&&parseInt(v.columnCount,10)>0?[Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>he(B.value[0],e))]:B.value.map(e=>he(e))}function ye(t,e){const a=m["head-day"],n=m["head-date"],r=!0!==v.noActiveDate&&ue(t),o=V(t,e);o.activeDate=r,o.droppable=w.value===t.date;const u=!0===I.value?v.cellWidth:te.value,i=v.weekdayStyle||x,l={width:u,maxWidth:u,...i({scope:o})};!0===I.value&&(l.minWidth=u);const d="function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{},s=!0===v.focusable&&v.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...d,...q(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")},onFocus:e=>{!0===s&&(p.value=t.date)},...$("-head-day",e=>{return{scope:o,event:e}})};return h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function fe(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&ge(e),!0!==v.noDefaultHeaderBtn&&De(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&ge(e),!0!==v.noDefaultHeaderBtn&&De(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&De(e),!0!==v.noDefaultHeaderText&&ge(e)])):void 0}function he(e,t){const a=m["head-day-event"],n=!0!==v.noActiveDate&&ue(e),r=V(e,t);r.activeDate=n;const o=!0===I.value?v.cellWidth:te.value,u={width:o,maxWidth:o};return!0===I.value&&(u.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...q(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function ge(e){const t=m["head-weekday-label"],a=V(e);a.shortWeekdayLabel=v.shortWeekdayLabel;const n={class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",n,t&&t({scope:a})||we(e,v.shortWeekdayLabel))}function we(e,t){const a=F.value(e,t||v.weekdayBreakpoints[0]>0&&j.value<=v.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&j.value<=v.weekdayBreakpoints[1]?minCharWidth(a,v.minWeekdayLabel):a)}function De(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return h("div",t,ke(e))}function ke(a){const e=!0!==v.noActiveDate&&ue(a),t=A.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Z(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Z(e,[13,32])&&(f.value=a.date,void 0!==T.value.onClickDate&&i("click-date",{scope:o}))},...$("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==v.noAria&&(u.ariaLabel=H.value(a)),r?r({scope:o}):useButton(v,u,n?n({scope:o}):t)}function be(){return h("div",{class:"q-calendar-agenda__body"},[_e()])}function _e(){return!0===I.value?h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Ie()]):!0===v.noScroll?Te():h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Te()])}function Te(){return h("div",{ref:a,class:"q-calendar-agenda__pane"},[Ie()])}function Ie(){const e=m["day-container"];return h("div",{class:"q-calendar-agenda__day-container"},[!0===I.value&&!0!==v.noHeader&&de(),h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Me()]),e&&e({scope:{days:B.value}})])}function Me(){return 1===B.value.length&&parseInt(v.columnCount,10)>0?[!0===J.value&&v.leftColumnOptions.map((e,t)=>Se(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Ce(B.value[0],0,e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>Se(e,t))]:[!0===J.value&&v.leftColumnOptions.map((e,t)=>Se(e,t)),B.value.map((e,t)=>Ce(e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>Se(e,t))]}function Se(e,t){const a=m.column,n={column:e,days:B.value,index:t},r=!0===I.value?v.cellWidth:te.value,o=!0===v.focusable&&v.focusType.includes("day"),u=void 0!==v.columnOptionsId?e[v.columnOptionsId]:void 0;return h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"column",n)?w.value=u:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"column",n)?w.value=u:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"column",n)?w.value=u:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"column",n)?w.value=u:w.value="")},...$("-column",(e,t)=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Ce(e,t,a){const n=m.day,r=V(e,a),o=!0===I.value?v.cellWidth:te.value,u={width:o,maxWidth:o};return!0===I.value&&(u.minWidth=o),u.height=parseInt(v.dayHeight,10)>0?convertToUnit(parseInt(v.dayHeight,10)):"auto",parseInt(v.dayMinHeight,10)>0&&(u.minHeight=convertToUnit(parseInt(v.dayMinHeight,10))),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...q(e)},style:u},[n&&n({scope:r})])}function Ee(){if(R.value){const{start:a,end:n,maxDays:r}=L.value;d.value=a.date,s.value=n.date,c.value=r}const e=g.width>0,t=withDirectives(h("div",{class:"q-calendar-agenda",key:d.value},[!0===e&&!0!==I.value&&!0!==v.noHeader&&de(),!0===e&&be()]),[[ResizeObserver$1,oe]]);if(!0!==v.animated)return t;{const o="q-calendar--"+("prev"===l.value?v.transitionPrev:v.transitionNext);return h(Transition,{name:o,appear:!0},()=>t)}}return watch([B],K,{deep:!0,immediate:!0}),watch(()=>v.modelValue,(e,t)=>{if(f.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));l.value=a>=n?"next":"prev"}f.value=e}p.value=e}),watch(f,(e,t)=>{if(f.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));l.value=a>=n?"next":"prev"}i("update:model-value",e)}}),watch(p,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{y.value[p.value]?y.value[p.value].focus():Q()}),watch(()=>v.maxDays,e=>{c.value=e}),onBeforeUpdate(()=>{y.value={}}),onMounted(()=>{P()}),e({prev:re,next:ne,move:X,moveToToday:ae,updateCurrent:C}),()=>U()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,install(e){e.component(QCalendarAgenda.name,QCalendarAgenda)}};export default Plugin;export{QCalendarAgenda,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],l=42,d=0){const s=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===s;if(s<getDayIdentifier(e))return c;while((!p||c.length<d)&&c.length<l){if(m=getDayIdentifier(v),p=p||m>s&&c.length>=d,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=copyTimestamp(t);u.push(updateMinutes(l,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=reactive({width:0,height:0}),o=ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),u=computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),l=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useAgendaProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:40,validator:validateNumber}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:l}){const d=computed(()=>parseInt(o.intervalStart,10)),v=computed(()=>parseInt(o.intervalMinutes,10)),s=computed(()=>parseInt(o.intervalCount,10)),m=computed(()=>parseFloat(o.intervalHeight)),p=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&l.value&&(e=l.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=computed(()=>d.value*v.value),y=computed(()=>s.value*m.value),f=computed(()=>s.value*p.value),h=computed(()=>k(a.value)),g=computed(()=>b(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,v.value,s.value,t.now))});function k(e){return getStartOfWeek(e,o.weekdays,t.today)}function b(e){return getEndOfWeek(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),C=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function N(e){}function O(e){}function A(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function F(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function H(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/p.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=U,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function q(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=B,a.timeDurationWidth=z,void 0!==t&&(a.index=t),a}function W(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function R(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function z(e){return e/v.value*p.value}function Y(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/p.value}function U(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value&&(u=f.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:C,arrayHasDateTime:_,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:N,styleDefault:O,getTimestampAtEventInterval:A,getTimestampAtEvent:F,getTimestampAtEventX:H,getScopeForSlot:x,getScopeForSlotX:q,scrollToTime:W,scrollToTimeX:R,timeDurationHeight:L,timeDurationWidth:z,heightToMinutes:Y,widthToMinutes:P,timeStartPos:U,timeStartPosX:B}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:l,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:b();break;case 35:T();break;case 36:_();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);s.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);s.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));s.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarAgenda=defineComponent({name:"QCalendarAgenda",directives:[ResizeObserver$1],props:{...useCommonProps,...useAgendaProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(v,{slots:m,emit:i,expose:e}){const t=ref(null),a=ref(null),n=ref(null),p=ref(null),r=ref(null),y=ref({}),o=ref({}),u=ref({}),l=ref("next"),d=ref(today()),s=ref("0000-00-00"),c=ref(0),f=ref(v.modelValue),g=reactive({width:0,height:0}),w=ref(!1),D=ref(null),k=ref(null),b=computed(()=>{if("month"===v.view)return"month-interval";return v.view}),_=getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:T}=useEmitListeners(_),{isSticky:I}=useCellWidth(v);watch(I,e=>{});const{times:M,setCurrent:S,updateCurrent:C}=useTimes(v);C(),S();const{weekdaySkips:E,parsedStart:N,parsedEnd:O,dayFormatter:A,weekdayFormatter:F,ariaDateFormatter:H,dayStyleDefault:x,getRelativeClasses:q}=useCommon(v,{startDate:d,endDate:s,times:M}),W=computed(()=>{return parseTimestamp(v.modelValue,M.now)||N.value||M.today});r.value=W.value,p.value=W.value.date;const R=computed(()=>{if(0===c.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===B.value||0===B.value.length)return!0;const e=B.value[0];const t=B.value[B.value.length-1];return!0!==isBetweenDates(W.value,e,t)}),{renderValues:L}=useRenderValues(v,{parsedView:b,times:M,parsedValue:W}),{rootRef:z,scrollWidth:Y,__initCalendar:P,__renderCalendar:U}=useCalendar(v,Ee,{scrollArea:t,pane:a}),{days:B,parsedCellWidth:j,getScopeForSlot:V}=useInterval(v,{weekdaySkips:E,times:M,scrollArea:t,parsedStart:N,parsedEnd:O,maxDays:c,size:g,headerColumnRef:n}),{move:X}=useMove(v,{parsedView:b,parsedValue:W,weekdaySkips:E,direction:l,maxDays:c,times:M,emittedValue:f,emit:i}),{getDefaultMouseEventHandlers:$}=useMouse(i,T),{checkChange:K}=useCheckChange(i,{days:B,lastStart:D,lastEnd:k}),{isKeyCode:Z}=useEvents(),{tryFocus:Q}=useKeyboard(v,{rootRef:z,focusRef:p,focusValue:r,datesRef:y,days:B,parsedView:b,parsedValue:W,emittedValue:f,weekdaySkips:E,direction:l,times:M}),G=computed(()=>{return B.value.length+(!0===J.value?v.leftColumnOptions.length:0)+(!0===ee.value?v.rightColumnOptions.length:0)+B.value.length===1&&parseInt(v.columnCount,10)>0?parseInt(v.columnCount,10):0}),J=computed(()=>{return void 0!==v.leftColumnOptions&&Array.isArray(v.leftColumnOptions)}),ee=computed(()=>{return void 0!==v.rightColumnOptions&&Array.isArray(v.rightColumnOptions)}),te=computed(()=>{if(z.value){const e=g.width||z.value.getBoundingClientRect().width;if(e&&G.value)return(e-Y.value)/G.value+"px"}return 100/G.value+"%"});function ae(){f.value=today()}function ne(e=1){X(e)}function re(e=1){X(-e)}function oe({width:e,height:t}){g.width=e,g.height=t}function ue(e){return e.date===f.value}function ie(a,n){const e=m["head-column"],t={column:a,index:n,days:B.value},r=!0===I.value?v.cellWidth:te.value,o=!0===v.focusable&&v.focusType.includes("weekday"),u=void 0!==v.columnOptionsId?a[v.columnOptionsId]:void 0,i={maxWidth:r,width:r};return h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:i,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-column",t)?w.value=u:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-column",t)?w.value=u:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-column",t)?w.value=u:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-column",t)?w.value=u:w.value="")},...$("-head-column",(e,t)=>{return{scope:{column:a,index:n},event:e}})},[!0!==v.noDefaultHeaderText&&le(a),e&&e(t),useFocusHelper()])}function le(e){const t=m["head-column-label"],a={column:e},n=void 0!==v.columnOptionsLabel?e[v.columnOptionsLabel]:e.label,r=h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&h("span",{class:"ellipsis"},n)]);return"stacked"===v.dateHeader?r:h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function de(){return h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===I.value},style:{marginRight:Y.value+"px"}},[se()])}function se(){return h("div",{ref:n,class:{"q-calendar-agenda__head--days__column":!0}},[ce(),ve()])}function ce(){return h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...me()])}function ve(){const e=m["head-days-events"];return nextTick(()=>{if(u.value&&0===v.columnCount&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:B.value,ref:u}})]),...pe()])}function me(){return 1===B.value.length&&parseInt(v.columnCount,10)>0?[!0===J.value&&v.leftColumnOptions.map((e,t)=>ie(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>ye(B.value[0],e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>ie(e,t))]:[!0===J.value&&v.leftColumnOptions.map((e,t)=>ie(e,t)),B.value.map(e=>ye(e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>ie(e,t))]}function pe(){return 1===B.value.length&&parseInt(v.columnCount,10)>0?[Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>he(B.value[0],e))]:B.value.map(e=>he(e))}function ye(t,e){const a=m["head-day"],n=m["head-date"],r=!0!==v.noActiveDate&&ue(t),o=V(t,e);o.activeDate=r,o.droppable=w.value===t.date;const u=!0===I.value?v.cellWidth:te.value,i=v.weekdayStyle||x,l={width:u,maxWidth:u,...i({scope:o})};!0===I.value&&(l.minWidth=u);const d="function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{},s=!0===v.focusable&&v.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...d,...q(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")},onFocus:e=>{!0===s&&(p.value=t.date)},...$("-head-day",e=>{return{scope:o,event:e}})};return h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),useFocusHelper()])}function fe(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&ge(e),!0!==v.noDefaultHeaderBtn&&De(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&ge(e),!0!==v.noDefaultHeaderBtn&&De(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&De(e),!0!==v.noDefaultHeaderText&&ge(e)])):void 0}function he(e,t){const a=m["head-day-event"],n=!0!==v.noActiveDate&&ue(e),r=V(e,t);r.activeDate=n;const o=!0===I.value?v.cellWidth:te.value,u={width:o,maxWidth:o};return!0===I.value&&(u.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...q(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function ge(e){const t=m["head-weekday-label"],a=V(e);a.shortWeekdayLabel=v.shortWeekdayLabel;const n={class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",n,t&&t({scope:a})||we(e,v.shortWeekdayLabel))}function we(e,t){const a=F.value(e,t||v.weekdayBreakpoints[0]>0&&j.value<=v.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&j.value<=v.weekdayBreakpoints[1]?minCharWidth(a,v.minWeekdayLabel):a)}function De(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return h("div",t,ke(e))}function ke(a){const e=!0!==v.noActiveDate&&ue(a),t=A.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Z(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Z(e,[13,32])&&(f.value=a.date,void 0!==T.value.onClickDate&&i("click-date",{scope:o}))},...$("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==v.noAria&&(u.ariaLabel=H.value(a)),r?r({scope:o}):useButton(v,u,n?n({scope:o}):t)}function be(){return h("div",{class:"q-calendar-agenda__body"},[_e()])}function _e(){return!0===I.value?h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Ie()]):!0===v.noScroll?Te():h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Te()])}function Te(){return h("div",{ref:a,class:"q-calendar-agenda__pane"},[Ie()])}function Ie(){const e=m["day-container"];return h("div",{class:"q-calendar-agenda__day-container"},[!0===I.value&&!0!==v.noHeader&&de(),h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...Me()]),e&&e({scope:{days:B.value}})])}function Me(){return 1===B.value.length&&parseInt(v.columnCount,10)>0?[!0===J.value&&v.leftColumnOptions.map((e,t)=>Se(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Ce(B.value[0],0,e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>Se(e,t))]:[!0===J.value&&v.leftColumnOptions.map((e,t)=>Se(e,t)),B.value.map((e,t)=>Ce(e)),!0===ee.value&&v.rightColumnOptions.map((e,t)=>Se(e,t))]}function Se(e,t){const a=m.column,n={column:e,days:B.value,index:t},r=!0===I.value?v.cellWidth:te.value,o=!0===v.focusable&&v.focusType.includes("day"),u=void 0!==v.columnOptionsId?e[v.columnOptionsId]:void 0;return h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"column",n)?w.value=u:w.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"column",n)?w.value=u:w.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"column",n)?w.value=u:w.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"column",n)?w.value=u:w.value="")},...$("-column",(e,t)=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Ce(e,t,a){const n=m.day,r=V(e,a),o=!0===I.value?v.cellWidth:te.value,u={width:o,maxWidth:o};return!0===I.value&&(u.minWidth=o),u.height=parseInt(v.dayHeight,10)>0?convertToUnit(parseInt(v.dayHeight,10)):"auto",parseInt(v.dayMinHeight,10)>0&&(u.minHeight=convertToUnit(parseInt(v.dayMinHeight,10))),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...q(e)},style:u},[n&&n({scope:r})])}function Ee(){if(R.value){const{start:a,end:n,maxDays:r}=L.value;d.value=a.date,s.value=n.date,c.value=r}const e=g.width>0,t=withDirectives(h("div",{class:"q-calendar-agenda",key:d.value},[!0===e&&!0!==I.value&&!0!==v.noHeader&&de(),!0===e&&be()]),[[ResizeObserver$1,oe]]);if(!0!==v.animated)return t;{const o="q-calendar--"+("prev"===l.value?v.transitionPrev:v.transitionNext);return h(Transition,{name:o,appear:!0},()=>t)}}return watch([B],K,{deep:!0,immediate:!0}),watch(()=>v.modelValue,(e,t)=>{if(f.value!==e){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));l.value=a>=n?"next":"prev"}f.value=e}p.value=e}),watch(f,(e,t)=>{if(f.value!==v.modelValue){if(!0===v.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));l.value=a>=n?"next":"prev"}i("update:model-value",e)}}),watch(p,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{y.value[p.value]?y.value[p.value].focus():Q()}),watch(()=>v.maxDays,e=>{c.value=e}),onBeforeUpdate(()=>{y.value={}}),onMounted(()=>{P()}),e({prev:re,next:ne,move:X,moveToToday:ae,updateCurrent:C}),()=>U()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarAgenda:QCalendarAgenda,install(e){e.component(QCalendarAgenda.name,QCalendarAgenda)}};export default Plugin;export{QCalendarAgenda,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarAgenda={},e.Vue))})(this,function(e,Te){"use strict";const 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?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,m=31,l=12,u=1,p=1,i=7,d=60,s=24,c=6048e5;function Ae(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,x(t,2),x(a,2)].join("-")}function P(e,t,a){let n=Q(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=I(n);return n=M(n,t[0],O),n=k(n),a&&(n=Z(n,a,n.hasTime)),n}function Y(e,t,a){let n=Q(e);const r=S(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=O(n);return n=M(n,t[t.length-1],I),n=k(n),a&&(n=Z(n,a,n.hasTime)),n}function q(e){const t=Q(e);return t.day=p,k(t),t}function F(e){const t=Q(e);return t.day=S(t.year,t.month),k(t),t}function $(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=n.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!a.exec(e)}function Ie(e){const t=a.exec(e);return t?{date:e,time:x(parseInt(t[6],10)||0,2)+":"+x(parseInt(t[8],10)||0,2),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 Oe(e,t){let a=Ie(e);return null===a?null:(a=k(a),t&&Z(a,t,a.hasTime),a)}function f(e){return k({date:x(e.getFullYear(),4)+"-"+x(e.getMonth()+1,2)+"-"+x(e.getDate(),2),time:x(e.getHours()||0,2)+":"+x(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Ee(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function h(e){return 100*e.hour+e.minute}function X(e){return Ee(e)+h(e)}function Z(e,t,a=!1){let n=Ee(t),r=Ee(e),o=n===r;return e.hasTime&&a&&o&&(n=h(t),r=h(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function K(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/d),e.minute=t%d,e.time=A(e),a&&Z(e,a,!0),e}function g(e){return e.weekday=_(e),e}function w(e){return e.doy=y(e),e}function b(e,t,a,n,r){const o=Ee(e);if(void 0!==t){const u=Ee(Ie(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ee(Ie(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=Ie(r[d][0]),c=Ie(r[d][1]);if(He(e,s,c)){e.disabled=!0;break}}else{const v=Ee(Oe(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=A(e),e.date=T(e),e.weekday=_(e),e.doy=y(e),e.workweek=D(e),e}function y(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 D(e){let t;if(t=0===e.year?Date.UTC(new Date):j(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/c;return 1+Math.floor(o)}function _(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function C(e){return 1===(e%4===0^e%100===0^e%400===0)}function S(e,t){return(C(e)?o:r)[t]}function Q(e){return{...e}}function x(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function T(e){let t=`${x(e.year,4)}-${x(e.month,2)}`;return e.hasDay&&(t+=`-${x(e.day,2)}`),t}function A(e){return e.hasTime?`${x(e.hour,2)}:${x(e.minute,2)}`:""}function G(e){return T(e)+" "+(e.hasTime?A(e):"00:00")}function I(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>t&&e.day>S(e.year,e.month)&&(e.day=p,++e.month,e.month>l&&(e.month=u,++e.year)),e}function O(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<p&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=S(e.year,e.month)),e}function E(e,t=I,a=1,n=[0,1,2,3,4,5,6]){return H(e,t,a,n)}function H(e,t=I,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==I||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function M(e,t,a=I,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function W(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<i;++a){let t=1;for(let e=1;e<i;++e){const r=(a+e)%i;if(n[r])break;++t}e[a]=n[a]*t}return e}function J(e,t,a,n,r,o,u=[],l=[],i=42,d=0){const s=Ee(t),c=[];let v=Q(e),f=0,h=f===s;if(s<Ee(e))return c;while((!h||c.length<d)&&c.length<i){if(f=Ee(v),h=h||f>s&&c.length>=d,h)break;if(0!==n[v.weekday]){const y=Q(v);k(y),Z(y,a),b(y,r,o,u,l),c.push(y),v=H(v,I)}else v=H(v,I)}return c}function ee(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,i=Q(t);u.push(K(i,l,o))}return u}function te(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(L(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${G(t)}`),""}}}function j(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function L(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function B(e){return isFinite(parseInt(e,10))}function He(e,t,a,n){const r=Ee(e)+(!0===n?h(e):0),o=Ee(t)+(!0===n?h(t):0),u=Ee(a)+(!0===n?h(a):0);return r>=o&&r<=u}function ae(e,t){const n=Q(e);let r;return V(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=R.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&re(n,R[r]),k(n),n}const R=["minute","hour","day","month"];function V(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function N(e){if(e.minute>=d||e.minute<0){const t=Math.floor(e.minute/d);e.minute-=t*d,e.hour+=t,z(e)}return e}function z(e){if(e.hour>=s||e.hour<0){const t=Math.floor(e.hour/s);e.hour-=t*s,e.day+=t,U(e)}return e}function U(t){ne(t);let a=S(t.year,t.month);if(t.day>a){++t.month,t.month>l&&ne(t);let e=t.day-a;a=S(t.year,t.month);do{e>a&&(++t.month,t.month>l&&ne(t),e-=a,a=S(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&ne(t),a=S(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&ne(t),a=S(t.year,t.month))}while(e>a);t.day=a-e}return t}function ne(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function re(e,t){switch(t){case"minute":return N(e);case"hour":return z(e);case"day":return U(e);case"month":return ne(e)}}function Me(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function We(e,t){return 0===t?e:e.slice(0,t)}var je={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Le(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Te.reactive({width:0,height:0}),o=Te.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Te.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Te.withDirectives(Te.h("div",e,[a()]),[[je,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:d}}const oe={modelValue:{type:String,default:Ae(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function Be(r,{startDate:e,endDate:t,times:a}){const n=Te.computed(()=>W(r.weekdays)),o=Te.computed(()=>Oe(e.value)),u=Te.computed(()=>{if("0000-00-00"===t.value)return h(o.value);return Oe(t.value)}),l=Te.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return te(r.locale,(e,t)=>a)}),i=Te.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return te(r.locale,(e,t)=>t?n:a)}),d=Te.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return te(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ee(t),r=Ee(Ie(e[0])),o=Ee(Ie(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:l,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function f(e){return P(e,r.weekdays,a.today)}function h(e){return Y(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:f,endOfWeek:h,dayStyleDefault:y}}function ue(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function le(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ie(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function de(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function se(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=ie(n);o<=0?l!==r&&ue(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;ue(n,a);a!==r&&se(n,r,o-t,e)})}function ce(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=de(n);o<=0?l!==r&&le(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&ce(n,r,o-t,e)})}const ve={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:B},dayMinHeight:{type:[Number,String],default:40,validator:B}};function Re(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:l,headerColumnRef:i}){const d=Te.computed(()=>parseInt(o.intervalStart,10)),h=Te.computed(()=>parseInt(o.intervalMinutes,10)),s=Te.computed(()=>parseInt(o.intervalCount,10)),y=Te.computed(()=>parseFloat(o.intervalHeight)),f=Te.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),m=Te.computed(()=>d.value*h.value),c=Te.computed(()=>s.value*y.value),v=Te.computed(()=>s.value*f.value),p=Te.computed(()=>k(a.value)),g=Te.computed(()=>D(r.value)),w=Te.computed(()=>{return J(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=Te.computed(()=>{return w.value.map(e=>ee(e,d.value,h.value,s.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function D(e){return Y(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(G(t))}function C(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=X(t),r=X(Ie(e[0])),o=X(Ie(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function q(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=C(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function F(e,t=0,a){return[]}const S=Te.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return te(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),x=Te.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return te(o.locale,e=>t)});function T(e){const t=b.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function I(e){}function O(e,t,a=!1,n=void 0){let r=Q(t);const o=e.currentTarget.getBoundingClientRect(),u=m.value,l=e,i=e,d=l.changedTouches||l.touches,s=(d&&d[0]?d[0]:i).clientY,c=(s-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*h.value),f=u+v;return 0!==f&&(r=ae(r,{minute:f})),n&&Z(r,n,!0),r}function E(e,t,a=!1,n=void 0){const r=Q(t),o=e.currentTarget.getBoundingClientRect(),u=m.value,l=e,i=e,d=l.changedTouches||l.touches,s=(d&&d[0]?d[0]:i).clientY,c=(s-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*h.value),f=u+v;return K(r,f,n)}function H(e,t,a=!1,n=void 0){const r=Q(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientX,s=(d-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*h.value),v=c+(60*t.hour+t.minute);return K(r,v,n)}function M(e,t){const a={timestamp:e};return a.timeStartPos=z,a.timeDurationHeight=B,void 0!==t&&(a.columnIndex=t),a}function W(e,t){const a={timestamp:Q(e)};return a.timeStartPosX=U,a.timeDurationWidth=R,void 0!==t&&(a.index=t),a}function j(e,t=0){const a=z(e);return!(!1===a||!n.value)&&(se(n.value,a,t),!0)}function L(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(ce(n.value,a,t),!0)}function B(e){return e/h.value*y.value}function R(e){return e/h.value*f.value}function V(e){return parseInt(e,10)*h.value/y.value}function N(e){return parseInt(e,10)*h.value/f.value}function z(e,t=!0){const a=$(e);if(!1===a)return!1;const n=m.value,r=s.value*h.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function U(e,t=!0){const a=$(e);if(!1===a)return!1;const n=m.value,r=s.value*h.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:h,parsedIntervalCount:s,parsedIntervalHeight:y,parsedCellWidth:f,parsedStartMinute:m,bodyHeight:c,bodyWidth:v,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:S,ariaDateTimeFormatter:x,arrayHasDateTime:_,checkIntervals:C,getIntervalClasses:q,getResourceClasses:F,showIntervalLabelDefault:T,showResourceLabelDefault:A,styleDefault:I,getTimestampAtEventInterval:O,getTimestampAtEvent:E,getTimestampAtEventX:H,getScopeForSlot:M,getScopeForSlotX:W,scrollToTime:j,scrollToTimeX:L,timeDurationHeight:B,timeDurationWidth:R,heightToMinutes:V,widthToMinutes:N,timeStartPos:z,timeStartPosX:U}}const fe={columnCount:{type:[Number,String],default:0,validator:B},columnIndexStart:{type:[Number,String],default:0,validator:B}},he={maxDays:{type:Number,default:1}},ye={now:{type:String,validator:e=>""===e||v(e),default:""}};function Ve(e){const t=Te.reactive({now:Oe("0000-00-00 00:00"),today:Oe("0000-00-00")}),a=Te.computed(()=>e.now?Oe(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return f(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Te.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function Ne(r,{parsedView:o,times:u,parsedValue:l}){const e=Te.computed(()=>{const e=l.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=q(e),n=F(e),t=S(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,u.today),n=Y(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=E(Q(n),I,t>1?t-1:t,r.weekdays),k(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=q(e),n=F(e),k(n),t=S(a.year,a.month);break;case"resource":t=1,n=E(Q(n),I,t,r.weekdays),k(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const me=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let pe,ge;function we(e,a){const t={};for(const n in e){const r=e[n],o=me("on-"+n);if(void 0===pe)return void console.warn("$listeners has not been set up");if(void 0!==pe.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ge(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function be(e,t){return we(ke(e),t)}function ke(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function De(e){return Object.keys(ke(e))}function ze(e,t){return ge=e,pe=t,{getMouseEventHandlers:we,getDefaultMouseEventHandlers:be,getMouseEventName:ke,getRawMouseEvents:De}}const _e=["moved"];function Ue(l,{parsedView:i,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:f,emittedValue:h,emit:y}){function e(a=1){if(0!==a){let e=Q(d.value);const n=a>0,r=n?I:O,o=n?m:p;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),g(e);while(0===s.value[e.weekday])e=ae(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":H(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":H(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":H(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),Z(e,f.now),h.value=e.date,y("moved",e)}else h.value=Ae()}return{move:e}}const Ce=/^on[A-Z]/;function Pe(e=Te.getCurrentInstance()){return{emitListeners:Te.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===Ce.test(e)&&(t[e]=!0)});return t})}}function Ye(){return[Te.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function $e(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Te.h("button",t,[a,!0===n&&Ye()])}const qe={cellWidth:[Number,String]};function Xe(e){const t=Te.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const Fe=["change"];function Ze(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function Ke(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Se}=Ke(),xe={useNavigation:Boolean};function Qe(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:i,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",m),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",m),document.removeEventListener("keydown",y),e=!1)}function f(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function h(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){f(e)&&Se(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function m(e){if(f(e)&&Se(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:D();break;case 35:C();break;case 36:_();break;case 37:w();break;case 38:p();break;case 39:b();break;case 40:g();break}}function p(e){let t=Q(o.value);if("month"===l.value){if(t=ae(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ae(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=Q(o.value);if("month"===l.value){if(t=ae(t,{day:7}),o.value.month!==t.month)return s.value="next",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ae(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=Q(o.value);s.value="prev";do{t=ae(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=Q(o.value);s.value="next";do{t=ae(t,{day:1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function k(e){let t=Q(o.value);if("month"===l.value||"month-interval"===l.value){t=ae(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=ae(t,{day:a})}else"day"===l.value?t=ae(t,{day:-1}):"week"===l.value&&(t=ae(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=Q(o.value);if("month"===l.value||"month-interval"===l.value){t=ae(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=ae(t,{day:a})}else"day"===l.value?t=ae(t,{day:1}):"week"===l.value&&(t=ae(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=Q(o.value);"month"===l.value||"month-interval"===l.value?t=q(t):"week"===l.value&&(t=P(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=ae(t,{day:-1});r.value=t.date}function C(e){let t=Q(o.value);"month"===l.value||"month-interval"===l.value?t=F(t):"week"===l.value&&(t=Y(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=ae(t,{day:-1});r.value=t.date}return Te.onBeforeUnmount(()=>{v()}),Te.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:h}}var Ge=Te.defineComponent({name:"QCalendarAgenda",directives:[je],props:{...oe,...ve,...fe,...he,...ye,...qe,...xe},emits:["update:model-value",...Fe,..._e,...De("-date"),...De("-head-day"),...De("-time")],setup(v,{slots:f,emit:l,expose:e}){const t=Te.ref(null),a=Te.ref(null),n=Te.ref(null),h=Te.ref(null),r=Te.ref(null),y=Te.ref({}),o=Te.ref({}),u=Te.ref({}),i=Te.ref("next"),d=Te.ref(Ae()),s=Te.ref("0000-00-00"),c=Te.ref(0),m=Te.ref(v.modelValue),p=Te.reactive({width:0,height:0}),g=Te.ref(!1),w=Te.ref(null),b=Te.ref(null),k=Te.computed(()=>{if("month"===v.view)return"month-interval";return v.view}),D=Te.getCurrentInstance();if(null===D)throw new Error("current instance is null");const{emitListeners:_}=Pe(D),{isSticky:C}=Xe(v);Te.watch(C,e=>{});const{times:q,setCurrent:F,updateCurrent:S}=Ve(v);S(),F();const{weekdaySkips:x,parsedStart:T,parsedEnd:A,dayFormatter:I,weekdayFormatter:O,ariaDateFormatter:E,dayStyleDefault:H,getRelativeClasses:M}=Be(v,{startDate:d,endDate:s,times:q}),W=Te.computed(()=>{return Oe(v.modelValue,q.now)||T.value||q.today});r.value=W.value,h.value=W.value.date;const j=Te.computed(()=>{if(0===c.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===z.value||0===z.value.length)return!0;const e=z.value[0];const t=z.value[z.value.length-1];return!0!==He(W.value,e,t)}),{renderValues:L}=Ne(v,{parsedView:k,times:q,parsedValue:W}),{rootRef:B,scrollWidth:R,__initCalendar:V,__renderCalendar:N}=Le(v,xe,{scrollArea:t,pane:a}),{days:z,parsedCellWidth:U,getScopeForSlot:P}=Re(v,{weekdaySkips:x,times:q,scrollArea:t,parsedStart:T,parsedEnd:A,maxDays:c,size:p,headerColumnRef:n}),{move:Y}=Ue(v,{parsedView:k,parsedValue:W,weekdaySkips:x,direction:i,maxDays:c,times:q,emittedValue:m,emit:l}),{getDefaultMouseEventHandlers:$}=ze(l,_),{checkChange:X}=Ze(l,{days:z,lastStart:w,lastEnd:b}),{isKeyCode:Z}=Ke(),{tryFocus:K}=Qe(v,{rootRef:B,focusRef:h,focusValue:r,datesRef:y,days:z,parsedView:k,parsedValue:W,emittedValue:m,weekdaySkips:x,direction:i,times:q}),Q=Te.computed(()=>{return z.value.length+(!0===G.value?v.leftColumnOptions.length:0)+(!0===J.value?v.rightColumnOptions.length:0)+z.value.length===1&&parseInt(v.columnCount,10)>0?parseInt(v.columnCount,10):0}),G=Te.computed(()=>{return void 0!==v.leftColumnOptions&&Array.isArray(v.leftColumnOptions)}),J=Te.computed(()=>{return void 0!==v.rightColumnOptions&&Array.isArray(v.rightColumnOptions)}),ee=Te.computed(()=>{if(B.value){const e=p.width||B.value.getBoundingClientRect().width;if(e&&Q.value)return(e-R.value)/Q.value+"px"}return 100/Q.value+"%"});function te(){m.value=Ae()}function ae(e=1){Y(e)}function ne(e=1){Y(-e)}function re({width:e,height:t}){p.width=e,p.height=t}function oe(e){return e.date===m.value}function ue(a,n){const e=f["head-column"],t={column:a,index:n,days:z.value},r=!0===C.value?v.cellWidth:ee.value,o=!0===v.focusable&&v.focusType.includes("weekday"),u=void 0!==v.columnOptionsId?a[v.columnOptionsId]:void 0,l={maxWidth:r,width:r};return Te.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-column",t)?g.value=u:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-column",t)?g.value=u:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-column",t)?g.value=u:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-column",t)?g.value=u:g.value="")},...$("-head-column",(e,t)=>{return{scope:{column:a,index:n},event:e}})},[!0!==v.noDefaultHeaderText&&le(a),e&&e(t),Ye()])}function le(e){const t=f["head-column-label"],a={column:e},n=void 0!==v.columnOptionsLabel?e[v.columnOptionsLabel]:e.label,r=Te.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&Te.h("span",{class:"ellipsis"},n)]);return"stacked"===v.dateHeader?r:Te.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function ie(){return Te.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===C.value},style:{marginRight:R.value+"px"}},[de()])}function de(){return Te.h("div",{ref:n,class:{"q-calendar-agenda__head--days__column":!0}},[se(),ce()])}function se(){return Te.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...ve()])}function ce(){const e=f["head-days-events"];return Te.nextTick(()=>{if(u.value&&0===v.columnCount&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),Te.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&Te.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:z.value,ref:u}})]),...fe()])}function ve(){return 1===z.value.length&&parseInt(v.columnCount,10)>0?[!0===G.value&&v.leftColumnOptions.map((e,t)=>ue(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>he(z.value[0],e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>ue(e,t))]:[!0===G.value&&v.leftColumnOptions.map((e,t)=>ue(e,t)),z.value.map(e=>he(e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>ue(e,t))]}function fe(){return 1===z.value.length&&parseInt(v.columnCount,10)>0?[Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>me(z.value[0],e))]:z.value.map(e=>me(e))}function he(t,e){const a=f["head-day"],n=f["head-date"],r=!0!==v.noActiveDate&&oe(t),o=P(t,e);o.activeDate=r,o.droppable=g.value===t.date;const u=!0===C.value?v.cellWidth:ee.value,l=v.weekdayStyle||H,i={width:u,maxWidth:u,...l({scope:o})};!0===C.value&&(i.minWidth=u);const d="function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{},s=!0===v.focusable&&v.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...d,...M(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:i,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")},onFocus:e=>{!0===s&&(h.value=t.date)},...$("-head-day",e=>{return{scope:o,event:e}})};return Te.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ye(t),void 0===a&&n&&n({scope:o}),Ye()])}function ye(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&pe(e),!0!==v.noDefaultHeaderBtn&&we(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Te.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&pe(e),!0!==v.noDefaultHeaderBtn&&we(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Te.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&we(e),!0!==v.noDefaultHeaderText&&pe(e)])):void 0}function me(e,t){const a=f["head-day-event"],n=!0!==v.noActiveDate&&oe(e),r=P(e,t);r.activeDate=n;const o=!0===C.value?v.cellWidth:ee.value,u={width:o,maxWidth:o};return!0===C.value&&(u.minWidth=o),Te.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...M(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function pe(e){const t=f["head-weekday-label"],a=P(e);a.shortWeekdayLabel=v.shortWeekdayLabel;const n={class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Te.h("div",n,t&&t({scope:a})||ge(e,v.shortWeekdayLabel))}function ge(e,t){const a=O.value(e,t||v.weekdayBreakpoints[0]>0&&U.value<=v.weekdayBreakpoints[0]);return Te.h("span",{class:"q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&U.value<=v.weekdayBreakpoints[1]?We(a,v.minWeekdayLabel):a)}function we(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return Te.h("div",t,be(e))}function be(a){const e=!0!==v.noActiveDate&&oe(a),t=I.value(a,!1),n=f["head-day-label"],r=f["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Z(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Z(e,[13,32])&&(m.value=a.date,void 0!==_.value.onClickDate&&l("click-date",{scope:o}))},...$("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(m.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==v.noAria&&(u.ariaLabel=E.value(a)),r?r({scope:o}):$e(v,u,n?n({scope:o}):t)}function ke(){return Te.h("div",{class:"q-calendar-agenda__body"},[De()])}function De(){return!0===C.value?Te.h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Ce()]):!0===v.noScroll?_e():Te.h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[_e()])}function _e(){return Te.h("div",{ref:a,class:"q-calendar-agenda__pane"},[Ce()])}function Ce(){const e=f["day-container"];return Te.h("div",{class:"q-calendar-agenda__day-container"},[!0===C.value&&!0!==v.noHeader&&ie(),Te.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...qe()]),e&&e({scope:{days:z.value}})])}function qe(){return 1===z.value.length&&parseInt(v.columnCount,10)>0?[!0===G.value&&v.leftColumnOptions.map((e,t)=>Fe(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Se(z.value[0],0,e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>Fe(e,t))]:[!0===G.value&&v.leftColumnOptions.map((e,t)=>Fe(e,t)),z.value.map((e,t)=>Se(e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>Fe(e,t))]}function Fe(e,t){const a=f.column,n={column:e,days:z.value,index:t},r=!0===C.value?v.cellWidth:ee.value,o=!0===v.focusable&&v.focusType.includes("day"),u=void 0!==v.columnOptionsId?e[v.columnOptionsId]:void 0;return Te.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"column",n)?g.value=u:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"column",n)?g.value=u:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"column",n)?g.value=u:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"column",n)?g.value=u:g.value="")},...$("-column",(e,t)=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Se(e,t,a){const n=f.day,r=P(e,a),o=!0===C.value?v.cellWidth:ee.value,u={width:o,maxWidth:o};return!0===C.value&&(u.minWidth=o),u.height=parseInt(v.dayHeight,10)>0?Me(parseInt(v.dayHeight,10)):"auto",parseInt(v.dayMinHeight,10)>0&&(u.minHeight=Me(parseInt(v.dayMinHeight,10))),Te.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...M(e)},style:u},[n&&n({scope:r})])}function xe(){if(j.value){const{start:a,end:n,maxDays:r}=L.value;d.value=a.date,s.value=n.date,c.value=r}const e=p.width>0,t=Te.withDirectives(Te.h("div",{class:"q-calendar-agenda",key:d.value},[!0===e&&!0!==C.value&&!0!==v.noHeader&&ie(),!0===e&&ke()]),[[je,re]]);if(!0!==v.animated)return t;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return Te.h(Te.Transition,{name:o,appear:!0},()=>t)}}return Te.watch([z],X,{deep:!0,immediate:!0}),Te.watch(()=>v.modelValue,(e,t)=>{if(m.value!==e){if(!0===v.animated){const a=Ee(Ie(e)),n=Ee(Ie(t));i.value=a>=n?"next":"prev"}m.value=e}h.value=e}),Te.watch(m,(e,t)=>{if(m.value!==v.modelValue){if(!0===v.animated){const a=Ee(Ie(e)),n=Ee(Ie(t));i.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Te.watch(h,e=>{e&&(r.value=Oe(e))}),Te.watch(r,e=>{y.value[h.value]?y.value[h.value].focus():K()}),Te.watch(()=>v.maxDays,e=>{c.value=e}),Te.onBeforeUpdate(()=>{y.value={}}),Te.onMounted(()=>{V()}),e({prev:ne,next:ae,move:Y,moveToToday:te,updateCurrent:S}),()=>N()}}),Je="@quasar/quasar-ui-qcalendar",et="4.0.0-beta.2",tt="Jeff Galbraith <jeff@quasar.dev>",at="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",nt="MIT",rt="dist/index.esm.js",ot="dist/index.common.js",ut="dist/types/index.d.ts",lt={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},it={type:"github",url:"https://github.com/sponsors/hawkeye64"},dt={access:"public"},st={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},ct="https://github.com/quasarframework/quasar-ui-qcalendar/issues",vt="https://github.com/quasarframework/quasar-ui-qcalendar",ft=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ht={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},yt={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},mt=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],mt={name:Je,version:et,author:tt,description:at,license:nt,module:rt,main:ot,typings:ut,scripts:lt,funding:it,publishConfig:dt,repository:st,bugs:ct,homepage:vt,keywords:ft,vetur:ht,devDependencies:yt,browserslist:mt};const{version:pt}=mt;e.QCalendarAgenda=Ge,e.version=pt,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarAgenda={},e.Vue))})(this,function(e,Te){"use strict";const 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?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,m=31,l=12,u=1,p=1,i=7,d=60,s=24,c=6048e5;function Ae(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,T(t,2),T(a,2)].join("-")}function P(e,t,a){let n=K(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=O(n);return n=W(n,t[0],E),n=k(n),a&&(n=Z(n,a,n.hasTime)),n}function Y(e,t,a){let n=K(e);const r=x(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=E(n);return n=W(n,t[t.length-1],O),n=k(n),a&&(n=Z(n,a,n.hasTime)),n}function q(e){const t=K(e);return t.day=p,k(t),t}function F(e){const t=K(e);return t.day=x(t.year,t.month),k(t),t}function $(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=n.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!a.exec(e)}function Ie(e){const t=a.exec(e);return t?{date:e,time:T(parseInt(t[6],10)||0,2)+":"+T(parseInt(t[8],10)||0,2),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 Oe(e,t){let a=Ie(e);return null===a?null:(a=k(a),t&&Z(a,t,a.hasTime),a)}function f(e){return k({date:T(e.getFullYear(),4)+"-"+T(e.getMonth()+1,2)+"-"+T(e.getDate(),2),time:T(e.getHours()||0,2)+":"+T(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Ee(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function h(e){return 100*e.hour+e.minute}function X(e){return Ee(e)+h(e)}function Z(e,t,a=!1){let n=Ee(t),r=Ee(e),o=n===r;return e.hasTime&&a&&o&&(n=h(t),r=h(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function y(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/d),e.minute=t%d,e.time=I(e),a&&Z(e,a,!0),e}function g(e){return e.weekday=C(e),e}function w(e){return e.doy=D(e),e}function b(e,t,a,n,r){const o=Ee(e);if(void 0!==t){const u=Ee(Ie(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ee(Ie(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=Ie(r[d][0]),c=Ie(r[d][1]);if(He(e,s,c)){e.disabled=!0;break}}else{const v=Ee(Oe(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=I(e),e.date=A(e),e.weekday=C(e),e.doy=D(e),e.workweek=_(e),e}function D(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 _(e){let t;if(t=0===e.year?Date.UTC(new Date):L(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/c;return 1+Math.floor(o)}function C(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function S(e){return 1===(e%4===0^e%100===0^e%400===0)}function x(e,t){return(S(e)?o:r)[t]}function K(e){return{...e}}function T(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function A(e){let t=`${T(e.year,4)}-${T(e.month,2)}`;return e.hasDay&&(t+=`-${T(e.day,2)}`),t}function I(e){return e.hasTime?`${T(e.hour,2)}:${T(e.minute,2)}`:""}function Q(e){return A(e)+" "+(e.hasTime?I(e):"00:00")}function O(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>t&&e.day>x(e.year,e.month)&&(e.day=p,++e.month,e.month>l&&(e.month=u,++e.year)),e}function E(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<p&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=x(e.year,e.month)),e}function H(e,t=O,a=1,n=[0,1,2,3,4,5,6]){return M(e,t,a,n)}function M(e,t=O,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==O||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function W(e,t,a=O,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function j(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<i;++a){let t=1;for(let e=1;e<i;++e){const r=(a+e)%i;if(n[r])break;++t}e[a]=n[a]*t}return e}function G(e,t,a,n,r,o,u=[],l=[],i=42,d=0){const s=Ee(t),c=[];let v=K(e),f=0,h=f===s;if(s<Ee(e))return c;while((!h||c.length<d)&&c.length<i){if(f=Ee(v),h=h||f>s&&c.length>=d,h)break;if(0!==n[v.weekday]){const y=K(v);k(y),Z(y,a),b(y,r,o,u,l),c.push(y),v=M(v,O)}else v=M(v,O)}return c}function J(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,i=K(t);u.push(y(i,l,o))}return u}function ee(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(B(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${Q(t)}`),""}}}function L(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function B(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function R(e){return isFinite(parseInt(e,10))}function He(e,t,a,n){const r=Ee(e)+(!0===n?h(e):0),o=Ee(t)+(!0===n?h(t):0),u=Ee(a)+(!0===n?h(a):0);return r>=o&&r<=u}function te(e,t){const n=K(e);let r;return N(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=V.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&re(n,V[r]),k(n),n}const V=["minute","hour","day","month"];function N(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function z(e){if(e.minute>=d||e.minute<0){const t=Math.floor(e.minute/d);e.minute-=t*d,e.hour+=t,U(e)}return e}function U(e){if(e.hour>=s||e.hour<0){const t=Math.floor(e.hour/s);e.hour-=t*s,e.day+=t,ae(e)}return e}function ae(t){ne(t);let a=x(t.year,t.month);if(t.day>a){++t.month,t.month>l&&ne(t);let e=t.day-a;a=x(t.year,t.month);do{e>a&&(++t.month,t.month>l&&ne(t),e-=a,a=x(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&ne(t),a=x(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&ne(t),a=x(t.year,t.month))}while(e>a);t.day=a-e}return t}function ne(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function re(e,t){switch(t){case"minute":return z(e);case"hour":return U(e);case"day":return ae(e);case"month":return ne(e)}}function Me(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function We(e,t){return 0===t?e:e.slice(0,t)}var je={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Le(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Te.reactive({width:0,height:0}),o=Te.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Te.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Te.withDirectives(Te.h("div",e,[a()]),[[je,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:d}}const oe={modelValue:{type:String,default:Ae(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function Be(r,{startDate:e,endDate:t,times:a}){const n=Te.computed(()=>j(r.weekdays)),o=Te.computed(()=>Oe(e.value)),u=Te.computed(()=>{if("0000-00-00"===t.value)return h(o.value);return Oe(t.value)}),l=Te.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return ee(r.locale,(e,t)=>a)}),i=Te.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return ee(r.locale,(e,t)=>t?n:a)}),d=Te.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return ee(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ee(t),r=Ee(Ie(e[0])),o=Ee(Ie(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:l,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function f(e){return P(e,r.weekdays,a.today)}function h(e){return Y(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:f,endOfWeek:h,dayStyleDefault:y}}function ue(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function le(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ie(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function de(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function se(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=ie(n);o<=0?l!==r&&ue(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;ue(n,a);a!==r&&se(n,r,o-t,e)})}function ce(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=de(n);o<=0?l!==r&&le(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&ce(n,r,o-t,e)})}const ve={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},leftColumnOptions:{type:Array},rightColumnOptions:{type:Array},columnOptionsId:{type:String},columnOptionsLabel:{type:String},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},dayHeight:{type:[Number,String],default:0,validator:R},dayMinHeight:{type:[Number,String],default:40,validator:R}};function Re(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:l,headerColumnRef:i}){const d=Te.computed(()=>parseInt(o.intervalStart,10)),v=Te.computed(()=>parseInt(o.intervalMinutes,10)),s=Te.computed(()=>parseInt(o.intervalCount,10)),f=Te.computed(()=>parseFloat(o.intervalHeight)),h=Te.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=Te.computed(()=>d.value*v.value),y=Te.computed(()=>s.value*f.value),m=Te.computed(()=>s.value*h.value),p=Te.computed(()=>k(a.value)),g=Te.computed(()=>D(r.value)),w=Te.computed(()=>{return G(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=Te.computed(()=>{return w.value.map(e=>J(e,d.value,v.value,s.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function D(e){return Y(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(Q(t))}function C(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=X(t),r=X(Ie(e[0])),o=X(Ie(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function q(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=C(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function F(e,t=0,a){return[]}const S=Te.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return ee(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),x=Te.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return ee(o.locale,e=>t)});function T(e){const t=b.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function A(e){}function I(e){}function O(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=te(r,{minute:c})),n&&Z(r,n,!0),r}function E(e,t,a=!1,n=void 0){const r=K(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=te(r,{minute:c})),n&&Z(r,n,!0),r}function H(e,t,a=!1,n=void 0){const r=K(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientX,s=(d-o.left)/h.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=te(r,{minute:c})),n&&Z(r,n,!0),r}function M(e,t){const a={timestamp:e};return a.timeStartPos=z,a.timeDurationHeight=B,void 0!==t&&(a.columnIndex=t),a}function W(e,t){const a={timestamp:K(e)};return a.timeStartPosX=U,a.timeDurationWidth=R,void 0!==t&&(a.index=t),a}function j(e,t=0){const a=z(e);return!(!1===a||!n.value)&&(se(n.value,a,t),!0)}function L(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(ce(n.value,a,t),!0)}function B(e){return e/v.value*f.value}function R(e){return e/v.value*h.value}function V(e){return parseInt(e,10)*v.value/f.value}function N(e){return parseInt(e,10)*v.value/h.value}function z(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}function U(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*m.value;return t&&(u<0&&(u=0),u>m.value&&(u=m.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:f,parsedCellWidth:h,parsedStartMinute:c,bodyHeight:y,bodyWidth:m,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:S,ariaDateTimeFormatter:x,arrayHasDateTime:_,checkIntervals:C,getIntervalClasses:q,getResourceClasses:F,showIntervalLabelDefault:T,showResourceLabelDefault:A,styleDefault:I,getTimestampAtEventInterval:O,getTimestampAtEvent:E,getTimestampAtEventX:H,getScopeForSlot:M,getScopeForSlotX:W,scrollToTime:j,scrollToTimeX:L,timeDurationHeight:B,timeDurationWidth:R,heightToMinutes:V,widthToMinutes:N,timeStartPos:z,timeStartPosX:U}}const fe={columnCount:{type:[Number,String],default:0,validator:R},columnIndexStart:{type:[Number,String],default:0,validator:R}},he={maxDays:{type:Number,default:1}},ye={now:{type:String,validator:e=>""===e||v(e),default:""}};function Ve(e){const t=Te.reactive({now:Oe("0000-00-00 00:00"),today:Oe("0000-00-00")}),a=Te.computed(()=>e.now?Oe(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return f(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Te.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function Ne(r,{parsedView:o,times:u,parsedValue:l}){const e=Te.computed(()=>{const e=l.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=q(e),n=F(e),t=x(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,u.today),n=Y(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=H(K(n),O,t>1?t-1:t,r.weekdays),k(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=q(e),n=F(e),k(n),t=x(a.year,a.month);break;case"resource":t=1,n=H(K(n),O,t,r.weekdays),k(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const me=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let pe,ge;function we(e,a){const t={};for(const n in e){const r=e[n],o=me("on-"+n);if(void 0===pe)return void console.warn("$listeners has not been set up");if(void 0!==pe.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ge(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function be(e,t){return we(ke(e),t)}function ke(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function De(e){return Object.keys(ke(e))}function ze(e,t){return ge=e,pe=t,{getMouseEventHandlers:we,getDefaultMouseEventHandlers:be,getMouseEventName:ke,getRawMouseEvents:De}}const _e=["moved"];function Ue(l,{parsedView:i,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:f,emittedValue:h,emit:y}){function e(a=1){if(0!==a){let e=K(d.value);const n=a>0,r=n?O:E,o=n?m:p;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),g(e);while(0===s.value[e.weekday])e=te(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":M(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":M(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":M(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),Z(e,f.now),h.value=e.date,y("moved",e)}else h.value=Ae()}return{move:e}}const Ce=/^on[A-Z]/;function Pe(e=Te.getCurrentInstance()){return{emitListeners:Te.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===Ce.test(e)&&(t[e]=!0)});return t})}}function Ye(){return[Te.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function $e(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Te.h("button",t,[a,!0===n&&Ye()])}const qe={cellWidth:[Number,String]};function Xe(e){const t=Te.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const Fe=["change"];function Ze(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function Ke(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Se}=Ke(),xe={useNavigation:Boolean};function Qe(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:i,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",m),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",m),document.removeEventListener("keydown",y),e=!1)}function f(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function h(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){f(e)&&Se(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function m(e){if(f(e)&&Se(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:D();break;case 35:C();break;case 36:_();break;case 37:w();break;case 38:p();break;case 39:b();break;case 40:g();break}}function p(e){let t=K(o.value);if("month"===l.value){if(t=te(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=te(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=K(o.value);if("month"===l.value){if(t=te(t,{day:7}),o.value.month!==t.month)return s.value="next",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=te(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=K(o.value);s.value="prev";do{t=te(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=K(o.value);s.value="next";do{t=te(t,{day:1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function k(e){let t=K(o.value);if("month"===l.value||"month-interval"===l.value){t=te(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=te(t,{day:a})}else"day"===l.value?t=te(t,{day:-1}):"week"===l.value&&(t=te(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=K(o.value);if("month"===l.value||"month-interval"===l.value){t=te(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=te(t,{day:a})}else"day"===l.value?t=te(t,{day:1}):"week"===l.value&&(t=te(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=K(o.value);"month"===l.value||"month-interval"===l.value?t=q(t):"week"===l.value&&(t=P(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=te(t,{day:-1});r.value=t.date}function C(e){let t=K(o.value);"month"===l.value||"month-interval"===l.value?t=F(t):"week"===l.value&&(t=Y(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=te(t,{day:-1});r.value=t.date}return Te.onBeforeUnmount(()=>{v()}),Te.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:h}}var Ge=Te.defineComponent({name:"QCalendarAgenda",directives:[je],props:{...oe,...ve,...fe,...he,...ye,...qe,...xe},emits:["update:model-value",...Fe,..._e,...De("-date"),...De("-head-day"),...De("-time")],setup(v,{slots:f,emit:l,expose:e}){const t=Te.ref(null),a=Te.ref(null),n=Te.ref(null),h=Te.ref(null),r=Te.ref(null),y=Te.ref({}),o=Te.ref({}),u=Te.ref({}),i=Te.ref("next"),d=Te.ref(Ae()),s=Te.ref("0000-00-00"),c=Te.ref(0),m=Te.ref(v.modelValue),p=Te.reactive({width:0,height:0}),g=Te.ref(!1),w=Te.ref(null),b=Te.ref(null),k=Te.computed(()=>{if("month"===v.view)return"month-interval";return v.view}),D=Te.getCurrentInstance();if(null===D)throw new Error("current instance is null");const{emitListeners:_}=Pe(D),{isSticky:C}=Xe(v);Te.watch(C,e=>{});const{times:q,setCurrent:F,updateCurrent:S}=Ve(v);S(),F();const{weekdaySkips:x,parsedStart:T,parsedEnd:A,dayFormatter:I,weekdayFormatter:O,ariaDateFormatter:E,dayStyleDefault:H,getRelativeClasses:M}=Be(v,{startDate:d,endDate:s,times:q}),W=Te.computed(()=>{return Oe(v.modelValue,q.now)||T.value||q.today});r.value=W.value,h.value=W.value.date;const j=Te.computed(()=>{if(0===c.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===z.value||0===z.value.length)return!0;const e=z.value[0];const t=z.value[z.value.length-1];return!0!==He(W.value,e,t)}),{renderValues:L}=Ne(v,{parsedView:k,times:q,parsedValue:W}),{rootRef:B,scrollWidth:R,__initCalendar:V,__renderCalendar:N}=Le(v,xe,{scrollArea:t,pane:a}),{days:z,parsedCellWidth:U,getScopeForSlot:P}=Re(v,{weekdaySkips:x,times:q,scrollArea:t,parsedStart:T,parsedEnd:A,maxDays:c,size:p,headerColumnRef:n}),{move:Y}=Ue(v,{parsedView:k,parsedValue:W,weekdaySkips:x,direction:i,maxDays:c,times:q,emittedValue:m,emit:l}),{getDefaultMouseEventHandlers:$}=ze(l,_),{checkChange:X}=Ze(l,{days:z,lastStart:w,lastEnd:b}),{isKeyCode:Z}=Ke(),{tryFocus:K}=Qe(v,{rootRef:B,focusRef:h,focusValue:r,datesRef:y,days:z,parsedView:k,parsedValue:W,emittedValue:m,weekdaySkips:x,direction:i,times:q}),Q=Te.computed(()=>{return z.value.length+(!0===G.value?v.leftColumnOptions.length:0)+(!0===J.value?v.rightColumnOptions.length:0)+z.value.length===1&&parseInt(v.columnCount,10)>0?parseInt(v.columnCount,10):0}),G=Te.computed(()=>{return void 0!==v.leftColumnOptions&&Array.isArray(v.leftColumnOptions)}),J=Te.computed(()=>{return void 0!==v.rightColumnOptions&&Array.isArray(v.rightColumnOptions)}),ee=Te.computed(()=>{if(B.value){const e=p.width||B.value.getBoundingClientRect().width;if(e&&Q.value)return(e-R.value)/Q.value+"px"}return 100/Q.value+"%"});function te(){m.value=Ae()}function ae(e=1){Y(e)}function ne(e=1){Y(-e)}function re({width:e,height:t}){p.width=e,p.height=t}function oe(e){return e.date===m.value}function ue(a,n){const e=f["head-column"],t={column:a,index:n,days:z.value},r=!0===C.value?v.cellWidth:ee.value,o=!0===v.focusable&&v.focusType.includes("weekday"),u=void 0!==v.columnOptionsId?a[v.columnOptionsId]:void 0,l={maxWidth:r,width:r};return Te.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__head--day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:l,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-column",t)?g.value=u:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-column",t)?g.value=u:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-column",t)?g.value=u:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-column",t)?g.value=u:g.value="")},...$("-head-column",(e,t)=>{return{scope:{column:a,index:n},event:e}})},[!0!==v.noDefaultHeaderText&&le(a),e&&e(t),Ye()])}function le(e){const t=f["head-column-label"],a={column:e},n=void 0!==v.columnOptionsLabel?e[v.columnOptionsLabel]:e.label,r=Te.h("div",{class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,ellipsis:!0},style:{alignSelf:"center"}},[t&&t({scope:a}),!t&&Te.h("span",{class:"ellipsis"},n)]);return"stacked"===v.dateHeader?r:Te.h("div",{class:"q-calendar__header--inline",style:{height:"100%"}},[r])}function ie(){return Te.h("div",{roll:"presentation",class:{"q-calendar-agenda__head":!0,"q-calendar__sticky":!0===C.value},style:{marginRight:R.value+"px"}},[de()])}function de(){return Te.h("div",{ref:n,class:{"q-calendar-agenda__head--days__column":!0}},[se(),ce()])}function se(){return Te.h("div",{class:{"q-calendar-agenda__head--days__weekdays":!0}},[...ve()])}function ce(){const e=f["head-days-events"];return Te.nextTick(()=>{if(u.value&&0===v.columnCount&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),Te.h("div",{class:{"q-calendar-agenda__head--days__event":!0}},[e&&Te.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:z.value,ref:u}})]),...fe()])}function ve(){return 1===z.value.length&&parseInt(v.columnCount,10)>0?[!0===G.value&&v.leftColumnOptions.map((e,t)=>ue(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>he(z.value[0],e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>ue(e,t))]:[!0===G.value&&v.leftColumnOptions.map((e,t)=>ue(e,t)),z.value.map(e=>he(e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>ue(e,t))]}function fe(){return 1===z.value.length&&parseInt(v.columnCount,10)>0?[Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>me(z.value[0],e))]:z.value.map(e=>me(e))}function he(t,e){const a=f["head-day"],n=f["head-date"],r=!0!==v.noActiveDate&&oe(t),o=P(t,e);o.activeDate=r,o.droppable=g.value===t.date;const u=!0===C.value?v.cellWidth:ee.value,l=v.weekdayStyle||H,i={width:u,maxWidth:u,...l({scope:o})};!0===C.value&&(i.minWidth=u);const d="function"===typeof v.weekdayClass?v.weekdayClass({scope:o}):{},s=!0===v.focusable&&v.focusType.includes("weekday"),c={key:t.date+(void 0!==e?"-"+e:""),ref:e=>{y.value[t.date]=e},tabindex:!0===s?0:-1,class:{"q-calendar-agenda__head--day":!0,...d,...M(t),"q-active-date":r,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===s},style:i,onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")},onFocus:e=>{!0===s&&(h.value=t.date)},...$("-head-day",e=>{return{scope:o,event:e}})};return Te.h("div",c,[void 0!==a&&a({scope:o}),void 0===a&&ye(t),void 0===a&&n&&n({scope:o}),Ye()])}function ye(e){return"stacked"===v.dateHeader?[!0!==v.noDefaultHeaderText&&pe(e),!0!==v.noDefaultHeaderBtn&&we(e)]:"inline"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Te.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderText&&pe(e),!0!==v.noDefaultHeaderBtn&&we(e)])):"inverted"===v.dateHeader?("left"===v.weekdayAlign&&"right"===v.dateAlign||"right"===v.weekdayAlign&&v.dateAlign,Te.h("div",{class:"q-calendar__header--inline"},[!0!==v.noDefaultHeaderBtn&&we(e),!0!==v.noDefaultHeaderText&&pe(e)])):void 0}function me(e,t){const a=f["head-day-event"],n=!0!==v.noActiveDate&&oe(e),r=P(e,t);r.activeDate=n;const o=!0===C.value?v.cellWidth:ee.value,u={width:o,maxWidth:o};return!0===C.value&&(u.minWidth=o),Te.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-agenda__head--day__event":!0,...M(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function pe(e){const t=f["head-weekday-label"],a=P(e);a.shortWeekdayLabel=v.shortWeekdayLabel;const n={class:{"q-calendar-agenda__head--weekday":!0,["q-calendar__"+v.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Te.h("div",n,t&&t({scope:a})||ge(e,v.shortWeekdayLabel))}function ge(e,t){const a=O.value(e,t||v.weekdayBreakpoints[0]>0&&U.value<=v.weekdayBreakpoints[0]);return Te.h("span",{class:"q-calendar__ellipsis"},v.weekdayBreakpoints[1]>0&&U.value<=v.weekdayBreakpoints[1]?We(a,v.minWeekdayLabel):a)}function we(e){const t={class:{"q-calendar-agenda__head--date":!0,["q-calendar__"+v.dateAlign]:!0}};return Te.h("div",t,be(e))}function be(a){const e=!0!==v.noActiveDate&&oe(a),t=I.value(a,!1),n=f["head-day-label"],r=f["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-agenda__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===v.dateType,"q-calendar__button--rounded":"rounded"===v.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Z(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Z(e,[13,32])&&(m.value=a.date,void 0!==_.value.onClickDate&&l("click-date",{scope:o}))},...$("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(m.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==v.noAria&&(u.ariaLabel=E.value(a)),r?r({scope:o}):$e(v,u,n?n({scope:o}):t)}function ke(){return Te.h("div",{class:"q-calendar-agenda__body"},[De()])}function De(){return!0===C.value?Te.h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[Ce()]):!0===v.noScroll?_e():Te.h("div",{ref:t,class:{"q-calendar-agenda__scroll-area":!0,"q-calendar__scroll":!0}},[_e()])}function _e(){return Te.h("div",{ref:a,class:"q-calendar-agenda__pane"},[Ce()])}function Ce(){const e=f["day-container"];return Te.h("div",{class:"q-calendar-agenda__day-container"},[!0===C.value&&!0!==v.noHeader&&ie(),Te.h("div",{style:{display:"flex",flexDirection:"row",height:"100%"}},[...qe()]),e&&e({scope:{days:z.value}})])}function qe(){return 1===z.value.length&&parseInt(v.columnCount,10)>0?[!0===G.value&&v.leftColumnOptions.map((e,t)=>Fe(e,t)),Array.apply(null,new Array(parseInt(v.columnCount,10))).map((e,t)=>t+parseInt(v.columnIndexStart,10)).map(e=>Se(z.value[0],0,e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>Fe(e,t))]:[!0===G.value&&v.leftColumnOptions.map((e,t)=>Fe(e,t)),z.value.map((e,t)=>Se(e)),!0===J.value&&v.rightColumnOptions.map((e,t)=>Fe(e,t))]}function Fe(e,t){const a=f.column,n={column:e,days:z.value,index:t},r=!0===C.value?v.cellWidth:ee.value,o=!0===v.focusable&&v.focusType.includes("day"),u=void 0!==v.columnOptionsId?e[v.columnOptionsId]:void 0;return Te.h("div",{key:u,tabindex:!0===o?0:-1,class:{"q-calendar-agenda__day":!0,"q-column-day":!0,"q-calendar__hoverable":!0===v.hoverable,"q-calendar__focusable":!0===o},style:{maxWidth:r,width:r},onDragenter:e=>{void 0!==v.dragEnterFunc&&"function"===typeof v.dragEnterFunc&&(!0===v.dragEnterFunc(e,"column",n)?g.value=u:g.value="")},onDragover:e=>{void 0!==v.dragOverFunc&&"function"===typeof v.dragOverFunc&&(!0===v.dragOverFunc(e,"column",n)?g.value=u:g.value="")},onDragleave:e=>{void 0!==v.dragLeaveFunc&&"function"===typeof v.dragLeaveFunc&&(!0===v.dragLeaveFunc(e,"column",n)?g.value=u:g.value="")},onDrop:e=>{void 0!==v.dropFunc&&"function"===typeof v.dropFunc&&(!0===v.dropFunc(e,"column",n)?g.value=u:g.value="")},...$("-column",(e,t)=>{return{scope:n,event:e}})},[a&&a({scope:n})])}function Se(e,t,a){const n=f.day,r=P(e,a),o=!0===C.value?v.cellWidth:ee.value,u={width:o,maxWidth:o};return!0===C.value&&(u.minWidth=o),u.height=parseInt(v.dayHeight,10)>0?Me(parseInt(v.dayHeight,10)):"auto",parseInt(v.dayMinHeight,10)>0&&(u.minHeight=Me(parseInt(v.dayMinHeight,10))),Te.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-agenda__day":!0,...M(e)},style:u},[n&&n({scope:r})])}function xe(){if(j.value){const{start:a,end:n,maxDays:r}=L.value;d.value=a.date,s.value=n.date,c.value=r}const e=p.width>0,t=Te.withDirectives(Te.h("div",{class:"q-calendar-agenda",key:d.value},[!0===e&&!0!==C.value&&!0!==v.noHeader&&ie(),!0===e&&ke()]),[[je,re]]);if(!0!==v.animated)return t;{const o="q-calendar--"+("prev"===i.value?v.transitionPrev:v.transitionNext);return Te.h(Te.Transition,{name:o,appear:!0},()=>t)}}return Te.watch([z],X,{deep:!0,immediate:!0}),Te.watch(()=>v.modelValue,(e,t)=>{if(m.value!==e){if(!0===v.animated){const a=Ee(Ie(e)),n=Ee(Ie(t));i.value=a>=n?"next":"prev"}m.value=e}h.value=e}),Te.watch(m,(e,t)=>{if(m.value!==v.modelValue){if(!0===v.animated){const a=Ee(Ie(e)),n=Ee(Ie(t));i.value=a>=n?"next":"prev"}l("update:model-value",e)}}),Te.watch(h,e=>{e&&(r.value=Oe(e))}),Te.watch(r,e=>{y.value[h.value]?y.value[h.value].focus():K()}),Te.watch(()=>v.maxDays,e=>{c.value=e}),Te.onBeforeUpdate(()=>{y.value={}}),Te.onMounted(()=>{V()}),e({prev:ne,next:ae,move:Y,moveToToday:te,updateCurrent:S}),()=>N()}}),Je="@quasar/quasar-ui-qcalendar",et="4.0.0-beta.3",tt="Jeff Galbraith <jeff@quasar.dev>",at="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",nt="MIT",rt="dist/index.esm.js",ot="dist/index.common.js",ut="dist/types/index.d.ts",lt={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},it={type:"github",url:"https://github.com/sponsors/hawkeye64"},dt={access:"public"},st={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},ct="https://github.com/quasarframework/quasar-ui-qcalendar/issues",vt="https://github.com/quasarframework/quasar-ui-qcalendar",ft=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ht={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},yt={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},mt=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],mt={name:Je,version:et,author:tt,description:at,license:nt,module:rt,main:ot,typings:ut,scripts:lt,funding:it,publishConfig:dt,repository:st,bugs:ct,homepage:vt,keywords:ft,vetur:ht,devDependencies:yt,browserslist:mt};const{version:pt}=mt;e.QCalendarAgenda=Ge,e.version=pt,Object.defineProperty(e,"__esModule",{value:!0})});
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var vue=require("vue");const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const d=parsed(r[s][0]),c=parsed(r[s][1]);if(isBetweenDates(e,d,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],l=42,s=0){const d=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===d;if(d<getDayIdentifier(e))return c;while((!y||c.length<s)&&c.length<l){if(m=getDayIdentifier(v),y=y||m>d&&c.length>=s,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,u,i),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=copyTimestamp(t);u.push(updateMinutes(l,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),i=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),l=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:l,ariaDateFormatter:s,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:l}){const s=vue.computed(()=>parseInt(o.intervalStart,10)),y=vue.computed(()=>parseInt(o.intervalMinutes,10)),d=vue.computed(()=>parseInt(o.intervalCount,10)),p=vue.computed(()=>parseFloat(o.intervalHeight)),m=vue.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&l.value&&(e=l.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),f=vue.computed(()=>s.value*y.value),c=vue.computed(()=>d.value*p.value),v=vue.computed(()=>d.value*m.value),h=vue.computed(()=>k(a.value)),g=vue.computed(()=>_(r.value)),w=vue.computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=vue.computed(()=>{return w.value.map(e=>createIntervalList(e,s.value,y.value,d.value,t.now))});function k(e){return getStartOfWeek(e,o.weekdays,t.today)}function _(e){return getEndOfWeek(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function A(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=f.value,i=e,l=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:l).clientY,c=(d-o.top)/p.value,v=Math.floor((a?Math.floor(c):c)*y.value),m=u+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function O(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=f.value,i=e,l=e,s=i.changedTouches||i.touches,d=(s&&s[0]?s[0]:l).clientY,c=(d-o.top)/p.value,v=Math.floor((a?Math.floor(c):c)*y.value),m=u+v;return updateMinutes(r,m,n)}function q(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,s=(l&&l[0]?l[0]:i).clientX,d=(s-o.left)/m.value,c=Math.floor((a?Math.floor(d):d)*y.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function H(e,t){const a={timestamp:e};return a.timeStartPos=B,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function x(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=U,a.timeDurationWidth=z,void 0!==t&&(a.index=t),a}function W(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function R(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/y.value*p.value}function z(e){return e/y.value*m.value}function P(e){return parseInt(e,10)*y.value/p.value}function Y(e){return parseInt(e,10)*y.value/m.value}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=d.value*y.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function U(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=d.value*y.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:s,parsedIntervalMinutes:y,parsedIntervalCount:d,parsedIntervalHeight:p,parsedCellWidth:m,parsedStartMinute:f,bodyHeight:c,bodyWidth:v,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:C,styleDefault:A,getTimestampAtEventInterval:F,getTimestampAtEvent:O,getTimestampAtEventX:q,getScopeForSlot:H,getScopeForSlotX:x,scrollToTime:W,scrollToTimeX:R,timeDurationHeight:L,timeDurationWidth:z,heightToMinutes:P,widthToMinutes:Y,timeStartPos:B,timeStartPosX:U}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:l,parsedValue:s,weekdaySkips:d,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===d.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:l,weekdaySkips:s,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return d.value="next",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);d.value="prev";do{t=addToDate(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);d.value="next";do{t=addToDate(t,{day:1})}while(0===s.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));d.value="prev",r.value=t.date}function _(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));d.value="next",r.value=t.date}function b(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarDay=vue.defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:y,emit:c,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),p=vue.ref(null),r=vue.ref(null),f=vue.ref({}),o=vue.ref({}),u=vue.ref({}),i=vue.ref("next"),l=vue.ref(m.modelValue||today()),s=vue.ref("0000-00-00"),d=vue.ref(0),h=vue.ref(m.modelValue),v=vue.reactive({width:0,height:0}),g=vue.ref(!1),w=vue.ref(!1),D=vue.ref(null),k=vue.ref(null),_=vue.computed(()=>{if("month"===m.view)return"month-interval";return m.view}),b=vue.getCurrentInstance();if(null===b)throw new Error("current instance is null");const{emitListeners:T}=useEmitListeners(b),{isSticky:I}=useCellWidth(m),{times:M,setCurrent:S,updateCurrent:N}=useTimes(m);N(),S();const{weekdaySkips:E,parsedStart:C,parsedEnd:A,dayFormatter:F,weekdayFormatter:O,ariaDateFormatter:q,dayStyleDefault:H,getRelativeClasses:x}=useCommon(m,{startDate:l,endDate:s,times:M}),W=vue.computed(()=>{return parseTimestamp(m.modelValue,M.now)||C.value||M.today});r.value=W.value,p.value=W.value.date;const R=vue.computed(()=>{if(0===d.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===U.value||0===U.value.length)return!0;const e=U.value[0];const t=U.value[U.value.length-1];return!0!==isBetweenDates(W.value,e,t)}),{renderValues:L}=useRenderValues(m,{parsedView:_,times:M,parsedValue:W}),{rootRef:z,scrollWidth:P,__initCalendar:Y,__renderCalendar:B}=useCalendar(m,je,{scrollArea:t,pane:a}),{days:U,intervals:j,intervalFormatter:V,ariaDateTimeFormatter:$,parsedCellWidth:X,getIntervalClasses:K,showIntervalLabelDefault:Z,styleDefault:Q,getTimestampAtEventInterval:G,getTimestampAtEvent:J,getScopeForSlot:ee,scrollToTime:te,heightToMinutes:ae,timeDurationHeight:ne,timeStartPos:re}=useInterval(m,{weekdaySkips:E,times:M,scrollArea:t,parsedStart:C,parsedEnd:A,maxDays:d,size:v,headerColumnRef:n}),{move:oe}=useMove(m,{parsedView:_,parsedValue:W,weekdaySkips:E,direction:i,maxDays:d,times:M,emittedValue:h,emit:c}),{getDefaultMouseEventHandlers:ue}=useMouse(c,T),{checkChange:ie}=useCheckChange(c,{days:U,lastStart:D,lastEnd:k}),{isKeyCode:le}=useEvents(),{tryFocus:se}=useKeyboard(m,{rootRef:z,focusRef:p,focusValue:r,datesRef:f,days:U,parsedView:_,parsedValue:W,emittedValue:h,weekdaySkips:E,direction:i,times:M}),de=vue.computed(()=>{{if("day"===m.view&&parseInt(m.columnCount,10)>1)return parseInt(m.columnCount,10);if("day"===m.view&&m.maxDays&&m.maxDays>1)return m.maxDays}return U.value.length}),ce=vue.computed(()=>{if(z.value)return parseInt(getComputedStyle(z.value).getPropertyValue("--calendar-intervals-width"),10);return 0}),ve=vue.computed(()=>{if(z.value){const e=v.width||z.value.getBoundingClientRect().width;if(e&&ce.value&&de.value)return(e-P.value-ce.value)/de.value+"px"}return 100/de.value+"%"});function me(){h.value=today()}function ye(e=1){oe(e)}function pe(e=1){oe(-e)}function fe({width:e,height:t}){v.width=e,v.height=t}function he(e){return e.date===h.value}function ge(){return vue.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===I.value},style:{marginRight:P.value+"px"}},[we(),De()])}function we(){const e=y["head-intervals"],t={timestamps:U.value,days:U.value,date:m.modelValue};return vue.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===I.value},...ue("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function De(){return vue.h("div",{ref:n,class:{"q-calendar-day__head--days__column":!0}},[ke(),_e()])}function ke(){return vue.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...be()])}function _e(){const e=y["head-days-events"];return vue.nextTick(()=>{if(u.value&&0===parseInt(m.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),vue.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&vue.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:U.value,ref:u}})]),...Te()])}function be(){return 1===U.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ie(U.value[0],e)):U.value.map(e=>Ie(e))}function Te(){return 1===U.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Se(U.value[0],e)):U.value.map(e=>Se(e))}function Ie(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&he(t),o=ee(t,e);o.activeDate=r,o.droppable=g.value===t.date;const u=!0===I.value?m.cellWidth:ve.value,i=m.weekdayStyle||H,l={width:u,maxWidth:u,minWidth:u,...i({scope:o})};!0===I.value&&(l.minWidth=u);const s="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},d=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===d?0:-1,class:{"q-calendar-day__head--day":!0,...s,...x(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===d},style:l,onFocus:e=>{!0===d&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&le(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&le(e,[13,32])&&(h.value=t.date)},...ue("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")}};return vue.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Fe(t,e),void 0===a&&Me(t),void 0===a&&n&&n({scope:o}),void 0===a&&Oe(t,e),useFocusHelper()])}function Me(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&Ne(e),!0!==m.noDefaultHeaderBtn&&Ce(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&Ne(e),!0!==m.noDefaultHeaderBtn&&Ce(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&Ce(e),!0!==m.noDefaultHeaderText&&Ne(e)])):void 0}function Se(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&he(e),r=ee(e,t);r.activeDate=n;const o=!0===I.value?convertToUnit(X.value):ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===I.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...x(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function Ne(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=ee(e);n.shortWeekdayLabel=m.shortWeekdayLabel;const r={class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||Ee(e,a))}function Ee(e,t){const a=O.value(e,t||m.weekdayBreakpoints[0]>0&&X.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&X.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function Ce(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return vue.h("div",t,Ae(e))}function Ae(a){const e=!0!==m.noActiveDate&&he(a),t=F.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&le(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&le(e,[13,32])&&(h.value=a.date,void 0!==T.value.onClickDate&&c("click-date",{scope:o}))},...ue("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=q.value(a)),r?r({scope:o}):useButton(m,u,n?n({scope:o}):t)}function Fe(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Oe(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function qe(){return vue.h("div",{class:"q-calendar-day__body"},[He()])}function He(){return!0===I.value?vue.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==I.value&&Ye(),We()]):!0===m.noScroll?xe():vue.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[xe()])}function xe(){return vue.h("div",{ref:a,class:"q-calendar-day__pane"},[Ye(),We()])}function We(){const e=y["day-container"];return vue.h("div",{class:"q-calendar-day__day-container"},[!0===I.value&&!0!==m.noHeader&&ge(),vue.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===I.value&&Ye(),...Re()]),e&&e({scope:{days:U.value}})])}function Re(){return 1===U.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Le(U.value[0],0,e)):U.value.map((e,t)=>Le(e,t))}function Le(e,t,a){const n=y["day-body"],r=ee(e,a),o=!0===I.value?m.cellWidth:ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===I.value&&(u.minWidth=o),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...x(e)},style:u},[...ze(t,a),n&&n({scope:r})])}function ze(e,t){return j.value[e].map(e=>Pe(e,t))}function Pe(a,n){const e=convertToUnit(m.intervalHeight),t=m.intervalStyle||Q,r=y["day-interval"],o=ee(a,n);o.droppable=w.value===getDayTimeIdentifier(a);const u="function"===typeof m.intervalClass?m.intervalClass({scope:o}):{},i=!0===m.focusable&&m.focusType.includes("interval"),l=getDateTime(a),s={key:l,tabindex:!0===i?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...K(a,m.selectedDates,m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===i},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onKeydown:e=>{le(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(le(e,[13,32])){const t=ee(a,n);h.value=t.timestamp.date,void 0!==T.value.onClickTime&&c("click-time",{scope:t,event:e})}},...ue("-time",e=>{const t=ee(G(e,a,m.timeClicksClamped,M.now),n);return{scope:t,event:e}})};!0!==m.noAria&&(s.ariaLabel=$.value(a));const d=r?r({scope:o}):void 0;return vue.h("div",s,[d,useFocusHelper()])}function Ye(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===I.value},...ue("-interval",e=>{const t=J(e,C.value,m.timeClicksClamped,M.now);return{scope:{timestamp:t},event:e}})};return vue.h("div",e,Be())}function Be(){return j.value[0].map(e=>Ue(e))}function Ue(e){const t=y["interval-label"],a=convertToUnit(m.intervalHeight),n=m.shortIntervalLabel,r=m.showIntervalLabel||Z,o=r(e),u=o?V.value(e,n):void 0;return vue.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[vue.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function je(){if(R.value){const{start:a,end:n,maxDays:r}=L.value;l.value=a.date,s.value=n.date,d.value=r}const e=v.width>0,t=vue.withDirectives(vue.h("div",{key:l.value,class:"q-calendar-day"},[!0===e&&!0!==I.value&&!0!==m.noHeader&&ge(),e&&qe()]),[[ResizeObserver$1,fe]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===i.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>t)}}return vue.watch([U],ie,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(h.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}h.value=e}p.value=e}),vue.watch(h,(e,t)=>{if(h.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(r.value=parseTimestamp(e))}),vue.watch(r,e=>{f.value[p.value]?f.value[p.value].focus():se()}),vue.watch(()=>m.maxDays,e=>{d.value=e}),vue.onBeforeUpdate(()=>{f.value={};o.value={};u.value={}}),vue.onMounted(()=>{Y()}),e({prev:pe,next:ye,move:oe,moveToToday:me,updateCurrent:N,timeStartPos:re,timeDurationHeight:ne,heightToMinutes:ae,scrollToTime:te}),()=>B()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarDay:QCalendarDay,install(e){e.component(QCalendarDay.name,QCalendarDay)}};module.exports=Plugin;
"use strict";var vue=require("vue");const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],l=42,d=0){const s=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===s;if(s<getDayIdentifier(e))return c;while((!y||c.length<d)&&c.length<l){if(m=getDayIdentifier(v),y=y||m>s&&c.length>=d,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,u,i),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,l=copyTimestamp(t);u.push(updateMinutes(l,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:l,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),i=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),l=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:i,betweenDays:l}=c(n,e);return{"q-past-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==l&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===l,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:l}){const d=vue.computed(()=>parseInt(o.intervalStart,10)),v=vue.computed(()=>parseInt(o.intervalMinutes,10)),s=vue.computed(()=>parseInt(o.intervalCount,10)),m=vue.computed(()=>parseFloat(o.intervalHeight)),y=vue.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&l.value&&(e=l.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=vue.computed(()=>d.value*v.value),p=vue.computed(()=>s.value*m.value),f=vue.computed(()=>s.value*y.value),h=vue.computed(()=>k(a.value)),g=vue.computed(()=>_(r.value)),w=vue.computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=vue.computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,v.value,s.value,t.now))});function k(e){return getStartOfWeek(e,o.weekdays,t.today)}function _(e){return getEndOfWeek(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function A(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function O(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function q(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,l=u.changedTouches||u.touches,d=(l&&l[0]?l[0]:i).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function H(e,t){const a={timestamp:e};return a.timeStartPos=B,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function x(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=U,a.timeDurationWidth=z,void 0!==t&&(a.index=t),a}function W(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function R(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function z(e){return e/v.value*y.value}function P(e){return parseInt(e,10)*v.value/m.value}function Y(e){return parseInt(e,10)*v.value/y.value}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*p.value;return t&&(u<0&&(u=0),u>p.value&&(u=p.value)),u}function U(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value&&(u=f.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:C,styleDefault:A,getTimestampAtEventInterval:F,getTimestampAtEvent:O,getTimestampAtEventX:q,getScopeForSlot:H,getScopeForSlotX:x,scrollToTime:W,scrollToTimeX:R,timeDurationHeight:L,timeDurationWidth:z,heightToMinutes:P,widthToMinutes:Y,timeStartPos:B,timeStartPosX:U}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:l,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);s.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);s.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===i.value)return void(l.value=t.date);r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));s.value="prev",r.value=t.date}function _(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));s.value="next",r.value=t.date}function b(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarDay=vue.defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:y,emit:c,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),p=vue.ref(null),r=vue.ref(null),f=vue.ref({}),o=vue.ref({}),u=vue.ref({}),i=vue.ref("next"),l=vue.ref(m.modelValue||today()),d=vue.ref("0000-00-00"),s=vue.ref(0),h=vue.ref(m.modelValue),v=vue.reactive({width:0,height:0}),g=vue.ref(!1),w=vue.ref(!1),D=vue.ref(null),k=vue.ref(null),_=vue.computed(()=>{if("month"===m.view)return"month-interval";return m.view}),b=vue.getCurrentInstance();if(null===b)throw new Error("current instance is null");const{emitListeners:T}=useEmitListeners(b),{isSticky:I}=useCellWidth(m),{times:M,setCurrent:S,updateCurrent:N}=useTimes(m);N(),S();const{weekdaySkips:E,parsedStart:C,parsedEnd:A,dayFormatter:F,weekdayFormatter:O,ariaDateFormatter:q,dayStyleDefault:H,getRelativeClasses:x}=useCommon(m,{startDate:l,endDate:d,times:M}),W=vue.computed(()=>{return parseTimestamp(m.modelValue,M.now)||C.value||M.today});r.value=W.value,p.value=W.value.date;const R=vue.computed(()=>{if(0===s.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===U.value||0===U.value.length)return!0;const e=U.value[0];const t=U.value[U.value.length-1];return!0!==isBetweenDates(W.value,e,t)}),{renderValues:L}=useRenderValues(m,{parsedView:_,times:M,parsedValue:W}),{rootRef:z,scrollWidth:P,__initCalendar:Y,__renderCalendar:B}=useCalendar(m,je,{scrollArea:t,pane:a}),{days:U,intervals:j,intervalFormatter:V,ariaDateTimeFormatter:$,parsedCellWidth:X,getIntervalClasses:K,showIntervalLabelDefault:Z,styleDefault:Q,getTimestampAtEventInterval:G,getTimestampAtEvent:J,getScopeForSlot:ee,scrollToTime:te,heightToMinutes:ae,timeDurationHeight:ne,timeStartPos:re}=useInterval(m,{weekdaySkips:E,times:M,scrollArea:t,parsedStart:C,parsedEnd:A,maxDays:s,size:v,headerColumnRef:n}),{move:oe}=useMove(m,{parsedView:_,parsedValue:W,weekdaySkips:E,direction:i,maxDays:s,times:M,emittedValue:h,emit:c}),{getDefaultMouseEventHandlers:ue}=useMouse(c,T),{checkChange:ie}=useCheckChange(c,{days:U,lastStart:D,lastEnd:k}),{isKeyCode:le}=useEvents(),{tryFocus:de}=useKeyboard(m,{rootRef:z,focusRef:p,focusValue:r,datesRef:f,days:U,parsedView:_,parsedValue:W,emittedValue:h,weekdaySkips:E,direction:i,times:M}),se=vue.computed(()=>{{if("day"===m.view&&parseInt(m.columnCount,10)>1)return parseInt(m.columnCount,10);if("day"===m.view&&m.maxDays&&m.maxDays>1)return m.maxDays}return U.value.length}),ce=vue.computed(()=>{if(z.value)return parseInt(getComputedStyle(z.value).getPropertyValue("--calendar-intervals-width"),10);return 0}),ve=vue.computed(()=>{if(z.value){const e=v.width||z.value.getBoundingClientRect().width;if(e&&ce.value&&se.value)return(e-P.value-ce.value)/se.value+"px"}return 100/se.value+"%"});function me(){h.value=today()}function ye(e=1){oe(e)}function pe(e=1){oe(-e)}function fe({width:e,height:t}){v.width=e,v.height=t}function he(e){return e.date===h.value}function ge(){return vue.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===I.value},style:{marginRight:P.value+"px"}},[we(),De()])}function we(){const e=y["head-intervals"],t={timestamps:U.value,days:U.value,date:m.modelValue};return vue.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===I.value},...ue("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function De(){return vue.h("div",{ref:n,class:{"q-calendar-day__head--days__column":!0}},[ke(),_e()])}function ke(){return vue.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...be()])}function _e(){const e=y["head-days-events"];return vue.nextTick(()=>{if(u.value&&0===parseInt(m.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),vue.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&vue.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:U.value,ref:u}})]),...Te()])}function be(){return 1===U.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ie(U.value[0],e)):U.value.map(e=>Ie(e))}function Te(){return 1===U.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Se(U.value[0],e)):U.value.map(e=>Se(e))}function Ie(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&he(t),o=ee(t,e);o.activeDate=r,o.droppable=g.value===t.date;const u=!0===I.value?m.cellWidth:ve.value,i=m.weekdayStyle||H,l={width:u,maxWidth:u,minWidth:u,...i({scope:o})};!0===I.value&&(l.minWidth=u);const d="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...x(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:e=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&le(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&le(e,[13,32])&&(h.value=t.date)},...ue("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")}};return vue.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Fe(t,e),void 0===a&&Me(t),void 0===a&&n&&n({scope:o}),void 0===a&&Oe(t,e),useFocusHelper()])}function Me(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&Ne(e),!0!==m.noDefaultHeaderBtn&&Ce(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&Ne(e),!0!==m.noDefaultHeaderBtn&&Ce(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&Ce(e),!0!==m.noDefaultHeaderText&&Ne(e)])):void 0}function Se(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&he(e),r=ee(e,t);r.activeDate=n;const o=!0===I.value?convertToUnit(X.value):ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===I.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...x(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function Ne(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=ee(e);n.shortWeekdayLabel=m.shortWeekdayLabel;const r={class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||Ee(e,a))}function Ee(e,t){const a=O.value(e,t||m.weekdayBreakpoints[0]>0&&X.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&X.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function Ce(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return vue.h("div",t,Ae(e))}function Ae(a){const e=!0!==m.noActiveDate&&he(a),t=F.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&le(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&le(e,[13,32])&&(h.value=a.date,void 0!==T.value.onClickDate&&c("click-date",{scope:o}))},...ue("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==m.noAria&&(u.ariaLabel=q.value(a)),r?r({scope:o}):useButton(m,u,n?n({scope:o}):t)}function Fe(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Oe(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function qe(){return vue.h("div",{class:"q-calendar-day__body"},[He()])}function He(){return!0===I.value?vue.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==I.value&&Ye(),We()]):!0===m.noScroll?xe():vue.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[xe()])}function xe(){return vue.h("div",{ref:a,class:"q-calendar-day__pane"},[Ye(),We()])}function We(){const e=y["day-container"];return vue.h("div",{class:"q-calendar-day__day-container"},[!0===I.value&&!0!==m.noHeader&&ge(),vue.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===I.value&&Ye(),...Re()]),e&&e({scope:{days:U.value}})])}function Re(){return 1===U.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Le(U.value[0],0,e)):U.value.map((e,t)=>Le(e,t))}function Le(e,t,a){const n=y["day-body"],r=ee(e,a),o=!0===I.value?m.cellWidth:ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===I.value&&(u.minWidth=o),vue.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...x(e)},style:u},[...ze(t,a),n&&n({scope:r})])}function ze(e,t){return j.value[e].map(e=>Pe(e,t))}function Pe(a,n){const e=convertToUnit(m.intervalHeight),t=m.intervalStyle||Q,r=y["day-interval"],o=ee(a,n);o.droppable=w.value===getDayTimeIdentifier(a);const u="function"===typeof m.intervalClass?m.intervalClass({scope:o}):{},i=!0===m.focusable&&m.focusType.includes("interval"),l=getDateTime(a),d={key:l,tabindex:!0===i?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...K(a,m.selectedDates,m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===i},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",o)?w.value=getDayTimeIdentifier(a):w.value="")},onKeydown:e=>{le(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(le(e,[13,32])){const t=ee(a,n);h.value=t.timestamp.date,void 0!==T.value.onClickTime&&c("click-time",{scope:t,event:e})}},...ue("-time",e=>{const t=ee(G(e,a,m.timeClicksClamped,M.now),n);return{scope:t,event:e}})};!0!==m.noAria&&(d.ariaLabel=$.value(a));const s=r?r({scope:o}):void 0;return vue.h("div",d,[s,useFocusHelper()])}function Ye(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===I.value},...ue("-interval",e=>{const t=J(e,C.value,m.timeClicksClamped,M.now);return{scope:{timestamp:t},event:e}})};return vue.h("div",e,Be())}function Be(){return j.value[0].map(e=>Ue(e))}function Ue(e){const t=y["interval-label"],a=convertToUnit(m.intervalHeight),n=m.shortIntervalLabel,r=m.showIntervalLabel||Z,o=r(e),u=o?V.value(e,n):void 0;return vue.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[vue.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function je(){if(R.value){const{start:a,end:n,maxDays:r}=L.value;l.value=a.date,d.value=n.date,s.value=r}const e=v.width>0,t=vue.withDirectives(vue.h("div",{key:l.value,class:"q-calendar-day"},[!0===e&&!0!==I.value&&!0!==m.noHeader&&ge(),e&&qe()]),[[ResizeObserver$1,fe]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===i.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>t)}}return vue.watch([U],ie,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(h.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}h.value=e}p.value=e}),vue.watch(h,(e,t)=>{if(h.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(r.value=parseTimestamp(e))}),vue.watch(r,e=>{f.value[p.value]?f.value[p.value].focus():de()}),vue.watch(()=>m.maxDays,e=>{s.value=e}),vue.onBeforeUpdate(()=>{f.value={};o.value={};u.value={}}),vue.onMounted(()=>{Y()}),e({prev:pe,next:ye,move:oe,moveToToday:me,updateCurrent:N,timeStartPos:re,timeDurationHeight:ne,heightToMinutes:ae,scrollToTime:te}),()=>B()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarDay:QCalendarDay,install(e){e.component(QCalendarDay.name,QCalendarDay)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const i=getDayIdentifier(parsed(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],l=42,d=0){const s=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===s;if(s<getDayIdentifier(e))return c;while((!y||c.length<d)&&c.length<l){if(m=getDayIdentifier(v),y=y||m>s&&c.length>=d,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,i,u),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,l=copyTimestamp(t);i.push(updateMinutes(l,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:l,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),u=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),l=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:l}=c(n,e);return{"q-past-day":!0!==i&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===l,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i;const a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i;const a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:i,size:u,headerColumnRef:l}){const d=computed(()=>parseInt(o.intervalStart,10)),y=computed(()=>parseInt(o.intervalMinutes,10)),s=computed(()=>parseInt(o.intervalCount,10)),p=computed(()=>parseFloat(o.intervalHeight)),m=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:u.width>0&&l.value&&(e=l.value.offsetWidth/(o.columnCount>1?o.columnCount:i.value));return e}),f=computed(()=>d.value*y.value),c=computed(()=>s.value*p.value),v=computed(()=>s.value*m.value),h=computed(()=>k(a.value)),g=computed(()=>_(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,i.value)}),D=computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,y.value,s.value,t.now))});function k(e){return getStartOfWeek(e,o.weekdays,t.today)}function _(e){return getEndOfWeek(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:i}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function C(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function A(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=f.value,u=e,l=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:l).clientY,c=(s-o.top)/p.value,v=Math.floor((a?Math.floor(c):c)*y.value),m=i+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function O(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),i=f.value,u=e,l=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:l).clientY,c=(s-o.top)/p.value,v=Math.floor((a?Math.floor(c):c)*y.value),m=i+v;return updateMinutes(r,m,n)}function q(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),i=e,u=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:u).clientX,s=(d-o.left)/m.value,c=Math.floor((a?Math.floor(s):s)*y.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function x(e,t){const a={timestamp:e};return a.timeStartPos=B,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function H(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=U,a.timeDurationWidth=z,void 0!==t&&(a.index=t),a}function W(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function R(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/y.value*p.value}function z(e){return e/y.value*m.value}function P(e){return parseInt(e,10)*y.value/p.value}function Y(e){return parseInt(e,10)*y.value/m.value}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=s.value*y.value,o=(a-n)/r;let i=o*c.value;return t&&(i<0&&(i=0),i>c.value&&(i=c.value)),i}function U(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=s.value*y.value,o=(a-n)/r;let i=o*v.value;return t&&(i<0&&(i=0),i>v.value&&(i=v.value)),i}return{parsedIntervalStart:d,parsedIntervalMinutes:y,parsedIntervalCount:s,parsedIntervalHeight:p,parsedCellWidth:m,parsedStartMinute:f,bodyHeight:c,bodyWidth:v,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:C,showResourceLabelDefault:E,styleDefault:A,getTimestampAtEventInterval:F,getTimestampAtEvent:O,getTimestampAtEventX:q,getScopeForSlot:x,getScopeForSlotX:H,scrollToTime:W,scrollToTimeX:R,timeDurationHeight:L,timeDurationWidth:z,heightToMinutes:P,widthToMinutes:Y,timeStartPos:B,timeStartPosX:U}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,times:i,parsedValue:u}){const e=computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};i in t?Array.isArray(t[i])?t[i].push(u):t[i]=[t[i],u]:t[i]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:i,parsedView:u,emittedValue:l,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{i.value[r.value]?(i.value[r.value].focus(),50!==++e&&document.activeElement!==i.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);s.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);s.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:-1}):"week"===u.value&&(t=addToDate(t,{day:-7}));s.value="prev",r.value=t.date}function _(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:1}):"week"===u.value&&(t=addToDate(t,{day:7}));s.value="next",r.value=t.date}function b(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getStartOfMonth(t):"week"===u.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getEndOfMonth(t):"week"===u.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarDay=defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:y,emit:c,expose:e}){const t=ref(null),a=ref(null),n=ref(null),p=ref(null),r=ref(null),f=ref({}),o=ref({}),i=ref({}),u=ref("next"),l=ref(m.modelValue||today()),d=ref("0000-00-00"),s=ref(0),g=ref(m.modelValue),v=reactive({width:0,height:0}),w=ref(!1),D=ref(!1),k=ref(null),_=ref(null),b=computed(()=>{if("month"===m.view)return"month-interval";return m.view}),T=getCurrentInstance();if(null===T)throw new Error("current instance is null");const{emitListeners:I}=useEmitListeners(T),{isSticky:M}=useCellWidth(m),{times:S,setCurrent:N,updateCurrent:C}=useTimes(m);C(),N();const{weekdaySkips:E,parsedStart:A,parsedEnd:F,dayFormatter:O,weekdayFormatter:q,ariaDateFormatter:x,dayStyleDefault:H,getRelativeClasses:W}=useCommon(m,{startDate:l,endDate:d,times:S}),R=computed(()=>{return parseTimestamp(m.modelValue,S.now)||A.value||S.today});r.value=R.value,p.value=R.value.date;const L=computed(()=>{if(0===s.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===j.value||0===j.value.length)return!0;const e=j.value[0];const t=j.value[j.value.length-1];return!0!==isBetweenDates(R.value,e,t)}),{renderValues:z}=useRenderValues(m,{parsedView:b,times:S,parsedValue:R}),{rootRef:P,scrollWidth:Y,__initCalendar:B,__renderCalendar:U}=useCalendar(m,Ve,{scrollArea:t,pane:a}),{days:j,intervals:V,intervalFormatter:X,ariaDateTimeFormatter:$,parsedCellWidth:K,getIntervalClasses:Z,showIntervalLabelDefault:Q,styleDefault:G,getTimestampAtEventInterval:J,getTimestampAtEvent:ee,getScopeForSlot:te,scrollToTime:ae,heightToMinutes:ne,timeDurationHeight:re,timeStartPos:oe}=useInterval(m,{weekdaySkips:E,times:S,scrollArea:t,parsedStart:A,parsedEnd:F,maxDays:s,size:v,headerColumnRef:n}),{move:ie}=useMove(m,{parsedView:b,parsedValue:R,weekdaySkips:E,direction:u,maxDays:s,times:S,emittedValue:g,emit:c}),{getDefaultMouseEventHandlers:ue}=useMouse(c,I),{checkChange:le}=useCheckChange(c,{days:j,lastStart:k,lastEnd:_}),{isKeyCode:de}=useEvents(),{tryFocus:se}=useKeyboard(m,{rootRef:P,focusRef:p,focusValue:r,datesRef:f,days:j,parsedView:b,parsedValue:R,emittedValue:g,weekdaySkips:E,direction:u,times:S}),ce=computed(()=>{{if("day"===m.view&&parseInt(m.columnCount,10)>1)return parseInt(m.columnCount,10);if("day"===m.view&&m.maxDays&&m.maxDays>1)return m.maxDays}return j.value.length}),ve=computed(()=>{if(P.value)return parseInt(getComputedStyle(P.value).getPropertyValue("--calendar-intervals-width"),10);return 0}),me=computed(()=>{if(P.value){const e=v.width||P.value.getBoundingClientRect().width;if(e&&ve.value&&ce.value)return(e-Y.value-ve.value)/ce.value+"px"}return 100/ce.value+"%"});function ye(){g.value=today()}function pe(e=1){ie(e)}function fe(e=1){ie(-e)}function he({width:e,height:t}){v.width=e,v.height=t}function ge(e){return e.date===g.value}function we(){return h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===M.value},style:{marginRight:Y.value+"px"}},[De(),ke()])}function De(){const e=y["head-intervals"],t={timestamps:j.value,days:j.value,date:m.modelValue};return h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===M.value},...ue("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ke(){return h("div",{ref:n,class:{"q-calendar-day__head--days__column":!0}},[_e(),be()])}function _e(){return h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...Te()])}function be(){const e=y["head-days-events"];return nextTick(()=>{if(i.value&&0===parseInt(m.columnCount,10)&&window)try{const e=window.getComputedStyle(i.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:j.value,ref:i}})]),...Ie()])}function Te(){return 1===j.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Me(j.value[0],e)):j.value.map(e=>Me(e))}function Ie(){return 1===j.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ne(j.value[0],e)):j.value.map(e=>Ne(e))}function Me(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&ge(t),o=te(t,e);o.activeDate=r,o.droppable=w.value===t.date;const i=!0===M.value?m.cellWidth:me.value,u=m.weekdayStyle||H,l={width:i,maxWidth:i,minWidth:i,...u({scope:o})};!0===M.value&&(l.minWidth=i);const d="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...W(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:e=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&de(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&de(e,[13,32])&&(g.value=t.date)},...ue("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")}};return h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Oe(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&qe(t,e),useFocusHelper()])}function Se(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&Ce(e),!0!==m.noDefaultHeaderBtn&&Ae(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&Ce(e),!0!==m.noDefaultHeaderBtn&&Ae(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&Ae(e),!0!==m.noDefaultHeaderText&&Ce(e)])):void 0}function Ne(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&ge(e),r=te(e,t);r.activeDate=n;const o=!0===M.value?convertToUnit(K.value):me.value,i={width:o,maxWidth:o,minWidth:o};return!0===M.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...W(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function Ce(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=te(e);n.shortWeekdayLabel=m.shortWeekdayLabel;const r={class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||Ee(e,a))}function Ee(e,t){const a=q.value(e,t||m.weekdayBreakpoints[0]>0&&K.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&K.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function Ae(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return h("div",t,Fe(e))}function Fe(a){const e=!0!==m.noActiveDate&&ge(a),t=O.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},i={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&de(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&de(e,[13,32])&&(g.value=a.date,void 0!==I.value.onClickDate&&c("click-date",{scope:o}))},...ue("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(g.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==m.noAria&&(i.ariaLabel=x.value(a)),r?r({scope:o}):useButton(m,i,n?n({scope:o}):t)}function Oe(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function qe(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function xe(){return h("div",{class:"q-calendar-day__body"},[He()])}function He(){return!0===M.value?h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==M.value&&Be(),Re()]):!0===m.noScroll?We():h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[We()])}function We(){return h("div",{ref:a,class:"q-calendar-day__pane"},[Be(),Re()])}function Re(){const e=y["day-container"];return h("div",{class:"q-calendar-day__day-container"},[!0===M.value&&!0!==m.noHeader&&we(),h("div",{style:{display:"flex",flexDirection:"row"}},[!0===M.value&&Be(),...Le()]),e&&e({scope:{days:j.value}})])}function Le(){return 1===j.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>ze(j.value[0],0,e)):j.value.map((e,t)=>ze(e,t))}function ze(e,t,a){const n=y["day-body"],r=te(e,a),o=!0===M.value?m.cellWidth:me.value,i={width:o,maxWidth:o,minWidth:o};return!0===M.value&&(i.minWidth=o),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...W(e)},style:i},[...Pe(t,a),n&&n({scope:r})])}function Pe(e,t){return V.value[e].map(e=>Ye(e,t))}function Ye(a,n){const e=convertToUnit(m.intervalHeight),t=m.intervalStyle||G,r=y["day-interval"],o=te(a,n);o.droppable=D.value===getDayTimeIdentifier(a);const i="function"===typeof m.intervalClass?m.intervalClass({scope:o}):{},u=!0===m.focusable&&m.focusType.includes("interval"),l=getDateTime(a),d={key:l,tabindex:!0===u?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...Z(a,m.selectedDates,m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===u},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onKeydown:e=>{de(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(de(e,[13,32])){const t=te(a,n);g.value=t.timestamp.date,void 0!==I.value.onClickTime&&c("click-time",{scope:t,event:e})}},...ue("-time",e=>{const t=te(J(e,a,m.timeClicksClamped,S.now),n);return{scope:t,event:e}})};!0!==m.noAria&&(d.ariaLabel=$.value(a));const s=r?r({scope:o}):void 0;return h("div",d,[s,useFocusHelper()])}function Be(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===M.value},...ue("-interval",e=>{const t=ee(e,A.value,m.timeClicksClamped,S.now);return{scope:{timestamp:t},event:e}})};return h("div",e,Ue())}function Ue(){return V.value[0].map(e=>je(e))}function je(e){const t=y["interval-label"],a=convertToUnit(m.intervalHeight),n=m.shortIntervalLabel,r=m.showIntervalLabel||Q,o=r(e),i=o?X.value(e,n):void 0;return h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function Ve(){if(L.value){const{start:a,end:n,maxDays:r}=z.value;l.value=a.date,d.value=n.date,s.value=r}const e=v.width>0,t=withDirectives(h("div",{key:l.value,class:"q-calendar-day"},[!0===e&&!0!==M.value&&!0!==m.noHeader&&we(),e&&xe()]),[[ResizeObserver$1,he]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>t)}}return watch([j],le,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(g.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}g.value=e}p.value=e}),watch(g,(e,t)=>{if(g.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(p,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{f.value[p.value]?f.value[p.value].focus():se()}),watch(()=>m.maxDays,e=>{s.value=e}),onBeforeUpdate(()=>{f.value={};o.value={};i.value={}}),onMounted(()=>{B()}),e({prev:fe,next:pe,move:ie,moveToToday:ye,updateCurrent:C,timeStartPos:oe,timeDurationHeight:re,heightToMinutes:ne,scrollToTime:ae}),()=>U()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarDay:QCalendarDay,install(e){e.component(QCalendarDay.name,QCalendarDay)}};export default Plugin;export{QCalendarDay,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const i=getDayIdentifier(parsed(t));o<=i&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,s,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),i=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+i+a(i/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,i=[],u=[],l=42,d=0){const s=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===s;if(s<getDayIdentifier(e))return c;while((!y||c.length<d)&&c.length<l){if(m=getDayIdentifier(v),y=y||m>s&&c.length>=d,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,i,u),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const i=[];for(let e=0;e<r;++e){const u=(a+e)*n,l=copyTimestamp(t);i.push(updateMinutes(l,u,o))}return i}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),i=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=i}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=reactive({width:0,height:0}),o=ref(null);function i({width:e,height:t}){r.width=e,r.height=t}const u=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,i]])}return{rootRef:o,scrollWidth:u,__initCalendar:l,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),i=computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),u=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),l=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:i,lastDay:u,betweenDays:l}=c(n,e);return{"q-past-day":!0!==i&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==i&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===i,"q-range":!0===l,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===i||!0===u||!0===l),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:i,dayFormatter:u,weekdayFormatter:l,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getVerticalScrollPosition(n);o<=0?u!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-i;const a=u+(r-u)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const i=void 0===arguments[3]?performance.now():arguments[3],u=getHorizontalScrollPosition(n);o<=0?u!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-i;const a=u+(r-u)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:i,size:u,headerColumnRef:l}){const d=computed(()=>parseInt(o.intervalStart,10)),v=computed(()=>parseInt(o.intervalMinutes,10)),s=computed(()=>parseInt(o.intervalCount,10)),m=computed(()=>parseFloat(o.intervalHeight)),y=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:u.width>0&&l.value&&(e=l.value.offsetWidth/(o.columnCount>1?o.columnCount:i.value));return e}),c=computed(()=>d.value*v.value),p=computed(()=>s.value*m.value),f=computed(()=>s.value*y.value),h=computed(()=>k(a.value)),g=computed(()=>_(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,i.value)}),D=computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,v.value,s.value,t.now))});function k(e){return getStartOfWeek(e,o.weekdays,t.today)}function _(e){return getEndOfWeek(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:i}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===i,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function C(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function E(e){}function A(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),i=e,u=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:u).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function O(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),i=e,u=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:u).clientY,s=(d-o.top)/m.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function q(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),i=e,u=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:u).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=B,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function H(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=U,a.timeDurationWidth=z,void 0!==t&&(a.index=t),a}function W(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function R(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function z(e){return e/v.value*y.value}function P(e){return parseInt(e,10)*v.value/m.value}function Y(e){return parseInt(e,10)*v.value/y.value}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let i=o*p.value;return t&&(i<0&&(i=0),i>p.value&&(i=p.value)),i}function U(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let i=o*f.value;return t&&(i<0&&(i=0),i>f.value&&(i=f.value)),i}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:p,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:C,showResourceLabelDefault:E,styleDefault:A,getTimestampAtEventInterval:F,getTimestampAtEvent:O,getTimestampAtEventX:q,getScopeForSlot:x,getScopeForSlotX:H,scrollToTime:W,scrollToTimeX:R,timeDurationHeight:L,timeDurationWidth:z,heightToMinutes:P,widthToMinutes:Y,timeStartPos:B,timeStartPosX:U}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();i(e,t.now),u(e,t.now),i(e,t.today)}function o(){return parseDate(new Date)}function i(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:i,updateTime:u}}function useRenderValues(r,{parsedView:o,times:i,parsedValue:u}){const e=computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,i.today),n=getEndOfWeek(a,r.weekdays,i.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const i="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};i in t?Array.isArray(t[i])?t[i].push(u):t[i]=[t[i],u]:t[i]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(u,{parsedView:l,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const i=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===s.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,i,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:i,parsedView:u,emittedValue:l,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{i.value[r.value]?(i.value[r.value].focus(),50!==++e&&document.activeElement!==i.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:_();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);s.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);s.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:-1}):"week"===u.value&&(t=addToDate(t,{day:-7}));s.value="prev",r.value=t.date}function _(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:1}):"week"===u.value&&(t=addToDate(t,{day:7}));s.value="next",r.value=t.date}function b(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getStartOfMonth(t):"week"===u.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getEndOfMonth(t):"week"===u.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarDay=defineComponent({name:"QCalendarDay",directives:[ResizeObserver$1],props:{...useCommonProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-intervals"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time")],setup(m,{slots:y,emit:c,expose:e}){const t=ref(null),a=ref(null),n=ref(null),p=ref(null),r=ref(null),f=ref({}),o=ref({}),i=ref({}),u=ref("next"),l=ref(m.modelValue||today()),d=ref("0000-00-00"),s=ref(0),g=ref(m.modelValue),v=reactive({width:0,height:0}),w=ref(!1),D=ref(!1),k=ref(null),_=ref(null),b=computed(()=>{if("month"===m.view)return"month-interval";return m.view}),T=getCurrentInstance();if(null===T)throw new Error("current instance is null");const{emitListeners:I}=useEmitListeners(T),{isSticky:M}=useCellWidth(m),{times:S,setCurrent:N,updateCurrent:C}=useTimes(m);C(),N();const{weekdaySkips:E,parsedStart:A,parsedEnd:F,dayFormatter:O,weekdayFormatter:q,ariaDateFormatter:x,dayStyleDefault:H,getRelativeClasses:W}=useCommon(m,{startDate:l,endDate:d,times:S}),R=computed(()=>{return parseTimestamp(m.modelValue,S.now)||A.value||S.today});r.value=R.value,p.value=R.value.date;const L=computed(()=>{if(0===s.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===j.value||0===j.value.length)return!0;const e=j.value[0];const t=j.value[j.value.length-1];return!0!==isBetweenDates(R.value,e,t)}),{renderValues:z}=useRenderValues(m,{parsedView:b,times:S,parsedValue:R}),{rootRef:P,scrollWidth:Y,__initCalendar:B,__renderCalendar:U}=useCalendar(m,Ve,{scrollArea:t,pane:a}),{days:j,intervals:V,intervalFormatter:X,ariaDateTimeFormatter:$,parsedCellWidth:K,getIntervalClasses:Z,showIntervalLabelDefault:Q,styleDefault:G,getTimestampAtEventInterval:J,getTimestampAtEvent:ee,getScopeForSlot:te,scrollToTime:ae,heightToMinutes:ne,timeDurationHeight:re,timeStartPos:oe}=useInterval(m,{weekdaySkips:E,times:S,scrollArea:t,parsedStart:A,parsedEnd:F,maxDays:s,size:v,headerColumnRef:n}),{move:ie}=useMove(m,{parsedView:b,parsedValue:R,weekdaySkips:E,direction:u,maxDays:s,times:S,emittedValue:g,emit:c}),{getDefaultMouseEventHandlers:ue}=useMouse(c,I),{checkChange:le}=useCheckChange(c,{days:j,lastStart:k,lastEnd:_}),{isKeyCode:de}=useEvents(),{tryFocus:se}=useKeyboard(m,{rootRef:P,focusRef:p,focusValue:r,datesRef:f,days:j,parsedView:b,parsedValue:R,emittedValue:g,weekdaySkips:E,direction:u,times:S}),ce=computed(()=>{{if("day"===m.view&&parseInt(m.columnCount,10)>1)return parseInt(m.columnCount,10);if("day"===m.view&&m.maxDays&&m.maxDays>1)return m.maxDays}return j.value.length}),ve=computed(()=>{if(P.value)return parseInt(getComputedStyle(P.value).getPropertyValue("--calendar-intervals-width"),10);return 0}),me=computed(()=>{if(P.value){const e=v.width||P.value.getBoundingClientRect().width;if(e&&ve.value&&ce.value)return(e-Y.value-ve.value)/ce.value+"px"}return 100/ce.value+"%"});function ye(){g.value=today()}function pe(e=1){ie(e)}function fe(e=1){ie(-e)}function he({width:e,height:t}){v.width=e,v.height=t}function ge(e){return e.date===g.value}function we(){return h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===M.value},style:{marginRight:Y.value+"px"}},[De(),ke()])}function De(){const e=y["head-intervals"],t={timestamps:j.value,days:j.value,date:m.modelValue};return h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===M.value},...ue("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ke(){return h("div",{ref:n,class:{"q-calendar-day__head--days__column":!0}},[_e(),be()])}function _e(){return h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[...Te()])}function be(){const e=y["head-days-events"];return nextTick(()=>{if(i.value&&0===parseInt(m.columnCount,10)&&window)try{const e=window.getComputedStyle(i.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:j.value,ref:i}})]),...Ie()])}function Te(){return 1===j.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Me(j.value[0],e)):j.value.map(e=>Me(e))}function Ie(){return 1===j.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>Ne(j.value[0],e)):j.value.map(e=>Ne(e))}function Me(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==m.noActiveDate&&ge(t),o=te(t,e);o.activeDate=r,o.droppable=w.value===t.date;const i=!0===M.value?m.cellWidth:me.value,u=m.weekdayStyle||H,l={width:i,maxWidth:i,minWidth:i,...u({scope:o})};!0===M.value&&(l.minWidth=i);const d="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},s=!0===m.focusable&&m.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...W(t),"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:l,onFocus:e=>{!0===s&&(p.value=c)},onKeydown:e=>{!0!==t.disabled&&de(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&de(e,[13,32])&&(g.value=t.date)},...ue("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")}};return h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Oe(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&qe(t,e),useFocusHelper()])}function Se(e){return"stacked"===m.dateHeader?[!0!==m.noDefaultHeaderText&&Ce(e),!0!==m.noDefaultHeaderBtn&&Ae(e)]:"inline"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderText&&Ce(e),!0!==m.noDefaultHeaderBtn&&Ae(e)])):"inverted"===m.dateHeader?("left"===m.weekdayAlign&&"right"===m.dateAlign||"right"===m.weekdayAlign&&m.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==m.noDefaultHeaderBtn&&Ae(e),!0!==m.noDefaultHeaderText&&Ce(e)])):void 0}function Ne(e,t){const a=y["head-day-event"],n=!0!==m.noActiveDate&&ge(e),r=te(e,t);r.activeDate=n;const o=!0===M.value?convertToUnit(K.value):me.value,i={width:o,maxWidth:o,minWidth:o};return!0===M.value&&(i.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...W(e),"q-active-date":n},style:i},[a&&a({scope:r})])}function Ce(e){const t=y["head-weekday-label"],a=!0===m.shortWeekdayLabel,n=te(e);n.shortWeekdayLabel=m.shortWeekdayLabel;const r={class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||Ee(e,a))}function Ee(e,t){const a=q.value(e,t||m.weekdayBreakpoints[0]>0&&K.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},m.weekdayBreakpoints[1]>0&&K.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function Ae(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+m.dateAlign]:!0}};return h("div",t,Fe(e))}function Fe(a){const e=!0!==m.noActiveDate&&ge(a),t=O.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},i={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&de(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&de(e,[13,32])&&(g.value=a.date,void 0!==I.value.onClickDate&&c("click-date",{scope:o}))},...ue("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(g.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==m.noAria&&(i.ariaLabel=x.value(a)),r?r({scope:o}):useButton(m,i,n?n({scope:o}):t)}function Oe(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function qe(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function xe(){return h("div",{class:"q-calendar-day__body"},[He()])}function He(){return!0===M.value?h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==M.value&&Be(),Re()]):!0===m.noScroll?We():h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[We()])}function We(){return h("div",{ref:a,class:"q-calendar-day__pane"},[Be(),Re()])}function Re(){const e=y["day-container"];return h("div",{class:"q-calendar-day__day-container"},[!0===M.value&&!0!==m.noHeader&&we(),h("div",{style:{display:"flex",flexDirection:"row"}},[!0===M.value&&Be(),...Le()]),e&&e({scope:{days:j.value}})])}function Le(){return 1===j.value.length&&parseInt(m.columnCount,10)>0?Array.apply(null,new Array(parseInt(m.columnCount,10))).map((e,t)=>t+parseInt(m.columnIndexStart,10)).map(e=>ze(j.value[0],0,e)):j.value.map((e,t)=>ze(e,t))}function ze(e,t,a){const n=y["day-body"],r=te(e,a),o=!0===M.value?m.cellWidth:me.value,i={width:o,maxWidth:o,minWidth:o};return!0===M.value&&(i.minWidth=o),h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...W(e)},style:i},[...Pe(t,a),n&&n({scope:r})])}function Pe(e,t){return V.value[e].map(e=>Ye(e,t))}function Ye(a,n){const e=convertToUnit(m.intervalHeight),t=m.intervalStyle||G,r=y["day-interval"],o=te(a,n);o.droppable=D.value===getDayTimeIdentifier(a);const i="function"===typeof m.intervalClass?m.intervalClass({scope:o}):{},u=!0===m.focusable&&m.focusType.includes("interval"),l=getDateTime(a),d={key:l,tabindex:!0===u?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...i,...Z(a,m.selectedDates,m.selectedStartEndDates),"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===u},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",o)?D.value=getDayTimeIdentifier(a):D.value="")},onKeydown:e=>{de(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(de(e,[13,32])){const t=te(a,n);g.value=t.timestamp.date,void 0!==I.value.onClickTime&&c("click-time",{scope:t,event:e})}},...ue("-time",e=>{const t=te(J(e,a,m.timeClicksClamped,S.now),n);return{scope:t,event:e}})};!0!==m.noAria&&(d.ariaLabel=$.value(a));const s=r?r({scope:o}):void 0;return h("div",d,[s,useFocusHelper()])}function Be(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===M.value},...ue("-interval",e=>{const t=ee(e,A.value,m.timeClicksClamped,S.now);return{scope:{timestamp:t},event:e}})};return h("div",e,Ue())}function Ue(){return V.value[0].map(e=>je(e))}function je(e){const t=y["interval-label"],a=convertToUnit(m.intervalHeight),n=m.shortIntervalLabel,r=m.showIntervalLabel||Q,o=r(e),i=o?X.value(e,n):void 0;return h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:i}}):i])])}function Ve(){if(L.value){const{start:a,end:n,maxDays:r}=z.value;l.value=a.date,d.value=n.date,s.value=r}const e=v.width>0,t=withDirectives(h("div",{key:l.value,class:"q-calendar-day"},[!0===e&&!0!==M.value&&!0!==m.noHeader&&we(),e&&xe()]),[[ResizeObserver$1,he]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>t)}}return watch([j],le,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(g.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}g.value=e}p.value=e}),watch(g,(e,t)=>{if(g.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(p,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{f.value[p.value]?f.value[p.value].focus():se()}),watch(()=>m.maxDays,e=>{s.value=e}),onBeforeUpdate(()=>{f.value={};o.value={};i.value={}}),onMounted(()=>{B()}),e({prev:fe,next:pe,move:ie,moveToToday:ye,updateCurrent:C,timeStartPos:oe,timeDurationHeight:re,heightToMinutes:ne,scrollToTime:ae}),()=>U()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarDay:QCalendarDay,install(e){e.component(QCalendarDay.name,QCalendarDay)}};export default Plugin;export{QCalendarDay,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarDay={},e.Vue))})(this,function(e,Ye){"use strict";const 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?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,h=31,l=12,u=1,p=1,i=7,d=60,s=24,c=6048e5;function $e(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,x(t,2),x(a,2)].join("-")}function P(e,t,a){let n=Z(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=A(n);return n=W(n,t[0],E),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function Y(e,t,a){let n=Z(e);const r=T(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=E(n);return n=W(n,t[t.length-1],A),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function C(e){const t=Z(e);return t.day=p,k(t),t}function S(e){const t=Z(e);return t.day=T(t.year,t.month),k(t),t}function $(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=n.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!a.exec(e)}function Xe(e){const t=a.exec(e);return t?{date:e,time:x(parseInt(t[6],10)||0,2)+":"+x(parseInt(t[8],10)||0,2),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 Ke(e,t){let a=Xe(e);return null===a?null:(a=k(a),t&&X(a,t,a.hasTime),a)}function f(e){return k({date:x(e.getFullYear(),4)+"-"+x(e.getMonth()+1,2)+"-"+x(e.getDate(),2),time:x(e.getHours()||0,2)+":"+x(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Ze(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function y(e){return 100*e.hour+e.minute}function Qe(e){return Ze(e)+y(e)}function X(e,t,a=!1){let n=Ze(t),r=Ze(e),o=n===r;return e.hasTime&&a&&o&&(n=y(t),r=y(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function K(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/d),e.minute=t%d,e.time=I(e),a&&X(e,a,!0),e}function g(e){return e.weekday=_(e),e}function w(e){return e.doy=m(e),e}function b(e,t,a,n,r){const o=Ze(e);if(void 0!==t){const u=Ze(Xe(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ze(Xe(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=Xe(r[d][0]),c=Xe(r[d][1]);if(Je(e,s,c)){e.disabled=!0;break}}else{const v=Ze(Ke(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=I(e),e.date=F(e),e.weekday=_(e),e.doy=m(e),e.workweek=D(e),e}function m(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 D(e){let t;if(t=0===e.year?Date.UTC(new Date):B(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/c;return 1+Math.floor(o)}function _(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function q(e){return 1===(e%4===0^e%100===0^e%400===0)}function T(e,t){return(q(e)?o:r)[t]}function Z(e){return{...e}}function x(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function F(e){let t=`${x(e.year,4)}-${x(e.month,2)}`;return e.hasDay&&(t+=`-${x(e.day,2)}`),t}function I(e){return e.hasTime?`${x(e.hour,2)}:${x(e.minute,2)}`:""}function Ge(e){return F(e)+" "+(e.hasTime?I(e):"00:00")}function A(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>t&&e.day>T(e.year,e.month)&&(e.day=p,++e.month,e.month>l&&(e.month=u,++e.year)),e}function E(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<p&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=T(e.year,e.month)),e}function M(e,t=A,a=1,n=[0,1,2,3,4,5,6]){return H(e,t,a,n)}function H(e,t=A,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==A||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function W(e,t,a=A,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function j(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<i;++a){let t=1;for(let e=1;e<i;++e){const r=(a+e)%i;if(n[r])break;++t}e[a]=n[a]*t}return e}function Q(e,t,a,n,r,o,u=[],l=[],i=42,d=0){const s=Ze(t),c=[];let v=Z(e),f=0,y=f===s;if(s<Ze(e))return c;while((!y||c.length<d)&&c.length<i){if(f=Ze(v),y=y||f>s&&c.length>=d,y)break;if(0!==n[v.weekday]){const m=Z(v);k(m),X(m,a),b(m,r,o,u,l),c.push(m),v=H(v,A)}else v=H(v,A)}return c}function G(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,i=Z(t);u.push(K(i,l,o))}return u}function J(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(L(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${Ge(t)}`),""}}}function B(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function L(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function V(e){return isFinite(parseInt(e,10))}function Je(e,t,a,n){const r=Ze(e)+(!0===n?y(e):0),o=Ze(t)+(!0===n?y(t):0),u=Ze(a)+(!0===n?y(a):0);return r>=o&&r<=u}function ee(e,t){const n=Z(e);let r;return R(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=O.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&ae(n,O[r]),k(n),n}const O=["minute","hour","day","month"];function R(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function N(e){if(e.minute>=d||e.minute<0){const t=Math.floor(e.minute/d);e.minute-=t*d,e.hour+=t,z(e)}return e}function z(e){if(e.hour>=s||e.hour<0){const t=Math.floor(e.hour/s);e.hour-=t*s,e.day+=t,U(e)}return e}function U(t){te(t);let a=T(t.year,t.month);if(t.day>a){++t.month,t.month>l&&te(t);let e=t.day-a;a=T(t.year,t.month);do{e>a&&(++t.month,t.month>l&&te(t),e-=a,a=T(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&te(t),a=T(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&te(t),a=T(t.year,t.month))}while(e>a);t.day=a-e}return t}function te(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function ae(e,t){switch(t){case"minute":return N(e);case"hour":return z(e);case"day":return U(e);case"month":return te(e)}}function et(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function tt(e,t){return 0===t?e:e.slice(0,t)}var at={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function nt(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ye.reactive({width:0,height:0}),o=Ye.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Ye.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Ye.withDirectives(Ye.h("div",e,[a()]),[[at,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:d}}const ne={modelValue:{type:String,default:$e(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function rt(r,{startDate:e,endDate:t,times:a}){const n=Ye.computed(()=>j(r.weekdays)),o=Ye.computed(()=>Ke(e.value)),u=Ye.computed(()=>{if("0000-00-00"===t.value)return y(o.value);return Ke(t.value)}),l=Ye.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return J(r.locale,(e,t)=>a)}),i=Ye.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return J(r.locale,(e,t)=>t?n:a)}),d=Ye.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return J(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ze(t),r=Ze(Xe(e[0])),o=Ze(Xe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:l,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function f(e){return P(e,r.weekdays,a.today)}function y(e){return Y(e,r.weekdays,a.today)}function m(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:f,endOfWeek:y,dayStyleDefault:m}}function re(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function oe(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ue(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function le(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function ie(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=ue(n);o<=0?l!==r&&re(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;re(n,a);a!==r&&ie(n,r,o-t,e)})}function de(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=le(n);o<=0?l!==r&&oe(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&de(n,r,o-t,e)})}const se={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:V},intervalMinutes:{type:[Number,String],default:60,validator:V},intervalStart:{type:[Number,String],default:0,validator:V},intervalCount:{type:[Number,String],default:24,validator:V},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function ot(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:l,headerColumnRef:i}){const d=Ye.computed(()=>parseInt(o.intervalStart,10)),y=Ye.computed(()=>parseInt(o.intervalMinutes,10)),s=Ye.computed(()=>parseInt(o.intervalCount,10)),m=Ye.computed(()=>parseFloat(o.intervalHeight)),f=Ye.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),h=Ye.computed(()=>d.value*y.value),c=Ye.computed(()=>s.value*m.value),v=Ye.computed(()=>s.value*f.value),p=Ye.computed(()=>k(a.value)),g=Ye.computed(()=>D(r.value)),w=Ye.computed(()=>{return Q(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=Ye.computed(()=>{return w.value.map(e=>G(e,d.value,y.value,s.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function D(e){return Y(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(Ge(t))}function q(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Qe(t),r=Qe(Xe(e[0])),o=Qe(Xe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function C(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=q(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const T=Ye.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return J(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),x=Ye.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return J(o.locale,e=>t)});function F(e){const t=b.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function I(e){}function A(e){}function E(e,t,a=!1,n=void 0){let r=Z(t);const o=e.currentTarget.getBoundingClientRect(),u=h.value,l=e,i=e,d=l.changedTouches||l.touches,s=(d&&d[0]?d[0]:i).clientY,c=(s-o.top)/m.value,v=Math.floor((a?Math.floor(c):c)*y.value),f=u+v;return 0!==f&&(r=ee(r,{minute:f})),n&&X(r,n,!0),r}function M(e,t,a=!1,n=void 0){const r=Z(t),o=e.currentTarget.getBoundingClientRect(),u=h.value,l=e,i=e,d=l.changedTouches||l.touches,s=(d&&d[0]?d[0]:i).clientY,c=(s-o.top)/m.value,v=Math.floor((a?Math.floor(c):c)*y.value),f=u+v;return K(r,f,n)}function H(e,t,a=!1,n=void 0){const r=Z(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientX,s=(d-o.left)/f.value,c=Math.floor((a?Math.floor(s):s)*y.value),v=c+(60*t.hour+t.minute);return K(r,v,n)}function W(e,t){const a={timestamp:e};return a.timeStartPos=z,a.timeDurationHeight=V,void 0!==t&&(a.columnIndex=t),a}function j(e,t){const a={timestamp:Z(e)};return a.timeStartPosX=U,a.timeDurationWidth=O,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=z(e);return!(!1===a||!n.value)&&(ie(n.value,a,t),!0)}function L(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(de(n.value,a,t),!0)}function V(e){return e/y.value*m.value}function O(e){return e/y.value*f.value}function R(e){return parseInt(e,10)*y.value/m.value}function N(e){return parseInt(e,10)*y.value/f.value}function z(e,t=!0){const a=$(e);if(!1===a)return!1;const n=h.value,r=s.value*y.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function U(e,t=!0){const a=$(e);if(!1===a)return!1;const n=h.value,r=s.value*y.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:y,parsedIntervalCount:s,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:h,bodyHeight:c,bodyWidth:v,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:T,ariaDateTimeFormatter:x,arrayHasDateTime:_,checkIntervals:q,getIntervalClasses:C,getResourceClasses:S,showIntervalLabelDefault:F,showResourceLabelDefault:I,styleDefault:A,getTimestampAtEventInterval:E,getTimestampAtEvent:M,getTimestampAtEventX:H,getScopeForSlot:W,getScopeForSlotX:j,scrollToTime:B,scrollToTimeX:L,timeDurationHeight:V,timeDurationWidth:O,heightToMinutes:R,widthToMinutes:N,timeStartPos:z,timeStartPosX:U}}const ce={columnCount:{type:[Number,String],default:0,validator:V},columnIndexStart:{type:[Number,String],default:0,validator:V}},ve={maxDays:{type:Number,default:1}},fe={now:{type:String,validator:e=>""===e||v(e),default:""}};function ut(e){const t=Ye.reactive({now:Ke("0000-00-00 00:00"),today:Ke("0000-00-00")}),a=Ye.computed(()=>e.now?Ke(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return f(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ye.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function lt(r,{parsedView:o,times:u,parsedValue:l}){const e=Ye.computed(()=>{const e=l.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=C(e),n=S(e),t=T(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,u.today),n=Y(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=M(Z(n),A,t>1?t-1:t,r.weekdays),k(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=C(e),n=S(e),k(n),t=T(a.year,a.month);break;case"resource":t=1,n=M(Z(n),A,t,r.weekdays),k(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const ye=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let me,he;function pe(e,a){const t={};for(const n in e){const r=e[n],o=ye("on-"+n);if(void 0===me)return void console.warn("$listeners has not been set up");if(void 0!==me.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),he(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function ge(e,t){return pe(we(e),t)}function we(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function be(e){return Object.keys(we(e))}function it(e,t){return he=e,me=t,{getMouseEventHandlers:pe,getDefaultMouseEventHandlers:ge,getMouseEventName:we,getRawMouseEvents:be}}const ke=["moved"];function dt(l,{parsedView:i,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:f,emittedValue:y,emit:m}){function e(a=1){if(0!==a){let e=Z(d.value);const n=a>0,r=n?A:E,o=n?h:p;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),g(e);while(0===s.value[e.weekday])e=ee(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":H(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":H(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":H(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),X(e,f.now),y.value=e.date,m("moved",e)}else y.value=$e()}return{move:e}}const De=/^on[A-Z]/;function st(e=Ye.getCurrentInstance()){return{emitListeners:Ye.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===De.test(e)&&(t[e]=!0)});return t})}}function ct(){return[Ye.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function vt(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Ye.h("button",t,[a,!0===n&&ct()])}const _e={cellWidth:[Number,String]};function ft(e){const t=Ye.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const qe=["change"];function yt(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function mt(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Ce}=mt(),Se={useNavigation:Boolean};function ht(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:i,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",m))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",m),e=!1)}function f(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function m(e){f(e)&&Ce(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(f(e)&&Ce(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:D();break;case 35:q();break;case 36:_();break;case 37:w();break;case 38:p();break;case 39:b();break;case 40:g();break}}function p(e){let t=Z(o.value);if("month"===l.value){if(t=ee(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ee(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function g(e){let t=Z(o.value);if("month"===l.value){if(t=ee(t,{day:7}),o.value.month!==t.month)return s.value="next",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ee(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=Z(o.value);s.value="prev";do{t=ee(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=Z(o.value);s.value="next";do{t=ee(t,{day:1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function k(e){let t=Z(o.value);if("month"===l.value||"month-interval"===l.value){t=ee(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=ee(t,{day:a})}else"day"===l.value?t=ee(t,{day:-1}):"week"===l.value&&(t=ee(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=Z(o.value);if("month"===l.value||"month-interval"===l.value){t=ee(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=ee(t,{day:a})}else"day"===l.value?t=ee(t,{day:1}):"week"===l.value&&(t=ee(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=Z(o.value);"month"===l.value||"month-interval"===l.value?t=C(t):"week"===l.value&&(t=P(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=ee(t,{day:-1});r.value=t.date}function q(e){let t=Z(o.value);"month"===l.value||"month-interval"===l.value?t=S(t):"week"===l.value&&(t=Y(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=ee(t,{day:-1});r.value=t.date}return Ye.onBeforeUnmount(()=>{v()}),Ye.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var Te=Ye.defineComponent({name:"QCalendarDay",directives:[at],props:{...ne,...se,...ce,...ve,...fe,..._e,...Se},emits:["update:model-value",...qe,...ke,...be("-date"),...be("-interval"),...be("-head-intervals"),...be("-head-day"),...be("-time")],setup(f,{slots:y,emit:c,expose:e}){const t=Ye.ref(null),a=Ye.ref(null),n=Ye.ref(null),m=Ye.ref(null),r=Ye.ref(null),h=Ye.ref({}),o=Ye.ref({}),u=Ye.ref({}),l=Ye.ref("next"),i=Ye.ref(f.modelValue||$e()),d=Ye.ref("0000-00-00"),s=Ye.ref(0),p=Ye.ref(f.modelValue),v=Ye.reactive({width:0,height:0}),g=Ye.ref(!1),w=Ye.ref(!1),b=Ye.ref(null),k=Ye.ref(null),D=Ye.computed(()=>{if("month"===f.view)return"month-interval";return f.view}),_=Ye.getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:q}=st(_),{isSticky:C}=ft(f),{times:S,setCurrent:T,updateCurrent:x}=ut(f);x(),T();const{weekdaySkips:F,parsedStart:I,parsedEnd:A,dayFormatter:E,weekdayFormatter:M,ariaDateFormatter:H,dayStyleDefault:W,getRelativeClasses:j}=rt(f,{startDate:i,endDate:d,times:S}),B=Ye.computed(()=>{return Ke(f.modelValue,S.now)||I.value||S.today});r.value=B.value,m.value=B.value.date;const L=Ye.computed(()=>{if(0===s.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===U.value||0===U.value.length)return!0;const e=U.value[0];const t=U.value[U.value.length-1];return!0!==Je(B.value,e,t)}),{renderValues:V}=lt(f,{parsedView:D,times:S,parsedValue:B}),{rootRef:O,scrollWidth:R,__initCalendar:N,__renderCalendar:z}=nt(f,Pe,{scrollArea:t,pane:a}),{days:U,intervals:P,intervalFormatter:Y,ariaDateTimeFormatter:$,parsedCellWidth:X,getIntervalClasses:K,showIntervalLabelDefault:Z,styleDefault:Q,getTimestampAtEventInterval:G,getTimestampAtEvent:J,getScopeForSlot:ee,scrollToTime:te,heightToMinutes:ae,timeDurationHeight:ne,timeStartPos:re}=ot(f,{weekdaySkips:F,times:S,scrollArea:t,parsedStart:I,parsedEnd:A,maxDays:s,size:v,headerColumnRef:n}),{move:oe}=dt(f,{parsedView:D,parsedValue:B,weekdaySkips:F,direction:l,maxDays:s,times:S,emittedValue:p,emit:c}),{getDefaultMouseEventHandlers:ue}=it(c,q),{checkChange:le}=yt(c,{days:U,lastStart:b,lastEnd:k}),{isKeyCode:ie}=mt(),{tryFocus:de}=ht(f,{rootRef:O,focusRef:m,focusValue:r,datesRef:h,days:U,parsedView:D,parsedValue:B,emittedValue:p,weekdaySkips:F,direction:l,times:S}),se=Ye.computed(()=>{{if("day"===f.view&&parseInt(f.columnCount,10)>1)return parseInt(f.columnCount,10);if("day"===f.view&&f.maxDays&&f.maxDays>1)return f.maxDays}return U.value.length}),ce=Ye.computed(()=>{if(O.value)return parseInt(getComputedStyle(O.value).getPropertyValue("--calendar-intervals-width"),10);return 0}),ve=Ye.computed(()=>{if(O.value){const e=v.width||O.value.getBoundingClientRect().width;if(e&&ce.value&&se.value)return(e-R.value-ce.value)/se.value+"px"}return 100/se.value+"%"});function fe(){p.value=$e()}function ye(e=1){oe(e)}function me(e=1){oe(-e)}function he({width:e,height:t}){v.width=e,v.height=t}function pe(e){return e.date===p.value}function ge(){return Ye.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===C.value},style:{marginRight:R.value+"px"}},[we(),be()])}function we(){const e=y["head-intervals"],t={timestamps:U.value,days:U.value,date:f.modelValue};return Ye.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===C.value},...ue("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function be(){return Ye.h("div",{ref:n,class:{"q-calendar-day__head--days__column":!0}},[ke(),De()])}function ke(){return Ye.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[..._e()])}function De(){const e=y["head-days-events"];return Ye.nextTick(()=>{if(u.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),Ye.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&Ye.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:U.value,ref:u}})]),...qe()])}function _e(){return 1===U.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>Ce(U.value[0],e)):U.value.map(e=>Ce(e))}function qe(){return 1===U.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>Te(U.value[0],e)):U.value.map(e=>Te(e))}function Ce(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==f.noActiveDate&&pe(t),o=ee(t,e);o.activeDate=r,o.droppable=g.value===t.date;const u=!0===C.value?f.cellWidth:ve.value,l=f.weekdayStyle||W,i={width:u,maxWidth:u,minWidth:u,...l({scope:o})};!0===C.value&&(i.minWidth=u);const d="function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{},s=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{h.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...j(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:i,onFocus:e=>{!0===s&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&ie(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&ie(e,[13,32])&&(p.value=t.date)},...ue("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?g.value=t.date:g.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?g.value=t.date:g.value="")}};return Ye.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Ee(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&Me(t,e),ct()])}function Se(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&xe(e),!0!==f.noDefaultHeaderBtn&&Ie(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,Ye.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&xe(e),!0!==f.noDefaultHeaderBtn&&Ie(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,Ye.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&Ie(e),!0!==f.noDefaultHeaderText&&xe(e)])):void 0}function Te(e,t){const a=y["head-day-event"],n=!0!==f.noActiveDate&&pe(e),r=ee(e,t);r.activeDate=n;const o=!0===C.value?et(X.value):ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===C.value&&(u.minWidth=o),Ye.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...j(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function xe(e){const t=y["head-weekday-label"],a=!0===f.shortWeekdayLabel,n=ee(e);n.shortWeekdayLabel=f.shortWeekdayLabel;const r={class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Ye.h("div",r,t&&t({scope:n})||Fe(e,a))}function Fe(e,t){const a=M.value(e,t||f.weekdayBreakpoints[0]>0&&X.value<=f.weekdayBreakpoints[0]);return Ye.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&X.value<=f.weekdayBreakpoints[1]?tt(a,f.minWeekdayLabel):a)}function Ie(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return Ye.h("div",t,Ae(e))}function Ae(a){const e=!0!==f.noActiveDate&&pe(a),t=E.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ie(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ie(e,[13,32])&&(p.value=a.date,void 0!==q.value.onClickDate&&c("click-date",{scope:o}))},...ue("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=H.value(a)),r?r({scope:o}):vt(f,u,n?n({scope:o}):t)}function Ee(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Ye.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Me(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Ye.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function He(){return Ye.h("div",{class:"q-calendar-day__body"},[We()])}function We(){return!0===C.value?Ye.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==C.value&&Ne(),Be()]):!0===f.noScroll?je():Ye.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[je()])}function je(){return Ye.h("div",{ref:a,class:"q-calendar-day__pane"},[Ne(),Be()])}function Be(){const e=y["day-container"];return Ye.h("div",{class:"q-calendar-day__day-container"},[!0===C.value&&!0!==f.noHeader&&ge(),Ye.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===C.value&&Ne(),...Le()]),e&&e({scope:{days:U.value}})])}function Le(){return 1===U.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>Ve(U.value[0],0,e)):U.value.map((e,t)=>Ve(e,t))}function Ve(e,t,a){const n=y["day-body"],r=ee(e,a),o=!0===C.value?f.cellWidth:ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===C.value&&(u.minWidth=o),Ye.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...j(e)},style:u},[...Oe(t,a),n&&n({scope:r})])}function Oe(e,t){return P.value[e].map(e=>Re(e,t))}function Re(a,n){const e=et(f.intervalHeight),t=f.intervalStyle||Q,r=y["day-interval"],o=ee(a,n);o.droppable=w.value===Qe(a);const u="function"===typeof f.intervalClass?f.intervalClass({scope:o}):{},l=!0===f.focusable&&f.focusType.includes("interval"),i=Ge(a),d={key:i,tabindex:!0===l?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...K(a,f.selectedDates,f.selectedStartEndDates),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"interval",o)?w.value=Qe(a):w.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"interval",o)?w.value=Qe(a):w.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"interval",o)?w.value=Qe(a):w.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"interval",o)?w.value=Qe(a):w.value="")},onKeydown:e=>{ie(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(ie(e,[13,32])){const t=ee(a,n);p.value=t.timestamp.date,void 0!==q.value.onClickTime&&c("click-time",{scope:t,event:e})}},...ue("-time",e=>{const t=ee(G(e,a,f.timeClicksClamped,S.now),n);return{scope:t,event:e}})};!0!==f.noAria&&(d.ariaLabel=$.value(a));const s=r?r({scope:o}):void 0;return Ye.h("div",d,[s,ct()])}function Ne(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===C.value},...ue("-interval",e=>{const t=J(e,I.value,f.timeClicksClamped,S.now);return{scope:{timestamp:t},event:e}})};return Ye.h("div",e,ze())}function ze(){return P.value[0].map(e=>Ue(e))}function Ue(e){const t=y["interval-label"],a=et(f.intervalHeight),n=f.shortIntervalLabel,r=f.showIntervalLabel||Z,o=r(e),u=o?Y.value(e,n):void 0;return Ye.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[Ye.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function Pe(){if(L.value){const{start:a,end:n,maxDays:r}=V.value;i.value=a.date,d.value=n.date,s.value=r}const e=v.width>0,t=Ye.withDirectives(Ye.h("div",{key:i.value,class:"q-calendar-day"},[!0===e&&!0!==C.value&&!0!==f.noHeader&&ge(),e&&He()]),[[at,he]]);if(!0!==f.animated)return t;{const o="q-calendar--"+("prev"===l.value?f.transitionPrev:f.transitionNext);return Ye.h(Ye.Transition,{name:o,appear:!0},()=>t)}}return Ye.watch([U],le,{deep:!0,immediate:!0}),Ye.watch(()=>f.modelValue,(e,t)=>{if(p.value!==f.modelValue){if(!0===f.animated){const a=Ze(Xe(e)),n=Ze(Xe(t));l.value=a>=n?"next":"prev"}p.value=e}m.value=e}),Ye.watch(p,(e,t)=>{if(p.value!==f.modelValue){if(!0===f.animated){const a=Ze(Xe(e)),n=Ze(Xe(t));l.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ye.watch(m,e=>{e&&(r.value=Ke(e))}),Ye.watch(r,e=>{h.value[m.value]?h.value[m.value].focus():de()}),Ye.watch(()=>f.maxDays,e=>{s.value=e}),Ye.onBeforeUpdate(()=>{h.value={};o.value={};u.value={}}),Ye.onMounted(()=>{N()}),e({prev:me,next:ye,move:oe,moveToToday:fe,updateCurrent:x,timeStartPos:re,timeDurationHeight:ne,heightToMinutes:ae,scrollToTime:te}),()=>z()}}),xe="@quasar/quasar-ui-qcalendar",Fe="4.0.0-beta.2",Ie="Jeff Galbraith <jeff@quasar.dev>",Ae="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",Ee="MIT",Me="dist/index.esm.js",He="dist/index.common.js",We="dist/types/index.d.ts",je={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},Be={type:"github",url:"https://github.com/sponsors/hawkeye64"},Le={access:"public"},Ve={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},Oe="https://github.com/quasarframework/quasar-ui-qcalendar/issues",Re="https://github.com/quasarframework/quasar-ui-qcalendar",Ne=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ze={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},Ue={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},Pe=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],Pe={name:xe,version:Fe,author:Ie,description:Ae,license:Ee,module:Me,main:He,typings:We,scripts:je,funding:Be,publishConfig:Le,repository:Ve,bugs:Oe,homepage:Re,keywords:Ne,vetur:ze,devDependencies:Ue,browserslist:Pe};const{version:pt}=Pe;e.QCalendarDay=Te,e.version=pt,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarDay={},e.Vue))})(this,function(e,Ye){"use strict";const 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?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,h=31,l=12,u=1,p=1,i=7,d=60,s=24,c=6048e5;function $e(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,F(t,2),F(a,2)].join("-")}function P(e,t,a){let n=K(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=E(n);return n=j(n,t[0],M),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function Y(e,t,a){let n=K(e);const r=x(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=M(n);return n=j(n,t[t.length-1],E),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function C(e){const t=K(e);return t.day=p,k(t),t}function S(e){const t=K(e);return t.day=x(t.year,t.month),k(t),t}function $(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=n.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!a.exec(e)}function Xe(e){const t=a.exec(e);return t?{date:e,time:F(parseInt(t[6],10)||0,2)+":"+F(parseInt(t[8],10)||0,2),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 Ke(e,t){let a=Xe(e);return null===a?null:(a=k(a),t&&X(a,t,a.hasTime),a)}function f(e){return k({date:F(e.getFullYear(),4)+"-"+F(e.getMonth()+1,2)+"-"+F(e.getDate(),2),time:F(e.getHours()||0,2)+":"+F(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Ze(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function y(e){return 100*e.hour+e.minute}function Qe(e){return Ze(e)+y(e)}function X(e,t,a=!1){let n=Ze(t),r=Ze(e),o=n===r;return e.hasTime&&a&&o&&(n=y(t),r=y(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function m(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/d),e.minute=t%d,e.time=A(e),a&&X(e,a,!0),e}function w(e){return e.weekday=q(e),e}function g(e){return e.doy=D(e),e}function b(e,t,a,n,r){const o=Ze(e);if(void 0!==t){const u=Ze(Xe(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ze(Xe(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const s=Xe(r[d][0]),c=Xe(r[d][1]);if(Je(e,s,c)){e.disabled=!0;break}}else{const v=Ze(Ke(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=A(e),e.date=I(e),e.weekday=q(e),e.doy=D(e),e.workweek=_(e),e}function D(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 _(e){let t;if(t=0===e.year?Date.UTC(new Date):L(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/c;return 1+Math.floor(o)}function q(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function T(e){return 1===(e%4===0^e%100===0^e%400===0)}function x(e,t){return(T(e)?o:r)[t]}function K(e){return{...e}}function F(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function I(e){let t=`${F(e.year,4)}-${F(e.month,2)}`;return e.hasDay&&(t+=`-${F(e.day,2)}`),t}function A(e){return e.hasTime?`${F(e.hour,2)}:${F(e.minute,2)}`:""}function Ge(e){return I(e)+" "+(e.hasTime?A(e):"00:00")}function E(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>t&&e.day>x(e.year,e.month)&&(e.day=p,++e.month,e.month>l&&(e.month=u,++e.year)),e}function M(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<p&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=x(e.year,e.month)),e}function H(e,t=E,a=1,n=[0,1,2,3,4,5,6]){return W(e,t,a,n)}function W(e,t=E,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==E||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function j(e,t,a=E,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function B(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<i;++a){let t=1;for(let e=1;e<i;++e){const r=(a+e)%i;if(n[r])break;++t}e[a]=n[a]*t}return e}function Z(e,t,a,n,r,o,u=[],l=[],i=42,d=0){const s=Ze(t),c=[];let v=K(e),f=0,y=f===s;if(s<Ze(e))return c;while((!y||c.length<d)&&c.length<i){if(f=Ze(v),y=y||f>s&&c.length>=d,y)break;if(0!==n[v.weekday]){const m=K(v);k(m),X(m,a),b(m,r,o,u,l),c.push(m),v=W(v,E)}else v=W(v,E)}return c}function Q(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,i=K(t);u.push(m(i,l,o))}return u}function G(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(V(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${Ge(t)}`),""}}}function L(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function V(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function O(e){return isFinite(parseInt(e,10))}function Je(e,t,a,n){const r=Ze(e)+(!0===n?y(e):0),o=Ze(t)+(!0===n?y(t):0),u=Ze(a)+(!0===n?y(a):0);return r>=o&&r<=u}function J(e,t){const n=K(e);let r;return N(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=R.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&ae(n,R[r]),k(n),n}const R=["minute","hour","day","month"];function N(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function z(e){if(e.minute>=d||e.minute<0){const t=Math.floor(e.minute/d);e.minute-=t*d,e.hour+=t,U(e)}return e}function U(e){if(e.hour>=s||e.hour<0){const t=Math.floor(e.hour/s);e.hour-=t*s,e.day+=t,ee(e)}return e}function ee(t){te(t);let a=x(t.year,t.month);if(t.day>a){++t.month,t.month>l&&te(t);let e=t.day-a;a=x(t.year,t.month);do{e>a&&(++t.month,t.month>l&&te(t),e-=a,a=x(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&te(t),a=x(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&te(t),a=x(t.year,t.month))}while(e>a);t.day=a-e}return t}function te(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function ae(e,t){switch(t){case"minute":return z(e);case"hour":return U(e);case"day":return ee(e);case"month":return te(e)}}function et(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function tt(e,t){return 0===t?e:e.slice(0,t)}var at={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function nt(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Ye.reactive({width:0,height:0}),o=Ye.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Ye.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Ye.withDirectives(Ye.h("div",e,[a()]),[[at,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:d}}const ne={modelValue:{type:String,default:$e(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function rt(r,{startDate:e,endDate:t,times:a}){const n=Ye.computed(()=>B(r.weekdays)),o=Ye.computed(()=>Ke(e.value)),u=Ye.computed(()=>{if("0000-00-00"===t.value)return y(o.value);return Ke(t.value)}),l=Ye.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return G(r.locale,(e,t)=>a)}),i=Ye.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return G(r.locale,(e,t)=>t?n:a)}),d=Ye.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return G(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ze(t),r=Ze(Xe(e[0])),o=Ze(Xe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:u,lastDay:l,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function f(e){return P(e,r.weekdays,a.today)}function y(e){return Y(e,r.weekdays,a.today)}function m(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:f,endOfWeek:y,dayStyleDefault:m}}function re(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function oe(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ue(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function le(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function ie(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=ue(n);o<=0?l!==r&&re(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;re(n,a);a!==r&&ie(n,r,o-t,e)})}function de(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=le(n);o<=0?l!==r&&oe(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&de(n,r,o-t,e)})}const se={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:O},intervalMinutes:{type:[Number,String],default:60,validator:O},intervalStart:{type:[Number,String],default:0,validator:O},intervalCount:{type:[Number,String],default:24,validator:O},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function ot(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:l,headerColumnRef:i}){const d=Ye.computed(()=>parseInt(o.intervalStart,10)),v=Ye.computed(()=>parseInt(o.intervalMinutes,10)),s=Ye.computed(()=>parseInt(o.intervalCount,10)),f=Ye.computed(()=>parseFloat(o.intervalHeight)),y=Ye.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=Ye.computed(()=>d.value*v.value),m=Ye.computed(()=>s.value*f.value),h=Ye.computed(()=>s.value*y.value),p=Ye.computed(()=>k(a.value)),w=Ye.computed(()=>D(r.value)),g=Ye.computed(()=>{return Z(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=Ye.computed(()=>{return g.value.map(e=>Q(e,d.value,v.value,s.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function D(e){return Y(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(Ge(t))}function q(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Qe(t),r=Qe(Xe(e[0])),o=Qe(Xe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function C(e,t=[],a=[]){const n=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=q(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function S(e,t=0,a){return[]}const T=Ye.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return G(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),x=Ye.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return G(o.locale,e=>t)});function F(e){const t=b.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function I(e){}function A(e){}function E(e,t,a=!1,n=void 0){let r=K(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&X(r,n,!0),r}function M(e,t,a=!1,n=void 0){const r=K(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientY,s=(d-o.top)/f.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&X(r,n,!0),r}function H(e,t,a=!1,n=void 0){const r=K(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:l).clientX,s=(d-o.left)/y.value,c=Math.floor((a?Math.floor(s):s)*v.value);return 0!==c&&(r=J(r,{minute:c})),n&&X(r,n,!0),r}function W(e,t){const a={timestamp:e};return a.timeStartPos=z,a.timeDurationHeight=V,void 0!==t&&(a.columnIndex=t),a}function j(e,t){const a={timestamp:K(e)};return a.timeStartPosX=U,a.timeDurationWidth=O,void 0!==t&&(a.index=t),a}function B(e,t=0){const a=z(e);return!(!1===a||!n.value)&&(ie(n.value,a,t),!0)}function L(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(de(n.value,a,t),!0)}function V(e){return e/v.value*f.value}function O(e){return e/v.value*y.value}function R(e){return parseInt(e,10)*v.value/f.value}function N(e){return parseInt(e,10)*v.value/y.value}function z(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*m.value;return t&&(u<0&&(u=0),u>m.value&&(u=m.value)),u}function U(e,t=!0){const a=$(e);if(!1===a)return!1;const n=c.value,r=s.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value&&(u=h.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:s,parsedIntervalHeight:f,parsedCellWidth:y,parsedStartMinute:c,bodyHeight:m,bodyWidth:h,parsedWeekStart:p,parsedWeekEnd:w,days:g,intervals:b,intervalFormatter:T,ariaDateTimeFormatter:x,arrayHasDateTime:_,checkIntervals:q,getIntervalClasses:C,getResourceClasses:S,showIntervalLabelDefault:F,showResourceLabelDefault:I,styleDefault:A,getTimestampAtEventInterval:E,getTimestampAtEvent:M,getTimestampAtEventX:H,getScopeForSlot:W,getScopeForSlotX:j,scrollToTime:B,scrollToTimeX:L,timeDurationHeight:V,timeDurationWidth:O,heightToMinutes:R,widthToMinutes:N,timeStartPos:z,timeStartPosX:U}}const ce={columnCount:{type:[Number,String],default:0,validator:O},columnIndexStart:{type:[Number,String],default:0,validator:O}},ve={maxDays:{type:Number,default:1}},fe={now:{type:String,validator:e=>""===e||v(e),default:""}};function ut(e){const t=Ye.reactive({now:Ke("0000-00-00 00:00"),today:Ke("0000-00-00")}),a=Ye.computed(()=>e.now?Ke(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return f(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Ye.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function lt(r,{parsedView:o,times:u,parsedValue:l}){const e=Ye.computed(()=>{const e=l.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=C(e),n=S(e),t=x(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,u.today),n=Y(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=H(K(n),E,t>1?t-1:t,r.weekdays),k(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=C(e),n=S(e),k(n),t=x(a.year,a.month);break;case"resource":t=1,n=H(K(n),E,t,r.weekdays),k(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const ye=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let me,he;function pe(e,a){const t={};for(const n in e){const r=e[n],o=ye("on-"+n);if(void 0===me)return void console.warn("$listeners has not been set up");if(void 0!==me.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),he(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function we(e,t){return pe(ge(e),t)}function ge(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function be(e){return Object.keys(ge(e))}function it(e,t){return he=e,me=t,{getMouseEventHandlers:pe,getDefaultMouseEventHandlers:we,getMouseEventName:ge,getRawMouseEvents:be}}const ke=["moved"];function dt(l,{parsedView:i,parsedValue:d,weekdaySkips:s,direction:c,maxDays:v,times:f,emittedValue:y,emit:m}){function e(a=1){if(0!==a){let e=K(d.value);const n=a>0,r=n?E:M,o=n?h:p;let t=n?a:-a;c.value=n?"next":"prev";const u=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),w(e);while(0===s.value[e.weekday])e=J(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":W(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":W(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":W(e,r,v.value,l.weekdays);break}w(e),k(e),g(e),X(e,f.now),y.value=e.date,m("moved",e)}else y.value=$e()}return{move:e}}const De=/^on[A-Z]/;function st(e=Ye.getCurrentInstance()){return{emitListeners:Ye.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===De.test(e)&&(t[e]=!0)});return t})}}function ct(){return[Ye.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function vt(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Ye.h("button",t,[a,!0===n&&ct()])}const _e={cellWidth:[Number,String]};function ft(e){const t=Ye.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const qe=["change"];function yt(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function mt(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Ce}=mt(),Se={useNavigation:Boolean};function ht(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:i,weekdaySkips:d,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",m))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",m),e=!1)}function f(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function m(e){f(e)&&Ce(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(f(e)&&Ce(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:D();break;case 35:q();break;case 36:_();break;case 37:g();break;case 38:p();break;case 39:b();break;case 40:w();break}}function p(e){let t=K(o.value);if("month"===l.value){if(t=J(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=J(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function w(e){let t=K(o.value);if("month"===l.value){if(t=J(t,{day:7}),o.value.month!==t.month)return s.value="next",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=J(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function g(e){let t=K(o.value);s.value="prev";do{t=J(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=K(o.value);s.value="next";do{t=J(t,{day:1})}while(0===d.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function k(e){let t=K(o.value);if("month"===l.value||"month-interval"===l.value){t=J(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=J(t,{day:a})}else"day"===l.value?t=J(t,{day:-1}):"week"===l.value&&(t=J(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=K(o.value);if("month"===l.value||"month-interval"===l.value){t=J(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=J(t,{day:a})}else"day"===l.value?t=J(t,{day:1}):"week"===l.value&&(t=J(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=K(o.value);"month"===l.value||"month-interval"===l.value?t=C(t):"week"===l.value&&(t=P(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=J(t,{day:-1});r.value=t.date}function q(e){let t=K(o.value);"month"===l.value||"month-interval"===l.value?t=S(t):"week"===l.value&&(t=Y(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=J(t,{day:-1});r.value=t.date}return Ye.onBeforeUnmount(()=>{v()}),Ye.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var Te=Ye.defineComponent({name:"QCalendarDay",directives:[at],props:{...ne,...se,...ce,...ve,...fe,..._e,...Se},emits:["update:model-value",...qe,...ke,...be("-date"),...be("-interval"),...be("-head-intervals"),...be("-head-day"),...be("-time")],setup(f,{slots:y,emit:c,expose:e}){const t=Ye.ref(null),a=Ye.ref(null),n=Ye.ref(null),m=Ye.ref(null),r=Ye.ref(null),h=Ye.ref({}),o=Ye.ref({}),u=Ye.ref({}),l=Ye.ref("next"),i=Ye.ref(f.modelValue||$e()),d=Ye.ref("0000-00-00"),s=Ye.ref(0),p=Ye.ref(f.modelValue),v=Ye.reactive({width:0,height:0}),w=Ye.ref(!1),g=Ye.ref(!1),b=Ye.ref(null),k=Ye.ref(null),D=Ye.computed(()=>{if("month"===f.view)return"month-interval";return f.view}),_=Ye.getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:q}=st(_),{isSticky:C}=ft(f),{times:S,setCurrent:T,updateCurrent:x}=ut(f);x(),T();const{weekdaySkips:F,parsedStart:I,parsedEnd:A,dayFormatter:E,weekdayFormatter:M,ariaDateFormatter:H,dayStyleDefault:W,getRelativeClasses:j}=rt(f,{startDate:i,endDate:d,times:S}),B=Ye.computed(()=>{return Ke(f.modelValue,S.now)||I.value||S.today});r.value=B.value,m.value=B.value.date;const L=Ye.computed(()=>{if(0===s.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===U.value||0===U.value.length)return!0;const e=U.value[0];const t=U.value[U.value.length-1];return!0!==Je(B.value,e,t)}),{renderValues:V}=lt(f,{parsedView:D,times:S,parsedValue:B}),{rootRef:O,scrollWidth:R,__initCalendar:N,__renderCalendar:z}=nt(f,Pe,{scrollArea:t,pane:a}),{days:U,intervals:P,intervalFormatter:Y,ariaDateTimeFormatter:$,parsedCellWidth:X,getIntervalClasses:K,showIntervalLabelDefault:Z,styleDefault:Q,getTimestampAtEventInterval:G,getTimestampAtEvent:J,getScopeForSlot:ee,scrollToTime:te,heightToMinutes:ae,timeDurationHeight:ne,timeStartPos:re}=ot(f,{weekdaySkips:F,times:S,scrollArea:t,parsedStart:I,parsedEnd:A,maxDays:s,size:v,headerColumnRef:n}),{move:oe}=dt(f,{parsedView:D,parsedValue:B,weekdaySkips:F,direction:l,maxDays:s,times:S,emittedValue:p,emit:c}),{getDefaultMouseEventHandlers:ue}=it(c,q),{checkChange:le}=yt(c,{days:U,lastStart:b,lastEnd:k}),{isKeyCode:ie}=mt(),{tryFocus:de}=ht(f,{rootRef:O,focusRef:m,focusValue:r,datesRef:h,days:U,parsedView:D,parsedValue:B,emittedValue:p,weekdaySkips:F,direction:l,times:S}),se=Ye.computed(()=>{{if("day"===f.view&&parseInt(f.columnCount,10)>1)return parseInt(f.columnCount,10);if("day"===f.view&&f.maxDays&&f.maxDays>1)return f.maxDays}return U.value.length}),ce=Ye.computed(()=>{if(O.value)return parseInt(getComputedStyle(O.value).getPropertyValue("--calendar-intervals-width"),10);return 0}),ve=Ye.computed(()=>{if(O.value){const e=v.width||O.value.getBoundingClientRect().width;if(e&&ce.value&&se.value)return(e-R.value-ce.value)/se.value+"px"}return 100/se.value+"%"});function fe(){p.value=$e()}function ye(e=1){oe(e)}function me(e=1){oe(-e)}function he({width:e,height:t}){v.width=e,v.height=t}function pe(e){return e.date===p.value}function we(){return Ye.h("div",{roll:"presentation",class:{"q-calendar-day__head":!0,"q-calendar__sticky":!0===C.value},style:{marginRight:R.value+"px"}},[ge(),be()])}function ge(){const e=y["head-intervals"],t={timestamps:U.value,days:U.value,date:f.modelValue};return Ye.h("div",{class:{"q-calendar-day__head--intervals":!0,"q-calendar__sticky":!0===C.value},...ue("-head-intervals",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function be(){return Ye.h("div",{ref:n,class:{"q-calendar-day__head--days__column":!0}},[ke(),De()])}function ke(){return Ye.h("div",{class:{"q-calendar-day__head--days__weekdays":!0}},[..._e()])}function De(){const e=y["head-days-events"];return Ye.nextTick(()=>{if(u.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),Ye.h("div",{class:{"q-calendar-day__head--days__event":!0}},[e&&Ye.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{days:U.value,ref:u}})]),...qe()])}function _e(){return 1===U.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>Ce(U.value[0],e)):U.value.map(e=>Ce(e))}function qe(){return 1===U.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>Te(U.value[0],e)):U.value.map(e=>Te(e))}function Ce(t,e){const a=y["head-day"],n=y["head-date"],r=!0!==f.noActiveDate&&pe(t),o=ee(t,e);o.activeDate=r,o.droppable=w.value===t.date;const u=!0===C.value?f.cellWidth:ve.value,l=f.weekdayStyle||W,i={width:u,maxWidth:u,minWidth:u,...l({scope:o})};!0===C.value&&(i.minWidth=u);const d="function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{},s=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{h.value[c]=e},tabindex:!0===s?0:-1,class:{"q-calendar-day__head--day":!0,...d,...j(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:i,onFocus:e=>{!0===s&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&ie(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&ie(e,[13,32])&&(p.value=t.date)},...ue("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?w.value=t.date:w.value="")}};return Ye.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Ee(t,e),void 0===a&&Se(t),void 0===a&&n&&n({scope:o}),void 0===a&&Me(t,e),ct()])}function Se(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&xe(e),!0!==f.noDefaultHeaderBtn&&Ie(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,Ye.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&xe(e),!0!==f.noDefaultHeaderBtn&&Ie(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,Ye.h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&Ie(e),!0!==f.noDefaultHeaderText&&xe(e)])):void 0}function Te(e,t){const a=y["head-day-event"],n=!0!==f.noActiveDate&&pe(e),r=ee(e,t);r.activeDate=n;const o=!0===C.value?et(X.value):ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===C.value&&(u.minWidth=o),Ye.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-day__head--day__event":!0,...j(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function xe(e){const t=y["head-weekday-label"],a=!0===f.shortWeekdayLabel,n=ee(e);n.shortWeekdayLabel=f.shortWeekdayLabel;const r={class:{"q-calendar-day__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Ye.h("div",r,t&&t({scope:n})||Fe(e,a))}function Fe(e,t){const a=M.value(e,t||f.weekdayBreakpoints[0]>0&&X.value<=f.weekdayBreakpoints[0]);return Ye.h("span",{class:"q-calendar-day__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&X.value<=f.weekdayBreakpoints[1]?tt(a,f.minWeekdayLabel):a)}function Ie(e){const t={class:{"q-calendar-day__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return Ye.h("div",t,Ae(e))}function Ae(a){const e=!0!==f.noActiveDate&&pe(a),t=E.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-day__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&ie(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&ie(e,[13,32])&&(p.value=a.date,void 0!==q.value.onClickDate&&c("click-date",{scope:o}))},...ue("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(p.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=H.value(a)),r?r({scope:o}):vt(f,u,n?n({scope:o}):t)}function Ee(e,t){const a=y["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Ye.h("div",{class:"q-calendar-day__column-header--before"},[a({scope:n})])}}function Me(e,t){const a=y["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Ye.h("div",{class:"q-calendar-day__column-header--after"},[a({scope:n})])}}function He(){return Ye.h("div",{class:"q-calendar-day__body"},[We()])}function We(){return!0===C.value?Ye.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==C.value&&Ne(),Be()]):!0===f.noScroll?je():Ye.h("div",{ref:t,class:{"q-calendar-day__scroll-area":!0,"q-calendar__scroll":!0}},[je()])}function je(){return Ye.h("div",{ref:a,class:"q-calendar-day__pane"},[Ne(),Be()])}function Be(){const e=y["day-container"];return Ye.h("div",{class:"q-calendar-day__day-container"},[!0===C.value&&!0!==f.noHeader&&we(),Ye.h("div",{style:{display:"flex",flexDirection:"row"}},[!0===C.value&&Ne(),...Le()]),e&&e({scope:{days:U.value}})])}function Le(){return 1===U.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>Ve(U.value[0],0,e)):U.value.map((e,t)=>Ve(e,t))}function Ve(e,t,a){const n=y["day-body"],r=ee(e,a),o=!0===C.value?f.cellWidth:ve.value,u={width:o,maxWidth:o,minWidth:o};return!0===C.value&&(u.minWidth=o),Ye.h("div",{key:e.date+(void 0!==a?":"+a:""),class:{"q-calendar-day__day":!0,...j(e)},style:u},[...Oe(t,a),n&&n({scope:r})])}function Oe(e,t){return P.value[e].map(e=>Re(e,t))}function Re(a,n){const e=et(f.intervalHeight),t=f.intervalStyle||Q,r=y["day-interval"],o=ee(a,n);o.droppable=g.value===Qe(a);const u="function"===typeof f.intervalClass?f.intervalClass({scope:o}):{},l=!0===f.focusable&&f.focusType.includes("interval"),i=Ge(a),d={key:i,tabindex:!0===l?0:-1,class:{"q-calendar-day__day-interval":0===a.minute,"q-calendar-day__day-interval--section":0!==a.minute,...u,...K(a,f.selectedDates,f.selectedStartEndDates),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:{height:e,...t({scope:o})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"interval",o)?g.value=Qe(a):g.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"interval",o)?g.value=Qe(a):g.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"interval",o)?g.value=Qe(a):g.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"interval",o)?g.value=Qe(a):g.value="")},onKeydown:e=>{ie(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{if(ie(e,[13,32])){const t=ee(a,n);p.value=t.timestamp.date,void 0!==q.value.onClickTime&&c("click-time",{scope:t,event:e})}},...ue("-time",e=>{const t=ee(G(e,a,f.timeClicksClamped,S.now),n);return{scope:t,event:e}})};!0!==f.noAria&&(d.ariaLabel=$.value(a));const s=r?r({scope:o}):void 0;return Ye.h("div",d,[s,ct()])}function Ne(){const e={ariaHidden:"true",class:{"q-calendar-day__intervals-column":!0,"q-calendar__ellipsis":!0,"q-calendar__sticky":!0===C.value},...ue("-interval",e=>{const t=J(e,I.value,f.timeClicksClamped,S.now);return{scope:{timestamp:t},event:e}})};return Ye.h("div",e,ze())}function ze(){return P.value[0].map(e=>Ue(e))}function Ue(e){const t=y["interval-label"],a=et(f.intervalHeight),n=f.shortIntervalLabel,r=f.showIntervalLabel||Z,o=r(e),u=o?Y.value(e,n):void 0;return Ye.h("div",{key:e.time,class:{"q-calendar-day__interval":0===e.minute,"q-calendar-day__interval--section":0!==e.minute},style:{height:a}},[Ye.h("div",{class:"q-calendar-day__interval--text q-calendar__overflow-wrap"},[t?t({scope:{timestamp:e,label:u}}):u])])}function Pe(){if(L.value){const{start:a,end:n,maxDays:r}=V.value;i.value=a.date,d.value=n.date,s.value=r}const e=v.width>0,t=Ye.withDirectives(Ye.h("div",{key:i.value,class:"q-calendar-day"},[!0===e&&!0!==C.value&&!0!==f.noHeader&&we(),e&&He()]),[[at,he]]);if(!0!==f.animated)return t;{const o="q-calendar--"+("prev"===l.value?f.transitionPrev:f.transitionNext);return Ye.h(Ye.Transition,{name:o,appear:!0},()=>t)}}return Ye.watch([U],le,{deep:!0,immediate:!0}),Ye.watch(()=>f.modelValue,(e,t)=>{if(p.value!==f.modelValue){if(!0===f.animated){const a=Ze(Xe(e)),n=Ze(Xe(t));l.value=a>=n?"next":"prev"}p.value=e}m.value=e}),Ye.watch(p,(e,t)=>{if(p.value!==f.modelValue){if(!0===f.animated){const a=Ze(Xe(e)),n=Ze(Xe(t));l.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Ye.watch(m,e=>{e&&(r.value=Ke(e))}),Ye.watch(r,e=>{h.value[m.value]?h.value[m.value].focus():de()}),Ye.watch(()=>f.maxDays,e=>{s.value=e}),Ye.onBeforeUpdate(()=>{h.value={};o.value={};u.value={}}),Ye.onMounted(()=>{N()}),e({prev:me,next:ye,move:oe,moveToToday:fe,updateCurrent:x,timeStartPos:re,timeDurationHeight:ne,heightToMinutes:ae,scrollToTime:te}),()=>z()}}),xe="@quasar/quasar-ui-qcalendar",Fe="4.0.0-beta.3",Ie="Jeff Galbraith <jeff@quasar.dev>",Ae="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",Ee="MIT",Me="dist/index.esm.js",He="dist/index.common.js",We="dist/types/index.d.ts",je={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},Be={type:"github",url:"https://github.com/sponsors/hawkeye64"},Le={access:"public"},Ve={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},Oe="https://github.com/quasarframework/quasar-ui-qcalendar/issues",Re="https://github.com/quasarframework/quasar-ui-qcalendar",Ne=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ze={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},Ue={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},Pe=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],Pe={name:xe,version:Fe,author:Ie,description:Ae,license:Ee,module:Me,main:He,typings:We,scripts:je,funding:Be,publishConfig:Le,repository:Ve,bugs:Oe,homepage:Re,keywords:Ne,vetur:ze,devDependencies:Ue,browserslist:Pe};const{version:pt}=Pe;e.QCalendarDay=Te,e.version=pt,Object.defineProperty(e,"__esModule",{value:!0})});
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var vue=require("vue");const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=getDayIdentifier(parsed(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const l=parsed(r[s][0]),c=parsed(r[s][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],d=[],i=42,s=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===l;if(l<getDayIdentifier(e))return c;while((!y||c.length<s)&&c.length<i){if(m=getDayIdentifier(v),y=y||m>l&&c.length>=s,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,u,d),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),d=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(d):t[u]=[t[u],d]:t[u]=d}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const d=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:d,__initCalendar:i,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),d=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),i=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:d,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===u||!0===d||!0===i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:d,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{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,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:a,parsedStart:o,parsedEnd:u,size:d,headerColumnRef:i}){const e=vue.computed(()=>parseInt(r.minWeeks,10)),s=vue.computed(()=>e.value*r.weekdays.length),l=vue.computed(()=>w(D(o.value))),c=vue.computed(()=>b(_(u.value))),v=vue.computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:d.width>0&&i.value&&(e=i.value.offsetWidth/r.weekdays.length);return e}),m=vue.computed(()=>{return createDayList(l.value,c.value,a.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,s.value)}),y=vue.computed(()=>{const e=m.value[0];const t=w(e);const a=b(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),p=vue.computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),h=vue.computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),f=vue.computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let g=!0;const k=vue.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&d.width<h.value;!0===g&&(g=!1,t("mini-mode",e));return e});function w(e){return getStartOfWeek(e,r.weekdays,a.today)}function b(e){return getEndOfWeek(e,r.weekdays,a.today)}function D(e){return getStartOfMonth(e)}function _(e){return getEndOfMonth(e)}function M(e){const t=getDayIdentifier(e);return t<getDayIdentifier(o.value)||t>getDayIdentifier(u.value)}return vue.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:h,parsedMonthLabelSize:f,days:m,todayWeek:y,isMiniMode:k,monthFormatter:p,isOutside:M}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),d(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:d}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:d}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(d,{parsedView:i,parsedValue:s,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,d.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,d.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:d,emittedValue:i,weekdaySkips:s,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:M();break;case 36:_();break;case 37:k();break;case 38:f();break;case 39:w();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===d.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(i.value=t.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===d.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(i.value=t.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===d.value||"month-interval"===d.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===d.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===d.value)return void(i.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===s.value[t.weekday]);if("month"===d.value||"month-interval"===d.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===d.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===d.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===d.value||"month-interval"===d.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=addToDate(t,{day:a})}else"day"===d.value?t=addToDate(t,{day:-1}):"week"===d.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===d.value||"month-interval"===d.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=addToDate(t,{day:a})}else"day"===d.value?t=addToDate(t,{day:1}):"week"===d.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===d.value||"month-interval"===d.value?t=getStartOfMonth(t):"week"===d.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function M(e){let t=copyTimestamp(o.value);"month"===d.value||"month-interval"===d.value?t=getEndOfMonth(t):"week"===d.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarMonth=vue.defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(m,{slots:y,emit:c,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),p=vue.ref(null),r=vue.ref(null),v=vue.ref({}),u=vue.ref([]),d=vue.ref([]),o=vue.ref("next"),i=vue.ref(m.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),h=vue.ref(m.modelValue),f=vue.reactive({width:0,height:0}),g=vue.ref(!1),k=vue.ref(!1),w=vue.ref(null),b=vue.ref(null),D=vue.computed(()=>{return"month"}),_=vue.getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:M}=useEmitListeners(_),{isSticky:T}=useCellWidth(m);vue.watch(T,e=>{});const{times:N,setCurrent:E,updateCurrent:I}=useTimes(m);I(),E();const{weekdaySkips:S,parsedStart:O,parsedEnd:C,dayFormatter:F,weekdayFormatter:A,ariaDateFormatter:W,dayStyleDefault:x,getRelativeClasses:q}=useCommon(m,{startDate:i,endDate:s,times:N}),H=vue.computed(()=>{return parseTimestamp(m.modelValue,N.now)||O.value||N.today});r.value=H.value,p.value=H.value.date;const R=vue.computed(()=>{const e={};void 0!==m.dayPadding&&(e.padding=m.dayPadding);e.minWidth=ne.value;e.maxWidth=ne.value;e.width=ne.value;return e}),{renderValues:L}=useRenderValues(m,{parsedView:D,times:N,parsedValue:H}),{rootRef:z,__initCalendar:B,__renderCalendar:Y}=useCalendar(m,Se,{scrollArea:t,pane:a}),{days:P,todayWeek:j,isMiniMode:U,parsedCellWidth:V,parsedMonthLabelSize:$,isOutside:K,monthFormatter:X}=useMonth(m,c,{weekdaySkips:S,times:N,parsedStart:O,parsedEnd:C,size:f,headerColumnRef:n}),{move:Z}=useMove(m,{parsedView:D,parsedValue:H,weekdaySkips:S,direction:o,maxDays:l,times:N,emittedValue:h,emit:c}),{getDefaultMouseEventHandlers:Q}=useMouse(c,M),{checkChange:G}=useCheckChange(c,{days:P,lastStart:w,lastEnd:b}),{isKeyCode:J}=useEvents(),{tryFocus:ee}=useKeyboard(m,{rootRef:z,focusRef:p,focusValue:r,datesRef:v,days:P,parsedView:D,parsedValue:H,emittedValue:h,weekdaySkips:S,direction:o,times:N}),te=vue.computed(()=>{if(z.value)return!0===m.showWorkWeeks?parseInt(getComputedStyle(z.value).getPropertyValue(!0===U.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),ae=vue.computed(()=>{return m.weekdays.length}),ne=vue.computed(()=>{if(z.value){const e=f.width||z.value.getBoundingClientRect().width;if(e&&ae.value)return(e-te.value)/ae.value+"px"}return 100/ae.value+"%"}),re=vue.computed(()=>{return!0===m.focusable&&m.focusType.includes("day")&&!0!==U.value}),oe=vue.computed(()=>{return!0===m.focusable&&m.focusType.includes("date")&&!0!==re.value});function ue(){h.value=today()}function de(e=1){Z(e)}function ie(e=1){Z(-e)}function se({width:e,height:t}){f.width=e,f.height=t}function le(e){return e.date===h.value}function ce(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ve(){if(!0!==U.value&&0===m.dayHeight){const e=y.week;if(void 0!==e&&window)for(const t in u.value){const a=u.value[t];if(void 0!==a){const n=d.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function me(){return vue.h("div",{class:"q-calendar-month__body"},[...be()])}function ye(){return vue.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===m.showWorkWeeks&&he(),vue.h("div",{class:"q-calendar-month__head--wrapper"},[pe()])])}function pe(){return vue.h("div",{ref:n,class:{"q-calendar-month__head--weekdays":!0}},[...fe()])}function he(){const e=y["head-workweek"],t={start:O.value,end:C.value,miniMode:U.value};return vue.h("div",{class:"q-calendar-month__head--workweek",...Q("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function fe(){return j.value.map((e,t)=>ge(e,t))}function ge(t,e){const a=y["head-day"],n=P.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o={weekday:r,timestamp:t,days:n,index:e,miniMode:U.value};o.droppable=g.value===t.weekday;const u=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),d="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},i=!0===m.focusable&&m.focusType.includes("weekday"),s=ne.value,l=m.weekdayStyle||x,c={width:s,maxWidth:s,minWidth:s,...l({scope:o})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===i?0:-1,class:{"q-calendar-month__head--weekday":!0,...d,"q-disabled-day disabled":!0===u,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onFocus:e=>{!0===i&&(p.value=t.date)},...Q("-head-day",e=>{return{scope:o,event:e}})};return!0!==m.noAria&&(v.ariaLabel=A.value(t,!1)),vue.h("div",v,[void 0===a&&we(t,m.shortWeekdayLabel||U.value),void 0!==a&&a({scope:o}),ke(t,e),!0===i&&useFocusHelper()])}function ke(t,e){const a=y["head-day-event"],n=!0!==m.noActiveDate&&le(t),r=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),o=P.value.filter(e=>e.weekday===t.weekday),u=o[0].weekday,d={weekday:u,timestamp:t,days:o,index:e,miniMode:U.value,activeDate:n,disabled:r},i=ne.value,s=m.weekdayStyle||x,l={width:i,maxWidth:i,minWidth:i,...s({scope:d})};return vue.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:l},[void 0!==a&&a({scope:d})])}function we(e,t){const a=A.value(e,t||m.weekdayBreakpoints[0]>0&&V.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},!0===U.value&&!0===m.shortWeekdayLabel||m.weekdayBreakpoints[1]>0&&V.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function be(){const t=m.weekdays.length,a=[];for(let e=0;e<P.value.length;e+=t)a.push(De(P.value.slice(e,e+t),e/t));return a}function De(e,t){const a=y.week,n=m.weekdays,r={week:e,weekdays:n,miniMode:U.value},o={};return o.height=m.dayHeight>0&&!0!==U.value?convertToUnit(parseInt(m.dayHeight,10)):"auto",m.dayMinHeight>0&&!0!==U.value&&(o.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),vue.h("div",{key:e[0].date,ref:e=>{d.value[t]=e},class:"q-calendar-month__week--wrapper",style:o},[!0===m.showWorkWeeks?_e(e):void 0,vue.h("div",{class:"q-calendar-month__week"},[vue.h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>Me(e))),!0!==U.value&&void 0!==a?vue.h("div",{ref:e=>{u.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function _e(e){const t=y.workweek,a=e.length>2?e[2]:e[0],{timestamp:n}=ce(e),r=Number(a.workweek).toLocaleString(m.locale),o={workweekLabel:r,week:e,miniMode:U.value};return vue.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...q(!1!==n?n:a,!1)},...Q("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Me(t){const e=y.day,a=m.dayStyle||x,n=K(t),r=!0!==m.noActiveDate&&H.value.date===t.date,o=!1===n&&!0===m.showMonthLabel&&P.value.find(e=>e.month===t.month).day===t.day,u={outside:n,timestamp:t,miniMode:U.value,activeDate:r,hasMonth:o,droppable:k.value===t.date},d=Object.assign({...R.value},a({scope:u})),i="function"===typeof m.dayClass?m.dayClass({scope:u}):{},s={key:t.date,ref:e=>{!0===re.value&&(v.value[t.date]=e)},tabindex:!0===re.value?0:-1,class:{"q-calendar-month__day":!0,...i,...q(t,n,m.selectedDates,m.selectedStartEndDates,m.hover),"q-active-date":!0===r,disabled:!0!==m.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===re.value},style:d,onFocus:e=>{!0===re.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==M.value.onClickDay&&!0!==U.value&&c("click-day",{scope:u,event:e}))},...Q("-day",e=>{return{scope:u,event:e}})},l={onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"day",u)?k.value=t.date:k.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"day",u)?k.value=t.date:k.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"day",u)?k.value=t.date:k.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"day",u)?k.value=t.date:k.value="")}};return!0!==n&&Object.assign(s,l),!0!==m.noAria&&(s.ariaLabel=W.value(t)),vue.h("div",s,[Te(t,n,o),vue.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:u}):void 0),!0===re.value&&useFocusHelper()])}function Te(e,t,a){let n,r;const o=[Ne(e,t)];!0!==U.value&&!0===a&&f.width>340&&(r=Ie(e,t)),!0!==U.value&&!0===m.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=Ee(e,t)),"left"===m.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===m.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0);const u={class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+m.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}};return vue.h("div",u,o)}function Ne(a,t){if(!0!==t||!0!==m.noOutsideDays){const e=F.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=m.selectedDates&&m.selectedDates.length>0&&m.selectedDates.includes(a.date),u=!0!==m.noActiveDate&&le(a),d={dayLabel:e,timestamp:a,outside:t,activeDate:u,selectedDate:o,miniMode:U.value},i={key:a.date,ref:e=>{!0===oe.value&&(v.value[a.date]=e)},tabindex:!0===oe.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===oe.value},disabled:!0===a.disabled||!0!==m.enableOutsideDays&&!0===t,onFocus:e=>{!0===oe.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===oe.value&&!0!==t&&!0!==a.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),h.value=a.date,void 0!==M.value.onClickDate&&c("click-date",{scope:d,event:e}))},...Q("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date);return{scope:d,event:e}})};return!0!==m.noAria&&(i.ariaLabel=W.value(a)),[r?r({scope:d}):useButton(m,i,n?n({scope:d}):e),!0===oe.value&&useFocusHelper()]}}function Ee(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return vue.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ie(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["month-label"],n=X.value(e,m.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:U.value},o={};return!0!==U.value&&void 0!==$.value&&(o.fontSize=$.value),vue.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==U.value?n:void 0])}}function Se(){const{start:e,end:t}=L.value;i.value=e.date,s.value=t.date;const a=f.width>0,n=vue.withDirectives(vue.h("div",{class:{"q-calendar-mini":!0===U.value,"q-calendar-month":!0},key:i.value},[!0===a&&!0!==m.noHeader&&ye(),!0===a&&me()]),[[ResizeObserver$1,se]]);if(!0!==m.animated)return n;{const r="q-calendar--"+("prev"===o.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([P],G,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(h.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}h.value=e}p.value=e}),vue.watch(h,(e,t)=>{if(h.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(r.value=parseTimestamp(e),h.value!==e&&(h.value=e))}),vue.watch(r,e=>{v.value[p.value]?v.value[p.value].focus():ee()}),vue.onBeforeUpdate(()=>{v.value={};u.value=[];d.value=[];vue.nextTick(()=>{ve()})}),vue.onMounted(()=>{B();ve()}),e({prev:ie,next:de,move:Z,moveToToday:ue,updateCurrent:I}),()=>Y()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarMonth:QCalendarMonth,install(e){e.component(QCalendarMonth.name,QCalendarMonth)}};module.exports=Plugin;
"use strict";var vue=require("vue");const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const d=getDayIdentifier(parsed(a));o>=d&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const l=parsed(r[s][0]),c=parsed(r[s][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],d=[],i=42,s=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===l;if(l<getDayIdentifier(e))return c;while((!y||c.length<s)&&c.length<i){if(m=getDayIdentifier(v),y=y||m>l&&c.length>=s,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,u,d),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),d=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(d):t[u]=[t[u],d]:t[u]=d}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const d=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:d,__initCalendar:i,__renderCalendar:s}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),d=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),i=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),s=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:d,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==d&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==d&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===d,"q-range-hover":!0===r&&(!0===u||!0===d||!0===i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:d,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{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,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:a,parsedStart:o,parsedEnd:u,size:d,headerColumnRef:i}){const e=vue.computed(()=>parseInt(r.minWeeks,10)),s=vue.computed(()=>e.value*r.weekdays.length),l=vue.computed(()=>w(D(o.value))),c=vue.computed(()=>b(_(u.value))),v=vue.computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:d.width>0&&i.value&&(e=i.value.offsetWidth/r.weekdays.length);return e}),m=vue.computed(()=>{return createDayList(l.value,c.value,a.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,s.value)}),y=vue.computed(()=>{const e=m.value[0];const t=w(e);const a=b(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),p=vue.computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),h=vue.computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),f=vue.computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let g=!0;const k=vue.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&d.width<h.value;!0===g&&(g=!1,t("mini-mode",e));return e});function w(e){return getStartOfWeek(e,r.weekdays,a.today)}function b(e){return getEndOfWeek(e,r.weekdays,a.today)}function D(e){return getStartOfMonth(e)}function _(e){return getEndOfMonth(e)}function M(e){const t=getDayIdentifier(e);return t<getDayIdentifier(o.value)||t>getDayIdentifier(u.value)}return vue.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:s,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:h,parsedMonthLabelSize:f,days:m,todayWeek:y,isMiniMode:k,monthFormatter:p,isOutside:M}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),d(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function d(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:d}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:d}){const e=vue.computed(()=>{const e=d.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(d,{parsedView:i,parsedValue:s,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(s.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,d.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,d.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,d.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:d,emittedValue:i,weekdaySkips:s,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:M();break;case 36:_();break;case 37:k();break;case 38:f();break;case 39:w();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===d.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(i.value=t.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===d.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(i.value=t.date)}else"day"!==d.value&&"week"!==d.value&&"month-interval"!==d.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===d.value||"month-interval"===d.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===d.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===d.value)return void(i.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===s.value[t.weekday]);if("month"===d.value||"month-interval"===d.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===d.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===d.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===d.value||"month-interval"===d.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=addToDate(t,{day:a})}else"day"===d.value?t=addToDate(t,{day:-1}):"week"===d.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===d.value||"month-interval"===d.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=addToDate(t,{day:a})}else"day"===d.value?t=addToDate(t,{day:1}):"week"===d.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===d.value||"month-interval"===d.value?t=getStartOfMonth(t):"week"===d.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function M(e){let t=copyTimestamp(o.value);"month"===d.value||"month-interval"===d.value?t=getEndOfMonth(t):"week"===d.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarMonth=vue.defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(m,{slots:y,emit:c,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),p=vue.ref(null),r=vue.ref(null),v=vue.ref({}),u=vue.ref([]),d=vue.ref([]),o=vue.ref("next"),i=vue.ref(m.modelValue||today()),s=vue.ref("0000-00-00"),l=vue.ref(0),h=vue.ref(m.modelValue),f=vue.reactive({width:0,height:0}),g=vue.ref(!1),k=vue.ref(!1),w=vue.ref(null),b=vue.ref(null),D=vue.computed(()=>{return"month"}),_=vue.getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:M}=useEmitListeners(_),{isSticky:T}=useCellWidth(m);vue.watch(T,e=>{});const{times:N,setCurrent:E,updateCurrent:I}=useTimes(m);I(),E();const{weekdaySkips:S,parsedStart:O,parsedEnd:C,dayFormatter:F,weekdayFormatter:A,ariaDateFormatter:W,dayStyleDefault:x,getRelativeClasses:q}=useCommon(m,{startDate:i,endDate:s,times:N}),H=vue.computed(()=>{return parseTimestamp(m.modelValue,N.now)||O.value||N.today});r.value=H.value,p.value=H.value.date;const R=vue.computed(()=>{const e={};void 0!==m.dayPadding&&(e.padding=m.dayPadding);e.minWidth=ne.value;e.maxWidth=ne.value;e.width=ne.value;return e}),{renderValues:L}=useRenderValues(m,{parsedView:D,times:N,parsedValue:H}),{rootRef:z,__initCalendar:B,__renderCalendar:Y}=useCalendar(m,Se,{scrollArea:t,pane:a}),{days:P,todayWeek:j,isMiniMode:U,parsedCellWidth:V,parsedMonthLabelSize:$,isOutside:K,monthFormatter:X}=useMonth(m,c,{weekdaySkips:S,times:N,parsedStart:O,parsedEnd:C,size:f,headerColumnRef:n}),{move:Z}=useMove(m,{parsedView:D,parsedValue:H,weekdaySkips:S,direction:o,maxDays:l,times:N,emittedValue:h,emit:c}),{getDefaultMouseEventHandlers:Q}=useMouse(c,M),{checkChange:G}=useCheckChange(c,{days:P,lastStart:w,lastEnd:b}),{isKeyCode:J}=useEvents(),{tryFocus:ee}=useKeyboard(m,{rootRef:z,focusRef:p,focusValue:r,datesRef:v,days:P,parsedView:D,parsedValue:H,emittedValue:h,weekdaySkips:S,direction:o,times:N}),te=vue.computed(()=>{if(z.value)return!0===m.showWorkWeeks?parseInt(getComputedStyle(z.value).getPropertyValue(!0===U.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),ae=vue.computed(()=>{return m.weekdays.length}),ne=vue.computed(()=>{if(z.value){const e=f.width||z.value.getBoundingClientRect().width;if(e&&ae.value)return(e-te.value)/ae.value+"px"}return 100/ae.value+"%"}),re=vue.computed(()=>{return!0===m.focusable&&m.focusType.includes("day")&&!0!==U.value}),oe=vue.computed(()=>{return!0===m.focusable&&m.focusType.includes("date")&&!0!==re.value});function ue(){h.value=today()}function de(e=1){Z(e)}function ie(e=1){Z(-e)}function se({width:e,height:t}){f.width=e,f.height=t}function le(e){return e.date===h.value}function ce(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ve(){if(!0!==U.value&&0===m.dayHeight){const e=y.week;if(void 0!==e&&window)for(const t in u.value){const a=u.value[t];if(void 0!==a){const n=d.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function me(){return vue.h("div",{class:"q-calendar-month__body"},[...be()])}function ye(){return vue.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===m.showWorkWeeks&&he(),vue.h("div",{class:"q-calendar-month__head--wrapper"},[pe()])])}function pe(){return vue.h("div",{ref:n,class:{"q-calendar-month__head--weekdays":!0}},[...fe()])}function he(){const e=y["head-workweek"],t={start:O.value,end:C.value,miniMode:U.value};return vue.h("div",{class:"q-calendar-month__head--workweek",...Q("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function fe(){return j.value.map((e,t)=>ge(e,t))}function ge(t,e){const a=y["head-day"],n=P.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o={weekday:r,timestamp:t,days:n,index:e,miniMode:U.value};o.droppable=g.value===t.weekday;const u=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),d="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},i=!0===m.focusable&&m.focusType.includes("weekday"),s=ne.value,l=m.weekdayStyle||x,c={width:s,maxWidth:s,minWidth:s,...l({scope:o})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===i?0:-1,class:{"q-calendar-month__head--weekday":!0,...d,"q-disabled-day disabled":!0===u,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?g.value=t.weekday:g.value="")},onFocus:e=>{!0===i&&(p.value=t.date)},...Q("-head-day",e=>{return{scope:o,event:e}})};return!0!==m.noAria&&(v.ariaLabel=A.value(t,!1)),vue.h("div",v,[void 0===a&&we(t,m.shortWeekdayLabel||U.value),void 0!==a&&a({scope:o}),ke(t,e),!0===i&&useFocusHelper()])}function ke(t,e){const a=y["head-day-event"],n=!0!==m.noActiveDate&&le(t),r=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),o=P.value.filter(e=>e.weekday===t.weekday),u=o[0].weekday,d={weekday:u,timestamp:t,days:o,index:e,miniMode:U.value,activeDate:n,disabled:r},i=ne.value,s=m.weekdayStyle||x,l={width:i,maxWidth:i,minWidth:i,...s({scope:d})};return vue.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:l},[void 0!==a&&a({scope:d})])}function we(e,t){const a=A.value(e,t||m.weekdayBreakpoints[0]>0&&V.value<=m.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},!0===U.value&&!0===m.shortWeekdayLabel||m.weekdayBreakpoints[1]>0&&V.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function be(){const t=m.weekdays.length,a=[];for(let e=0;e<P.value.length;e+=t)a.push(De(P.value.slice(e,e+t),e/t));return a}function De(e,t){const a=y.week,n=m.weekdays,r={week:e,weekdays:n,miniMode:U.value},o={};return o.height=m.dayHeight>0&&!0!==U.value?convertToUnit(parseInt(m.dayHeight,10)):"auto",m.dayMinHeight>0&&!0!==U.value&&(o.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),vue.h("div",{key:e[0].date,ref:e=>{d.value[t]=e},class:"q-calendar-month__week--wrapper",style:o},[!0===m.showWorkWeeks?_e(e):void 0,vue.h("div",{class:"q-calendar-month__week"},[vue.h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>Me(e))),!0!==U.value&&void 0!==a?vue.h("div",{ref:e=>{u.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function _e(e){const t=y.workweek,a=e.length>2?e[2]:e[0],{timestamp:n}=ce(e),r=Number(a.workweek).toLocaleString(m.locale),o={workweekLabel:r,week:e,miniMode:U.value};return vue.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...q(!1!==n?n:a,!1)},...Q("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Me(t){const e=y.day,a=m.dayStyle||x,n=K(t),r=!0!==m.noActiveDate&&H.value.date===t.date,o=!1===n&&!0===m.showMonthLabel&&P.value.find(e=>e.month===t.month).day===t.day,u={outside:n,timestamp:t,miniMode:U.value,activeDate:r,hasMonth:o,droppable:k.value===t.date},d=Object.assign({...R.value},a({scope:u})),i="function"===typeof m.dayClass?m.dayClass({scope:u}):{},s={key:t.date,ref:e=>{!0===re.value&&(v.value[t.date]=e)},tabindex:!0===re.value?0:-1,class:{"q-calendar-month__day":!0,...i,...q(t,n,m.selectedDates,m.selectedStartEndDates,m.hover),"q-active-date":!0===r,disabled:!0!==m.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===re.value},style:d,onFocus:e=>{!0===re.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==M.value.onClickDay&&!0!==U.value&&c("click-day",{scope:u,event:e}))},...Q("-day",e=>{return{scope:u,event:e}})},l={onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"day",u)?k.value=t.date:k.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"day",u)?k.value=t.date:k.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"day",u)?k.value=t.date:k.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"day",u)?k.value=t.date:k.value="")}};return!0!==n&&Object.assign(s,l),!0!==m.noAria&&(s.ariaLabel=W.value(t)),vue.h("div",s,[Te(t,n,o),vue.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:u}):void 0),!0===re.value&&useFocusHelper()])}function Te(e,t,a){let n,r;const o=[Ne(e,t)];!0!==U.value&&!0===a&&f.width>340&&(r=Ie(e,t)),!0!==U.value&&!0===m.showDayOfYearLabel&&void 0===r&&f.width>300&&(n=Ee(e,t)),"left"===m.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===m.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0);const u={class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+m.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}};return vue.h("div",u,o)}function Ne(a,t){if(!0!==t||!0!==m.noOutsideDays){const e=F.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=m.selectedDates&&m.selectedDates.length>0&&m.selectedDates.includes(a.date),u=!0!==m.noActiveDate&&le(a),d={dayLabel:e,timestamp:a,outside:t,activeDate:u,selectedDate:o,miniMode:U.value},i={key:a.date,ref:e=>{!0===oe.value&&(v.value[a.date]=e)},tabindex:!0===oe.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===oe.value},disabled:!0===a.disabled||!0!==m.enableOutsideDays&&!0===t,onFocus:e=>{!0===oe.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===oe.value&&!0!==t&&!0!==a.disabled&&J(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),h.value=a.date,void 0!==M.value.onClickDate&&c("click-date",{scope:d,event:e}))},...Q("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(h.value=a.date);return{scope:d,event:e}})};return!0!==m.noAria&&(i.ariaLabel=W.value(a)),[r?r({scope:d}):useButton(m,i,n?n({scope:d}):e),!0===oe.value&&useFocusHelper()]}}function Ee(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return vue.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ie(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["month-label"],n=X.value(e,m.shortMonthLabel||f.width<500),r={monthLabel:n,timestamp:e,miniMode:U.value},o={};return!0!==U.value&&void 0!==$.value&&(o.fontSize=$.value),vue.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==U.value?n:void 0])}}function Se(){const{start:e,end:t}=L.value;i.value=e.date,s.value=t.date;const a=f.width>0,n=vue.withDirectives(vue.h("div",{class:{"q-calendar-mini":!0===U.value,"q-calendar-month":!0},key:i.value},[!0===a&&!0!==m.noHeader&&ye(),!0===a&&me()]),[[ResizeObserver$1,se]]);if(!0!==m.animated)return n;{const r="q-calendar--"+("prev"===o.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([P],G,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(h.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}h.value=e}p.value=e}),vue.watch(h,(e,t)=>{if(h.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),vue.watch(p,e=>{e&&(r.value=parseTimestamp(e),h.value!==e&&(h.value=e))}),vue.watch(r,e=>{v.value[p.value]?v.value[p.value].focus():ee()}),vue.onBeforeUpdate(()=>{v.value={};u.value=[];d.value=[];vue.nextTick(()=>{ve()})}),vue.onMounted(()=>{B();ve()}),e({prev:ie,next:de,move:Z,moveToToday:ue,updateCurrent:I}),()=>Y()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarMonth:QCalendarMonth,install(e){e.component(QCalendarMonth.name,QCalendarMonth)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,nextTick,onMounted,Transition}from"vue";const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],s=42,u=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===l;if(l<getDayIdentifier(e))return c;while((!y||c.length<u)&&c.length<s){if(m=getDayIdentifier(v),y=y||m>l&&c.length>=u,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(i):t[d]=[t[d],i]:t[d]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),u=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{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,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:a,parsedStart:o,parsedEnd:d,size:i,headerColumnRef:s}){const e=computed(()=>parseInt(r.minWeeks,10)),u=computed(()=>e.value*r.weekdays.length),l=computed(()=>w(D(o.value))),c=computed(()=>b(_(d.value))),v=computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/r.weekdays.length);return e}),m=computed(()=>{return createDayList(l.value,c.value,a.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,u.value)}),y=computed(()=>{const e=m.value[0];const t=w(e);const a=b(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),p=computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),h=computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),f=computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let g=!0;const k=computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&i.width<h.value;!0===g&&(g=!1,t("mini-mode",e));return e});function w(e){return getStartOfWeek(e,r.weekdays,a.today)}function b(e){return getEndOfWeek(e,r.weekdays,a.today)}function D(e){return getStartOfMonth(e)}function _(e){return getEndOfMonth(e)}function M(e){const t=getDayIdentifier(e);return t<getDayIdentifier(o.value)||t>getDayIdentifier(d.value)}return watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:u,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:h,parsedMonthLabelSize:f,days:m,todayWeek:y,isMiniMode:k,monthFormatter:p,isOutside:M}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),i(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,times:d,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:u,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:i,emittedValue:s,weekdaySkips:u,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:M();break;case 36:_();break;case 37:k();break;case 38:f();break;case 39:w();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===u.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===u.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function M(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarMonth=defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(m,{slots:y,emit:c,expose:e}){const t=ref(null),a=ref(null),n=ref(null),p=ref(null),r=ref(null),v=ref({}),d=ref([]),i=ref([]),o=ref("next"),s=ref(m.modelValue||today()),u=ref("0000-00-00"),l=ref(0),f=ref(m.modelValue),g=reactive({width:0,height:0}),k=ref(!1),w=ref(!1),b=ref(null),D=ref(null),_=computed(()=>{return"month"}),M=getCurrentInstance();if(null===M)throw new Error("current instance is null");const{emitListeners:T}=useEmitListeners(M),{isSticky:N}=useCellWidth(m);watch(N,e=>{});const{times:E,setCurrent:I,updateCurrent:S}=useTimes(m);S(),I();const{weekdaySkips:O,parsedStart:C,parsedEnd:F,dayFormatter:A,weekdayFormatter:W,ariaDateFormatter:x,dayStyleDefault:q,getRelativeClasses:H}=useCommon(m,{startDate:s,endDate:u,times:E}),R=computed(()=>{return parseTimestamp(m.modelValue,E.now)||C.value||E.today});r.value=R.value,p.value=R.value.date;const L=computed(()=>{const e={};void 0!==m.dayPadding&&(e.padding=m.dayPadding);e.minWidth=re.value;e.maxWidth=re.value;e.width=re.value;return e}),{renderValues:z}=useRenderValues(m,{parsedView:_,times:E,parsedValue:R}),{rootRef:B,__initCalendar:Y,__renderCalendar:P}=useCalendar(m,Oe,{scrollArea:t,pane:a}),{days:j,todayWeek:U,isMiniMode:V,parsedCellWidth:$,parsedMonthLabelSize:K,isOutside:X,monthFormatter:Z}=useMonth(m,c,{weekdaySkips:O,times:E,parsedStart:C,parsedEnd:F,size:g,headerColumnRef:n}),{move:Q}=useMove(m,{parsedView:_,parsedValue:R,weekdaySkips:O,direction:o,maxDays:l,times:E,emittedValue:f,emit:c}),{getDefaultMouseEventHandlers:G}=useMouse(c,T),{checkChange:J}=useCheckChange(c,{days:j,lastStart:b,lastEnd:D}),{isKeyCode:ee}=useEvents(),{tryFocus:te}=useKeyboard(m,{rootRef:B,focusRef:p,focusValue:r,datesRef:v,days:j,parsedView:_,parsedValue:R,emittedValue:f,weekdaySkips:O,direction:o,times:E}),ae=computed(()=>{if(B.value)return!0===m.showWorkWeeks?parseInt(getComputedStyle(B.value).getPropertyValue(!0===V.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),ne=computed(()=>{return m.weekdays.length}),re=computed(()=>{if(B.value){const e=g.width||B.value.getBoundingClientRect().width;if(e&&ne.value)return(e-ae.value)/ne.value+"px"}return 100/ne.value+"%"}),oe=computed(()=>{return!0===m.focusable&&m.focusType.includes("day")&&!0!==V.value}),de=computed(()=>{return!0===m.focusable&&m.focusType.includes("date")&&!0!==oe.value});function ie(){f.value=today()}function se(e=1){Q(e)}function ue(e=1){Q(-e)}function le({width:e,height:t}){g.width=e,g.height=t}function ce(e){return e.date===f.value}function ve(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function me(){if(!0!==V.value&&0===m.dayHeight){const e=y.week;if(void 0!==e&&window)for(const t in d.value){const a=d.value[t];if(void 0!==a){const n=i.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ye(){return h("div",{class:"q-calendar-month__body"},[...De()])}function pe(){return h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===m.showWorkWeeks&&fe(),h("div",{class:"q-calendar-month__head--wrapper"},[he()])])}function he(){return h("div",{ref:n,class:{"q-calendar-month__head--weekdays":!0}},[...ge()])}function fe(){const e=y["head-workweek"],t={start:C.value,end:F.value,miniMode:V.value};return h("div",{class:"q-calendar-month__head--workweek",...G("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function ge(){return U.value.map((e,t)=>ke(e,t))}function ke(t,e){const a=y["head-day"],n=j.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o={weekday:r,timestamp:t,days:n,index:e,miniMode:V.value};o.droppable=k.value===t.weekday;const d=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),i="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},s=!0===m.focusable&&m.focusType.includes("weekday"),u=re.value,l=m.weekdayStyle||q,c={width:u,maxWidth:u,minWidth:u,...l({scope:o})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===s?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onFocus:e=>{!0===s&&(p.value=t.date)},...G("-head-day",e=>{return{scope:o,event:e}})};return!0!==m.noAria&&(v.ariaLabel=W.value(t,!1)),h("div",v,[void 0===a&&be(t,m.shortWeekdayLabel||V.value),void 0!==a&&a({scope:o}),we(t,e),!0===s&&useFocusHelper()])}function we(t,e){const a=y["head-day-event"],n=!0!==m.noActiveDate&&ce(t),r=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),o=j.value.filter(e=>e.weekday===t.weekday),d=o[0].weekday,i={weekday:d,timestamp:t,days:o,index:e,miniMode:V.value,activeDate:n,disabled:r},s=re.value,u=m.weekdayStyle||q,l={width:s,maxWidth:s,minWidth:s,...u({scope:i})};return h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:l},[void 0!==a&&a({scope:i})])}function be(e,t){const a=W.value(e,t||m.weekdayBreakpoints[0]>0&&$.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},!0===V.value&&!0===m.shortWeekdayLabel||m.weekdayBreakpoints[1]>0&&$.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function De(){const t=m.weekdays.length,a=[];for(let e=0;e<j.value.length;e+=t)a.push(_e(j.value.slice(e,e+t),e/t));return a}function _e(e,t){const a=y.week,n=m.weekdays,r={week:e,weekdays:n,miniMode:V.value},o={};return o.height=m.dayHeight>0&&!0!==V.value?convertToUnit(parseInt(m.dayHeight,10)):"auto",m.dayMinHeight>0&&!0!==V.value&&(o.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),h("div",{key:e[0].date,ref:e=>{i.value[t]=e},class:"q-calendar-month__week--wrapper",style:o},[!0===m.showWorkWeeks?Me(e):void 0,h("div",{class:"q-calendar-month__week"},[h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>Te(e))),!0!==V.value&&void 0!==a?h("div",{ref:e=>{d.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function Me(e){const t=y.workweek,a=e.length>2?e[2]:e[0],{timestamp:n}=ve(e),r=Number(a.workweek).toLocaleString(m.locale),o={workweekLabel:r,week:e,miniMode:V.value};return h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...H(!1!==n?n:a,!1)},...G("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=y.day,a=m.dayStyle||q,n=X(t),r=!0!==m.noActiveDate&&R.value.date===t.date,o=!1===n&&!0===m.showMonthLabel&&j.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:V.value,activeDate:r,hasMonth:o,droppable:w.value===t.date},i=Object.assign({...L.value},a({scope:d})),s="function"===typeof m.dayClass?m.dayClass({scope:d}):{},u={key:t.date,ref:e=>{!0===oe.value&&(v.value[t.date]=e)},tabindex:!0===oe.value?0:-1,class:{"q-calendar-month__day":!0,...s,...H(t,n,m.selectedDates,m.selectedStartEndDates,m.hover),"q-active-date":!0===r,disabled:!0!==m.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===oe.value},style:i,onFocus:e=>{!0===oe.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==T.value.onClickDay&&!0!==V.value&&c("click-day",{scope:d,event:e}))},...G("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"day",d)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"day",d)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"day",d)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"day",d)?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(u,l),!0!==m.noAria&&(u.ariaLabel=x.value(t)),h("div",u,[Ne(t,n,o),h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===oe.value&&useFocusHelper()])}function Ne(e,t,a){let n,r;const o=[Ee(e,t)];!0!==V.value&&!0===a&&g.width>340&&(r=Se(e,t)),!0!==V.value&&!0===m.showDayOfYearLabel&&void 0===r&&g.width>300&&(n=Ie(e,t)),"left"===m.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===m.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0);const d={class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+m.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}};return h("div",d,o)}function Ee(a,t){if(!0!==t||!0!==m.noOutsideDays){const e=A.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=m.selectedDates&&m.selectedDates.length>0&&m.selectedDates.includes(a.date),d=!0!==m.noActiveDate&&ce(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:V.value},s={key:a.date,ref:e=>{!0===de.value&&(v.value[a.date]=e)},tabindex:!0===de.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===de.value},disabled:!0===a.disabled||!0!==m.enableOutsideDays&&!0===t,onFocus:e=>{!0===de.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===de.value&&!0!==t&&!0!==a.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),f.value=a.date,void 0!==T.value.onClickDate&&c("click-date",{scope:i,event:e}))},...G("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date);return{scope:i,event:e}})};return!0!==m.noAria&&(s.ariaLabel=x.value(a)),[r?r({scope:i}):useButton(m,s,n?n({scope:i}):e),!0===de.value&&useFocusHelper()]}}function Ie(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Se(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["month-label"],n=Z.value(e,m.shortMonthLabel||g.width<500),r={monthLabel:n,timestamp:e,miniMode:V.value},o={};return!0!==V.value&&void 0!==K.value&&(o.fontSize=K.value),h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==V.value?n:void 0])}}function Oe(){const{start:e,end:t}=z.value;s.value=e.date,u.value=t.date;const a=g.width>0,n=withDirectives(h("div",{class:{"q-calendar-mini":!0===V.value,"q-calendar-month":!0},key:s.value},[!0===a&&!0!==m.noHeader&&pe(),!0===a&&ye()]),[[ResizeObserver$1,le]]);if(!0!==m.animated)return n;{const r="q-calendar--"+("prev"===o.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([j],J,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(f.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}f.value=e}p.value=e}),watch(f,(e,t)=>{if(f.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(p,e=>{e&&(r.value=parseTimestamp(e),f.value!==e&&(f.value=e))}),watch(r,e=>{v.value[p.value]?v.value[p.value].focus():te()}),onBeforeUpdate(()=>{v.value={};d.value=[];i.value=[];nextTick(()=>{me()})}),onMounted(()=>{Y();me()}),e({prev:ue,next:se,move:Q,moveToToday:ie,updateCurrent:S}),()=>P()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarMonth:QCalendarMonth,install(e){e.component(QCalendarMonth.name,QCalendarMonth)}};export default Plugin;export{QCalendarMonth,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,nextTick,onMounted,Transition}from"vue";const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],i=[],s=42,u=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,y=m===l;if(l<getDayIdentifier(e))return c;while((!y||c.length<u)&&c.length<s){if(m=getDayIdentifier(v),y=y||m>l&&c.length>=u,y)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,i),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(i):t[d]=[t[d],i]:t[d]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:u}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{if("0000-00-00"===t.value)return y(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),u=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===d||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function y(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:y,dayStyleDefault:p}}const useMonthProps={dayHeight:{type:[Number,String],default:0,validator:validateNumber},dayMinHeight:{type:[Number,String],default:0,validator:validateNumber},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{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,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||validateNumber(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function useMonth(r,t,{weekdaySkips:n,times:a,parsedStart:o,parsedEnd:d,size:i,headerColumnRef:s}){const e=computed(()=>parseInt(r.minWeeks,10)),u=computed(()=>e.value*r.weekdays.length),l=computed(()=>w(D(o.value))),c=computed(()=>b(_(d.value))),v=computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/r.weekdays.length);return e}),m=computed(()=>{return createDayList(l.value,c.value,a.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,u.value)}),y=computed(()=>{const e=m.value[0];const t=w(e);const a=b(e);return createDayList(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),p=computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),h=computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),f=computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let g=!0;const k=computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&i.width<h.value;!0===g&&(g=!1,t("mini-mode",e));return e});function w(e){return getStartOfWeek(e,r.weekdays,a.today)}function b(e){return getEndOfWeek(e,r.weekdays,a.today)}function D(e){return getStartOfMonth(e)}function _(e){return getEndOfMonth(e)}function M(e){const t=getDayIdentifier(e);return t<getDayIdentifier(o.value)||t>getDayIdentifier(d.value)}return watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:u,parsedMonthStart:l,parsedMonthEnd:c,parsedBreakpoint:h,parsedMonthLabelSize:f,days:m,todayWeek:y,isMiniMode:k,monthFormatter:p,isOutside:M}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),i(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:i}}function useRenderValues(r,{parsedView:o,times:d,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:u,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:y,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),y.value=e.date,p("moved",e)}else y.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:i,emittedValue:s,weekdaySkips:u,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",p),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function y(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:M();break;case 36:_();break;case 37:k();break;case 38:f();break;case 39:w();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===u.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===u.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function M(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:y}}var QCalendarMonth=defineComponent({name:"QCalendarMonth",directives:[ResizeObserver$1],props:{...useCommonProps,...useMonthProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value",...useCheckChangeEmits,...useMoveEmits,"mini-mode",...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-workweek"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-workweek")],setup(m,{slots:y,emit:c,expose:e}){const t=ref(null),a=ref(null),n=ref(null),p=ref(null),r=ref(null),v=ref({}),d=ref([]),i=ref([]),o=ref("next"),s=ref(m.modelValue||today()),u=ref("0000-00-00"),l=ref(0),f=ref(m.modelValue),g=reactive({width:0,height:0}),k=ref(!1),w=ref(!1),b=ref(null),D=ref(null),_=computed(()=>{return"month"}),M=getCurrentInstance();if(null===M)throw new Error("current instance is null");const{emitListeners:T}=useEmitListeners(M),{isSticky:N}=useCellWidth(m);watch(N,e=>{});const{times:E,setCurrent:I,updateCurrent:S}=useTimes(m);S(),I();const{weekdaySkips:O,parsedStart:C,parsedEnd:F,dayFormatter:A,weekdayFormatter:W,ariaDateFormatter:x,dayStyleDefault:q,getRelativeClasses:H}=useCommon(m,{startDate:s,endDate:u,times:E}),R=computed(()=>{return parseTimestamp(m.modelValue,E.now)||C.value||E.today});r.value=R.value,p.value=R.value.date;const L=computed(()=>{const e={};void 0!==m.dayPadding&&(e.padding=m.dayPadding);e.minWidth=re.value;e.maxWidth=re.value;e.width=re.value;return e}),{renderValues:z}=useRenderValues(m,{parsedView:_,times:E,parsedValue:R}),{rootRef:B,__initCalendar:Y,__renderCalendar:P}=useCalendar(m,Oe,{scrollArea:t,pane:a}),{days:j,todayWeek:U,isMiniMode:V,parsedCellWidth:$,parsedMonthLabelSize:K,isOutside:X,monthFormatter:Z}=useMonth(m,c,{weekdaySkips:O,times:E,parsedStart:C,parsedEnd:F,size:g,headerColumnRef:n}),{move:Q}=useMove(m,{parsedView:_,parsedValue:R,weekdaySkips:O,direction:o,maxDays:l,times:E,emittedValue:f,emit:c}),{getDefaultMouseEventHandlers:G}=useMouse(c,T),{checkChange:J}=useCheckChange(c,{days:j,lastStart:b,lastEnd:D}),{isKeyCode:ee}=useEvents(),{tryFocus:te}=useKeyboard(m,{rootRef:B,focusRef:p,focusValue:r,datesRef:v,days:j,parsedView:_,parsedValue:R,emittedValue:f,weekdaySkips:O,direction:o,times:E}),ae=computed(()=>{if(B.value)return!0===m.showWorkWeeks?parseInt(getComputedStyle(B.value).getPropertyValue(!0===V.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),ne=computed(()=>{return m.weekdays.length}),re=computed(()=>{if(B.value){const e=g.width||B.value.getBoundingClientRect().width;if(e&&ne.value)return(e-ae.value)/ne.value+"px"}return 100/ne.value+"%"}),oe=computed(()=>{return!0===m.focusable&&m.focusType.includes("day")&&!0!==V.value}),de=computed(()=>{return!0===m.focusable&&m.focusType.includes("date")&&!0!==oe.value});function ie(){f.value=today()}function se(e=1){Q(e)}function ue(e=1){Q(-e)}function le({width:e,height:t}){g.width=e,g.height=t}function ce(e){return e.date===f.value}function ve(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function me(){if(!0!==V.value&&0===m.dayHeight){const e=y.week;if(void 0!==e&&window)for(const t in d.value){const a=d.value[t];if(void 0!==a){const n=i.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ye(){return h("div",{class:"q-calendar-month__body"},[...De()])}function pe(){return h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===m.showWorkWeeks&&fe(),h("div",{class:"q-calendar-month__head--wrapper"},[he()])])}function he(){return h("div",{ref:n,class:{"q-calendar-month__head--weekdays":!0}},[...ge()])}function fe(){const e=y["head-workweek"],t={start:C.value,end:F.value,miniMode:V.value};return h("div",{class:"q-calendar-month__head--workweek",...G("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function ge(){return U.value.map((e,t)=>ke(e,t))}function ke(t,e){const a=y["head-day"],n=j.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o={weekday:r,timestamp:t,days:n,index:e,miniMode:V.value};o.droppable=k.value===t.weekday;const d=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),i="function"===typeof m.weekdayClass?m.weekdayClass({scope:o}):{},s=!0===m.focusable&&m.focusType.includes("weekday"),u=re.value,l=m.weekdayStyle||q,c={width:u,maxWidth:u,minWidth:u,...l({scope:o})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===s?0:-1,class:{"q-calendar-month__head--weekday":!0,...i,"q-disabled-day disabled":!0===d,["q-calendar__"+m.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"head-day",o)?k.value=t.weekday:k.value="")},onFocus:e=>{!0===s&&(p.value=t.date)},...G("-head-day",e=>{return{scope:o,event:e}})};return!0!==m.noAria&&(v.ariaLabel=W.value(t,!1)),h("div",v,[void 0===a&&be(t,m.shortWeekdayLabel||V.value),void 0!==a&&a({scope:o}),we(t,e),!0===s&&useFocusHelper()])}function we(t,e){const a=y["head-day-event"],n=!0!==m.noActiveDate&&ce(t),r=!!m.disabledWeekdays&&m.disabledWeekdays.includes(t.weekday),o=j.value.filter(e=>e.weekday===t.weekday),d=o[0].weekday,i={weekday:d,timestamp:t,days:o,index:e,miniMode:V.value,activeDate:n,disabled:r},s=re.value,u=m.weekdayStyle||q,l={width:s,maxWidth:s,minWidth:s,...u({scope:i})};return h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:l},[void 0!==a&&a({scope:i})])}function be(e,t){const a=W.value(e,t||m.weekdayBreakpoints[0]>0&&$.value<=m.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},!0===V.value&&!0===m.shortWeekdayLabel||m.weekdayBreakpoints[1]>0&&$.value<=m.weekdayBreakpoints[1]?minCharWidth(a,m.minWeekdayLabel):a)}function De(){const t=m.weekdays.length,a=[];for(let e=0;e<j.value.length;e+=t)a.push(_e(j.value.slice(e,e+t),e/t));return a}function _e(e,t){const a=y.week,n=m.weekdays,r={week:e,weekdays:n,miniMode:V.value},o={};return o.height=m.dayHeight>0&&!0!==V.value?convertToUnit(parseInt(m.dayHeight,10)):"auto",m.dayMinHeight>0&&!0!==V.value&&(o.minHeight=convertToUnit(parseInt(m.dayMinHeight,10))),h("div",{key:e[0].date,ref:e=>{i.value[t]=e},class:"q-calendar-month__week--wrapper",style:o},[!0===m.showWorkWeeks?Me(e):void 0,h("div",{class:"q-calendar-month__week"},[h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>Te(e))),!0!==V.value&&void 0!==a?h("div",{ref:e=>{d.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function Me(e){const t=y.workweek,a=e.length>2?e[2]:e[0],{timestamp:n}=ve(e),r=Number(a.workweek).toLocaleString(m.locale),o={workweekLabel:r,week:e,miniMode:V.value};return h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...H(!1!==n?n:a,!1)},...G("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function Te(t){const e=y.day,a=m.dayStyle||q,n=X(t),r=!0!==m.noActiveDate&&R.value.date===t.date,o=!1===n&&!0===m.showMonthLabel&&j.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:V.value,activeDate:r,hasMonth:o,droppable:w.value===t.date},i=Object.assign({...L.value},a({scope:d})),s="function"===typeof m.dayClass?m.dayClass({scope:d}):{},u={key:t.date,ref:e=>{!0===oe.value&&(v.value[t.date]=e)},tabindex:!0===oe.value?0:-1,class:{"q-calendar-month__day":!0,...s,...H(t,n,m.selectedDates,m.selectedStartEndDates,m.hover),"q-active-date":!0===r,disabled:!0!==m.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===oe.value},style:i,onFocus:e=>{!0===oe.value&&(p.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==T.value.onClickDay&&!0!==V.value&&c("click-day",{scope:d,event:e}))},...G("-day",e=>{return{scope:d,event:e}})},l={onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"day",d)?w.value=t.date:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"day",d)?w.value=t.date:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"day",d)?w.value=t.date:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"day",d)?w.value=t.date:w.value="")}};return!0!==n&&Object.assign(u,l),!0!==m.noAria&&(u.ariaLabel=x.value(t)),h("div",u,[Ne(t,n,o),h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===oe.value&&useFocusHelper()])}function Ne(e,t,a){let n,r;const o=[Ee(e,t)];!0!==V.value&&!0===a&&g.width>340&&(r=Se(e,t)),!0!==V.value&&!0===m.showDayOfYearLabel&&void 0===r&&g.width>300&&(n=Ie(e,t)),"left"===m.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===m.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0);const d={class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+m.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}};return h("div",d,o)}function Ee(a,t){if(!0!==t||!0!==m.noOutsideDays){const e=A.value(a,!1),n=y["head-day-label"],r=y["head-day-button"],o=m.selectedDates&&m.selectedDates.length>0&&m.selectedDates.includes(a.date),d=!0!==m.noActiveDate&&ce(a),i={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:V.value},s={key:a.date,ref:e=>{!0===de.value&&(v.value[a.date]=e)},tabindex:!0===de.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===m.dateType,"q-calendar__button--rounded":"rounded"===m.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===de.value},disabled:!0===a.disabled||!0!==m.enableOutsideDays&&!0===t,onFocus:e=>{!0===de.value&&(p.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===de.value&&!0!==t&&!0!==a.disabled&&ee(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),f.value=a.date,void 0!==T.value.onClickDate&&c("click-date",{scope:i,event:e}))},...G("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(f.value=a.date);return{scope:i,event:e}})};return!0!==m.noAria&&(s.ariaLabel=x.value(a)),[r?r({scope:i}):useButton(m,s,n?n({scope:i}):e),!0===de.value&&useFocusHelper()]}}function Ie(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["day-of-year"],n={timestamp:e};return h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Se(e,t){if(!0!==t||!0!==m.noOutsideDays){const a=y["month-label"],n=Z.value(e,m.shortMonthLabel||g.width<500),r={monthLabel:n,timestamp:e,miniMode:V.value},o={};return!0!==V.value&&void 0!==K.value&&(o.fontSize=K.value),h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==V.value?n:void 0])}}function Oe(){const{start:e,end:t}=z.value;s.value=e.date,u.value=t.date;const a=g.width>0,n=withDirectives(h("div",{class:{"q-calendar-mini":!0===V.value,"q-calendar-month":!0},key:s.value},[!0===a&&!0!==m.noHeader&&pe(),!0===a&&ye()]),[[ResizeObserver$1,le]]);if(!0!==m.animated)return n;{const r="q-calendar--"+("prev"===o.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([j],J,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(f.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}f.value=e}p.value=e}),watch(f,(e,t)=>{if(f.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),watch(p,e=>{e&&(r.value=parseTimestamp(e),f.value!==e&&(f.value=e))}),watch(r,e=>{v.value[p.value]?v.value[p.value].focus():te()}),onBeforeUpdate(()=>{v.value={};d.value=[];i.value=[];nextTick(()=>{me()})}),onMounted(()=>{Y();me()}),e({prev:ue,next:se,move:Q,moveToToday:ie,updateCurrent:S}),()=>P()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarMonth:QCalendarMonth,install(e){e.component(QCalendarMonth.name,QCalendarMonth)}};export default Plugin;export{QCalendarMonth,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarMonth={},e.Vue))})(this,function(e,Te){"use strict";const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],r=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,m=31,u=12,o=1,p=1,d=7,l=60,i=24,s=6048e5;function We(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,W(t,2),W(a,2)].join("-")}function x(e,t,a){let n=T(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=L(n);return n=V(n,t[0],O),n=D(n),a&&(n=w(n,a,n.hasTime)),n}function F(e,t,a){let n=T(e);const r=M(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=O(n);return n=V(n,t[t.length-1],L),n=D(n),a&&(n=w(n,a,n.hasTime)),n}function S(e){const t=T(e);return t.day=p,D(t),t}function C(e){const t=T(e);return t.day=M(t.year,t.month),D(t),t}function c(e){return!!a.exec(e)}function Ae(e){const t=a.exec(e);return t?{date:e,time:W(parseInt(t[6],10)||0,2)+":"+W(parseInt(t[8],10)||0,2),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 Ee(e,t){let a=Ae(e);return null===a?null:(a=D(a),t&&w(a,t,a.hasTime),a)}function v(e){return D({date:W(e.getFullYear(),4)+"-"+W(e.getMonth()+1,2)+"-"+W(e.getDate(),2),time:W(e.getHours()||0,2)+":"+W(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Be(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function y(e){return 100*e.hour+e.minute}function w(e,t,a=!1){let n=Be(t),r=Be(e),o=n===r;return e.hasTime&&a&&o&&(n=y(t),r=y(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function k(e){return e.weekday=_(e),e}function g(e){return e.doy=h(e),e}function b(e,t,a,n,r){const o=Be(e);if(void 0!==t){const d=Be(Ae(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=Be(Ae(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=Ae(r[i][0]),c=Ae(r[i][1]);if($(e,s,c)){e.disabled=!0;break}}else{const v=Be(Ee(r[i]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function D(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=E(e),e.date=A(e),e.weekday=_(e),e.doy=h(e),e.workweek=f(e),e}function h(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 f(e){let t;if(t=0===e.year?Date.UTC(new Date):R(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/s;return 1+Math.floor(o)}function _(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%u+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}function q(e){return 1===(e%4===0^e%100===0^e%400===0)}function M(e,t){return(q(e)?r:n)[t]}function T(e){return{...e}}function W(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function A(e){let t=`${W(e.year,4)}-${W(e.month,2)}`;return e.hasDay&&(t+=`-${W(e.day,2)}`),t}function E(e){return e.hasTime?`${W(e.hour,2)}:${W(e.minute,2)}`:""}function B(e){return A(e)+" "+(e.hasTime?E(e):"00:00")}function L(e){return++e.day,e.weekday=(e.weekday+1)%d,e.day>t&&e.day>M(e.year,e.month)&&(e.day=p,++e.month,e.month>u&&(e.month=o,++e.year)),e}function O(e){return e.day--,e.weekday=(e.weekday+6)%d,e.day<p&&(e.month--,e.month<o&&(e.year--,e.month=u),e.day=M(e.year,e.month)),e}function j(e,t=L,a=1,n=[0,1,2,3,4,5,6]){return I(e,t,a,n)}function I(e,t=L,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==L||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function V(e,t,a=L,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function H(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<d;++a){let t=1;for(let e=1;e<d;++e){const r=(a+e)%d;if(n[r])break;++t}e[a]=n[a]*t}return e}function z(e,t,a,n,r,o,d=[],u=[],l=42,i=0){const s=Be(t),c=[];let v=T(e),y=0,h=y===s;if(s<Be(e))return c;while((!h||c.length<i)&&c.length<l){if(y=Be(v),h=h||y>s&&c.length>=i,h)break;if(0!==n[v.weekday]){const f=T(v);D(f),w(f,a),b(f,r,o,d,u),c.push(f),v=I(v,L)}else v=I(v,L)}return c}function N(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(P(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${B(t)}`),""}}}function R(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function P(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function U(e){return isFinite(parseInt(e,10))}function $(e,t,a,n){const r=Be(e)+(!0===n?y(e):0),o=Be(t)+(!0===n?y(t):0),d=Be(a)+(!0===n?y(a):0);return r>=o&&r<=d}function K(e,t){const n=T(e);let r;return Z(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=Y.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&ee(n,Y[r]),D(n),n}const Y=["minute","hour","day","month"];function Z(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function Q(e){if(e.minute>=l||e.minute<0){const t=Math.floor(e.minute/l);e.minute-=t*l,e.hour+=t,G(e)}return e}function G(e){if(e.hour>=i||e.hour<0){const t=Math.floor(e.hour/i);e.hour-=t*i,e.day+=t,J(e)}return e}function J(t){X(t);let a=M(t.year,t.month);if(t.day>a){++t.month,t.month>u&&X(t);let e=t.day-a;a=M(t.year,t.month);do{e>a&&(++t.month,t.month>u&&X(t),e-=a,a=M(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&X(t),a=M(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&X(t),a=M(t.year,t.month))}while(e>a);t.day=a-e}return t}function X(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<o&&(e.month+=u,--e.year);return e}function ee(e,t){switch(t){case"minute":return Q(e);case"hour":return G(e);case"day":return J(e);case"month":return X(e)}}function Le(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function Oe(e,t){return 0===t?e:e.slice(0,t)}const te=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let ae,ne;function re(e,a){const t={};for(const n in e){const r=e[n],o=te("on-"+n);if(void 0===ae)return void console.warn("$listeners has not been set up");if(void 0!==ae.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ne(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function oe(e,t){return re(de(e),t)}function de(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function ue(e){return Object.keys(de(e))}function je(e,t){return ne=e,ae=t,{getMouseEventHandlers:re,getDefaultMouseEventHandlers:oe,getMouseEventName:de,getRawMouseEvents:ue}}var Ie={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ve(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Te.reactive({width:0,height:0}),o=Te.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Te.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Te.withDirectives(Te.h("div",e,[a()]),[[Ie,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:l,__renderCalendar:i}}const le={modelValue:{type:String,default:We(),validator:e=>""===e||c(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function He(r,{startDate:e,endDate:t,times:a}){const n=Te.computed(()=>H(r.weekdays)),o=Te.computed(()=>Ee(e.value)),d=Te.computed(()=>{if("0000-00-00"===t.value)return h(o.value);return Ee(t.value)}),u=Te.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return N(r.locale,(e,t)=>a)}),l=Te.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return N(r.locale,(e,t)=>t?n:a)}),i=Te.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return N(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Be(t),r=Be(Ae(e[0])),o=Be(Ae(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:l}=c(n,e);return{"q-past-day":!0!==d&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===l,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===l),"q-disabled-day disabled":!0===e.disabled}}function y(e){return x(e,r.weekdays,a.today)}function h(e){return F(e,r.weekdays,a.today)}function f(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:l,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:h,dayStyleDefault:f}}const ie={dayHeight:{type:[Number,String],default:0,validator:U},dayMinHeight:{type:[Number,String],default:0,validator:U},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:U,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||U(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function ze(r,t,{weekdaySkips:n,times:a,parsedStart:o,parsedEnd:d,size:u,headerColumnRef:l}){const e=Te.computed(()=>parseInt(r.minWeeks,10)),i=Te.computed(()=>e.value*r.weekdays.length),s=Te.computed(()=>g(D(o.value))),c=Te.computed(()=>b(_(d.value))),v=Te.computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:u.width>0&&l.value&&(e=l.value.offsetWidth/r.weekdays.length);return e}),y=Te.computed(()=>{return z(s.value,c.value,a.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,i.value)}),h=Te.computed(()=>{const e=y.value[0];const t=g(e);const a=b(e);return z(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),f=Te.computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return N(r.locale,(e,t)=>t?n:a)}),m=Te.computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),p=Te.computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let w=!0;const k=Te.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&u.width<m.value;!0===w&&(w=!1,t("mini-mode",e));return e});function g(e){return x(e,r.weekdays,a.today)}function b(e){return F(e,r.weekdays,a.today)}function D(e){return S(e)}function _(e){return C(e)}function q(e){const t=Be(e);return t<Be(o.value)||t>Be(d.value)}return Te.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:i,parsedMonthStart:s,parsedMonthEnd:c,parsedBreakpoint:m,parsedMonthLabelSize:p,days:y,todayWeek:h,isMiniMode:k,monthFormatter:f,isOutside:q}}const se={now:{type:String,validator:e=>""===e||c(e),default:""}};function Ne(e){const t=Te.reactive({now:Ee("0000-00-00 00:00"),today:Ee("0000-00-00")}),a=Te.computed(()=>e.now?Ee(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return v(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Te.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function Re(r,{parsedView:o,times:d,parsedValue:u}){const e=Te.computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=S(e),n=C(e),t=M(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=x(e,r.weekdays,d.today),n=F(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=j(T(n),L,t>1?t-1:t,r.weekdays),D(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=S(e),n=C(e),D(n),t=M(a.year,a.month);break;case"resource":t=1,n=j(T(n),L,t,r.weekdays),D(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const ce=["moved"];function Pe(u,{parsedView:l,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:h,emit:f}){function e(a=1){if(0!==a){let e=T(i.value);const n=a>0,r=n?L:O,o=n?m:p;let t=n?a:-a;c.value=n?"next":"prev";const d=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),k(e);while(0===s.value[e.weekday])e=K(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":I(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":I(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":I(e,r,v.value,u.weekdays);break}k(e),D(e),g(e),w(e,y.now),h.value=e.date,f("moved",e)}else h.value=We()}return{move:e}}const ve=/^on[A-Z]/;function Ue(e=Te.getCurrentInstance()){return{emitListeners:Te.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===ve.test(e)&&(t[e]=!0)});return t})}}function $e(){return[Te.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function Ke(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Te.h("button",t,[a,!0===n&&$e()])}const ye={cellWidth:[Number,String]};function Ye(e){const t=Te.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const he=["change"];function Ze(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function Qe(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:fe}=Qe(),me={useNavigation:Boolean};function Ge(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:l,weekdaySkips:i,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",m),document.addEventListener("keydown",f))}function v(){document&&(document.removeEventListener("keyup",m),document.removeEventListener("keydown",f),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function h(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function f(e){y(e)&&fe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function m(e){if(y(e)&&fe(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:q();break;case 36:_();break;case 37:k();break;case 38:p();break;case 39:g();break;case 40:w();break}}function p(e){let t=T(o.value);if("month"===u.value){if(t=K(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function w(e){let t=T(o.value);if("month"===u.value){if(t=K(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function k(e){let t=T(o.value);s.value="prev";do{t=K(t,{day:-1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function g(e){let t=T(o.value);s.value="next";do{t=K(t,{day:1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function b(e){let t=T(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:-1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:-1}):"week"===u.value&&(t=K(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=T(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:1}):"week"===u.value&&(t=K(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=T(o.value);"month"===u.value||"month-interval"===u.value?t=S(t):"week"===u.value&&(t=x(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=K(t,{day:-1});r.value=t.date}function q(e){let t=T(o.value);"month"===u.value||"month-interval"===u.value?t=C(t):"week"===u.value&&(t=F(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=K(t,{day:-1});r.value=t.date}return Te.onBeforeUnmount(()=>{v()}),Te.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:h}}var pe=Te.defineComponent({name:"QCalendarMonth",directives:[Ie],props:{...le,...ie,...se,...ye,...me},emits:["update:model-value",...he,...ce,"mini-mode",...ue("-date"),...ue("-day"),...ue("-head-workweek"),...ue("-head-day"),...ue("-workweek")],setup(y,{slots:h,emit:c,expose:e}){const t=Te.ref(null),a=Te.ref(null),n=Te.ref(null),f=Te.ref(null),r=Te.ref(null),v=Te.ref({}),d=Te.ref([]),u=Te.ref([]),o=Te.ref("next"),l=Te.ref(y.modelValue||We()),i=Te.ref("0000-00-00"),s=Te.ref(0),m=Te.ref(y.modelValue),p=Te.reactive({width:0,height:0}),w=Te.ref(!1),k=Te.ref(!1),g=Te.ref(null),b=Te.ref(null),D=Te.computed(()=>{return"month"}),_=Te.getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:q}=Ue(_),{isSticky:x}=Ye(y);Te.watch(x,e=>{});const{times:F,setCurrent:S,updateCurrent:C}=Ne(y);C(),S();const{weekdaySkips:M,parsedStart:T,parsedEnd:W,dayFormatter:A,weekdayFormatter:E,ariaDateFormatter:B,dayStyleDefault:L,getRelativeClasses:O}=He(y,{startDate:l,endDate:i,times:F}),j=Te.computed(()=>{return Ee(y.modelValue,F.now)||T.value||F.today});r.value=j.value,f.value=j.value.date;const I=Te.computed(()=>{const e={};void 0!==y.dayPadding&&(e.padding=y.dayPadding);e.minWidth=ne.value;e.maxWidth=ne.value;e.width=ne.value;return e}),{renderValues:V}=Re(y,{parsedView:D,times:F,parsedValue:j}),{rootRef:H,__initCalendar:z,__renderCalendar:N}=Ve(y,Me,{scrollArea:t,pane:a}),{days:R,todayWeek:P,isMiniMode:U,parsedCellWidth:$,parsedMonthLabelSize:K,isOutside:Y,monthFormatter:Z}=ze(y,c,{weekdaySkips:M,times:F,parsedStart:T,parsedEnd:W,size:p,headerColumnRef:n}),{move:Q}=Pe(y,{parsedView:D,parsedValue:j,weekdaySkips:M,direction:o,maxDays:s,times:F,emittedValue:m,emit:c}),{getDefaultMouseEventHandlers:G}=je(c,q),{checkChange:J}=Ze(c,{days:R,lastStart:g,lastEnd:b}),{isKeyCode:X}=Qe(),{tryFocus:ee}=Ge(y,{rootRef:H,focusRef:f,focusValue:r,datesRef:v,days:R,parsedView:D,parsedValue:j,emittedValue:m,weekdaySkips:M,direction:o,times:F}),te=Te.computed(()=>{if(H.value)return!0===y.showWorkWeeks?parseInt(getComputedStyle(H.value).getPropertyValue(!0===U.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),ae=Te.computed(()=>{return y.weekdays.length}),ne=Te.computed(()=>{if(H.value){const e=p.width||H.value.getBoundingClientRect().width;if(e&&ae.value)return(e-te.value)/ae.value+"px"}return 100/ae.value+"%"}),re=Te.computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==U.value}),oe=Te.computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==re.value});function de(){m.value=We()}function ue(e=1){Q(e)}function le(e=1){Q(-e)}function ie({width:e,height:t}){p.width=e,p.height=t}function se(e){return e.date===m.value}function ce(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ve(){if(!0!==U.value&&0===y.dayHeight){const e=h.week;if(void 0!==e&&window)for(const t in d.value){const a=d.value[t];if(void 0!==a){const n=u.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ye(){return Te.h("div",{class:"q-calendar-month__body"},[...be()])}function he(){return Te.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&me(),Te.h("div",{class:"q-calendar-month__head--wrapper"},[fe()])])}function fe(){return Te.h("div",{ref:n,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function me(){const e=h["head-workweek"],t={start:T.value,end:W.value,miniMode:U.value};return Te.h("div",{class:"q-calendar-month__head--workweek",...G("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return P.value.map((e,t)=>we(e,t))}function we(t,e){const a=h["head-day"],n=R.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o={weekday:r,timestamp:t,days:n,index:e,miniMode:U.value};o.droppable=w.value===t.weekday;const d=!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday),u="function"===typeof y.weekdayClass?y.weekdayClass({scope:o}):{},l=!0===y.focusable&&y.focusType.includes("weekday"),i=ne.value,s=y.weekdayStyle||L,c={width:i,maxWidth:i,minWidth:i,...s({scope:o})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===l?0:-1,class:{"q-calendar-month__head--weekday":!0,...u,"q-disabled-day disabled":!0===d,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===l},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onFocus:e=>{!0===l&&(f.value=t.date)},...G("-head-day",e=>{return{scope:o,event:e}})};return!0!==y.noAria&&(v.ariaLabel=E.value(t,!1)),Te.h("div",v,[void 0===a&&ge(t,y.shortWeekdayLabel||U.value),void 0!==a&&a({scope:o}),ke(t,e),!0===l&&$e()])}function ke(t,e){const a=h["head-day-event"],n=!0!==y.noActiveDate&&se(t),r=!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday),o=R.value.filter(e=>e.weekday===t.weekday),d=o[0].weekday,u={weekday:d,timestamp:t,days:o,index:e,miniMode:U.value,activeDate:n,disabled:r},l=ne.value,i=y.weekdayStyle||L,s={width:l,maxWidth:l,minWidth:l,...i({scope:u})};return Te.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:u})])}function ge(e,t){const a=E.value(e,t||y.weekdayBreakpoints[0]>0&&$.value<=y.weekdayBreakpoints[0]);return Te.h("span",{class:"q-calendar__ellipsis"},!0===U.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&$.value<=y.weekdayBreakpoints[1]?Oe(a,y.minWeekdayLabel):a)}function be(){const t=y.weekdays.length,a=[];for(let e=0;e<R.value.length;e+=t)a.push(De(R.value.slice(e,e+t),e/t));return a}function De(e,t){const a=h.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:U.value},o={};return o.height=y.dayHeight>0&&!0!==U.value?Le(parseInt(y.dayHeight,10)):"auto",y.dayMinHeight>0&&!0!==U.value&&(o.minHeight=Le(parseInt(y.dayMinHeight,10))),Te.h("div",{key:e[0].date,ref:e=>{u.value[t]=e},class:"q-calendar-month__week--wrapper",style:o},[!0===y.showWorkWeeks?_e(e):void 0,Te.h("div",{class:"q-calendar-month__week"},[Te.h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>qe(e))),!0!==U.value&&void 0!==a?Te.h("div",{ref:e=>{d.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function _e(e){const t=h.workweek,a=e.length>2?e[2]:e[0],{timestamp:n}=ce(e),r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:U.value};return Te.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...O(!1!==n?n:a,!1)},...G("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function qe(t){const e=h.day,a=y.dayStyle||L,n=Y(t),r=!0!==y.noActiveDate&&j.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&R.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:U.value,activeDate:r,hasMonth:o,droppable:k.value===t.date},u=Object.assign({...I.value},a({scope:d})),l="function"===typeof y.dayClass?y.dayClass({scope:d}):{},i={key:t.date,ref:e=>{!0===re.value&&(v.value[t.date]=e)},tabindex:!0===re.value?0:-1,class:{"q-calendar-month__day":!0,...l,...O(t,n,y.selectedDates,y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===re.value},style:u,onFocus:e=>{!0===re.value&&(f.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==q.value.onClickDay&&!0!==U.value&&c("click-day",{scope:d,event:e}))},...G("-day",e=>{return{scope:d,event:e}})},s={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",d)?k.value=t.date:k.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",d)?k.value=t.date:k.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",d)?k.value=t.date:k.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",d)?k.value=t.date:k.value="")}};return!0!==n&&Object.assign(i,s),!0!==y.noAria&&(i.ariaLabel=B.value(t)),Te.h("div",i,[xe(t,n,o),Te.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===re.value&&$e()])}function xe(e,t,a){let n,r;const o=[Fe(e,t)];!0!==U.value&&!0===a&&p.width>340&&(r=Ce(e,t)),!0!==U.value&&!0===y.showDayOfYearLabel&&void 0===r&&p.width>300&&(n=Se(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0);const d={class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}};return Te.h("div",d,o)}function Fe(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=A.value(a,!1),n=h["head-day-label"],r=h["head-day-button"],o=y.selectedDates&&y.selectedDates.length>0&&y.selectedDates.includes(a.date),d=!0!==y.noActiveDate&&se(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:U.value},l={key:a.date,ref:e=>{!0===oe.value&&(v.value[a.date]=e)},tabindex:!0===oe.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===oe.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:e=>{!0===oe.value&&(f.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===oe.value&&!0!==t&&!0!==a.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),m.value=a.date,void 0!==q.value.onClickDate&&c("click-date",{scope:u,event:e}))},...G("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(m.value=a.date);return{scope:u,event:e}})};return!0!==y.noAria&&(l.ariaLabel=B.value(a)),[r?r({scope:u}):Ke(y,l,n?n({scope:u}):e),!0===oe.value&&$e()]}}function Se(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=h["day-of-year"],n={timestamp:e};return Te.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ce(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=h["month-label"],n=Z.value(e,y.shortMonthLabel||p.width<500),r={monthLabel:n,timestamp:e,miniMode:U.value},o={};return!0!==U.value&&void 0!==K.value&&(o.fontSize=K.value),Te.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==U.value?n:void 0])}}function Me(){const{start:e,end:t}=V.value;l.value=e.date,i.value=t.date;const a=p.width>0,n=Te.withDirectives(Te.h("div",{class:{"q-calendar-mini":!0===U.value,"q-calendar-month":!0},key:l.value},[!0===a&&!0!==y.noHeader&&he(),!0===a&&ye()]),[[Ie,ie]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return Te.h(Te.Transition,{name:r,appear:!0},()=>n)}}return Te.watch([R],J,{deep:!0,immediate:!0}),Te.watch(()=>y.modelValue,(e,t)=>{if(m.value!==e){if(!0===y.animated){const a=Be(Ae(e)),n=Be(Ae(t));o.value=a>=n?"next":"prev"}m.value=e}f.value=e}),Te.watch(m,(e,t)=>{if(m.value!==y.modelValue){if(!0===y.animated){const a=Be(Ae(e)),n=Be(Ae(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Te.watch(f,e=>{e&&(r.value=Ee(e),m.value!==e&&(m.value=e))}),Te.watch(r,e=>{v.value[f.value]?v.value[f.value].focus():ee()}),Te.onBeforeUpdate(()=>{v.value={};d.value=[];u.value=[];Te.nextTick(()=>{ve()})}),Te.onMounted(()=>{z();ve()}),e({prev:le,next:ue,move:Q,moveToToday:de,updateCurrent:C}),()=>N()}}),we="@quasar/quasar-ui-qcalendar",ke="4.0.0-beta.2",ge="Jeff Galbraith <jeff@quasar.dev>",be="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",De="MIT",_e="dist/index.esm.js",qe="dist/index.common.js",xe="dist/types/index.d.ts",Fe={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},Se={type:"github",url:"https://github.com/sponsors/hawkeye64"},Ce={access:"public"},Me={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},Je="https://github.com/quasarframework/quasar-ui-qcalendar/issues",Xe="https://github.com/quasarframework/quasar-ui-qcalendar",et=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],tt={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},at={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},nt=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],nt={name:we,version:ke,author:ge,description:be,license:De,module:_e,main:qe,typings:xe,scripts:Fe,funding:Se,publishConfig:Ce,repository:Me,bugs:Je,homepage:Xe,keywords:et,vetur:tt,devDependencies:at,browserslist:nt};const{version:rt}=nt;e.QCalendarMonth=pe,e.version=rt,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarMonth={},e.Vue))})(this,function(e,Te){"use strict";const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],r=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,m=31,u=12,o=1,p=1,d=7,i=60,l=24,s=6048e5;function We(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,W(t,2),W(a,2)].join("-")}function x(e,t,a){let n=T(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=L(n);return n=V(n,t[0],O),n=D(n),a&&(n=w(n,a,n.hasTime)),n}function F(e,t,a){let n=T(e);const r=M(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=O(n);return n=V(n,t[t.length-1],L),n=D(n),a&&(n=w(n,a,n.hasTime)),n}function S(e){const t=T(e);return t.day=p,D(t),t}function C(e){const t=T(e);return t.day=M(t.year,t.month),D(t),t}function c(e){return!!a.exec(e)}function Ae(e){const t=a.exec(e);return t?{date:e,time:W(parseInt(t[6],10)||0,2)+":"+W(parseInt(t[8],10)||0,2),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 Ee(e,t){let a=Ae(e);return null===a?null:(a=D(a),t&&w(a,t,a.hasTime),a)}function v(e){return D({date:W(e.getFullYear(),4)+"-"+W(e.getMonth()+1,2)+"-"+W(e.getDate(),2),time:W(e.getHours()||0,2)+":"+W(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Be(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function y(e){return 100*e.hour+e.minute}function w(e,t,a=!1){let n=Be(t),r=Be(e),o=n===r;return e.hasTime&&a&&o&&(n=y(t),r=y(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function k(e){return e.weekday=_(e),e}function g(e){return e.doy=h(e),e}function b(e,t,a,n,r){const o=Be(e);if(void 0!==t){const d=Be(Ae(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=Be(Ae(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const l in r)if(Array.isArray(r[l])&&2===r[l].length){const s=Ae(r[l][0]),c=Ae(r[l][1]);if($(e,s,c)){e.disabled=!0;break}}else{const v=Be(Ee(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function D(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=E(e),e.date=A(e),e.weekday=_(e),e.doy=h(e),e.workweek=f(e),e}function h(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 f(e){let t;if(t=0===e.year?Date.UTC(new Date):R(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/s;return 1+Math.floor(o)}function _(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%u+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}function q(e){return 1===(e%4===0^e%100===0^e%400===0)}function M(e,t){return(q(e)?r:n)[t]}function T(e){return{...e}}function W(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function A(e){let t=`${W(e.year,4)}-${W(e.month,2)}`;return e.hasDay&&(t+=`-${W(e.day,2)}`),t}function E(e){return e.hasTime?`${W(e.hour,2)}:${W(e.minute,2)}`:""}function B(e){return A(e)+" "+(e.hasTime?E(e):"00:00")}function L(e){return++e.day,e.weekday=(e.weekday+1)%d,e.day>t&&e.day>M(e.year,e.month)&&(e.day=p,++e.month,e.month>u&&(e.month=o,++e.year)),e}function O(e){return e.day--,e.weekday=(e.weekday+6)%d,e.day<p&&(e.month--,e.month<o&&(e.year--,e.month=u),e.day=M(e.year,e.month)),e}function j(e,t=L,a=1,n=[0,1,2,3,4,5,6]){return I(e,t,a,n)}function I(e,t=L,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==L||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function V(e,t,a=L,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function H(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<d;++a){let t=1;for(let e=1;e<d;++e){const r=(a+e)%d;if(n[r])break;++t}e[a]=n[a]*t}return e}function z(e,t,a,n,r,o,d=[],u=[],i=42,l=0){const s=Be(t),c=[];let v=T(e),y=0,h=y===s;if(s<Be(e))return c;while((!h||c.length<l)&&c.length<i){if(y=Be(v),h=h||y>s&&c.length>=l,h)break;if(0!==n[v.weekday]){const f=T(v);D(f),w(f,a),b(f,r,o,d,u),c.push(f),v=I(v,L)}else v=I(v,L)}return c}function N(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(P(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${B(t)}`),""}}}function R(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function P(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function U(e){return isFinite(parseInt(e,10))}function $(e,t,a,n){const r=Be(e)+(!0===n?y(e):0),o=Be(t)+(!0===n?y(t):0),d=Be(a)+(!0===n?y(a):0);return r>=o&&r<=d}function K(e,t){const n=T(e);let r;return Z(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=Y.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&ee(n,Y[r]),D(n),n}const Y=["minute","hour","day","month"];function Z(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function Q(e){if(e.minute>=i||e.minute<0){const t=Math.floor(e.minute/i);e.minute-=t*i,e.hour+=t,G(e)}return e}function G(e){if(e.hour>=l||e.hour<0){const t=Math.floor(e.hour/l);e.hour-=t*l,e.day+=t,J(e)}return e}function J(t){X(t);let a=M(t.year,t.month);if(t.day>a){++t.month,t.month>u&&X(t);let e=t.day-a;a=M(t.year,t.month);do{e>a&&(++t.month,t.month>u&&X(t),e-=a,a=M(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&X(t),a=M(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&X(t),a=M(t.year,t.month))}while(e>a);t.day=a-e}return t}function X(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<o&&(e.month+=u,--e.year);return e}function ee(e,t){switch(t){case"minute":return Q(e);case"hour":return G(e);case"day":return J(e);case"month":return X(e)}}function Le(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function Oe(e,t){return 0===t?e:e.slice(0,t)}const te=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let ae,ne;function re(e,a){const t={};for(const n in e){const r=e[n],o=te("on-"+n);if(void 0===ae)return void console.warn("$listeners has not been set up");if(void 0!==ae.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ne(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function oe(e,t){return re(de(e),t)}function de(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function ue(e){return Object.keys(de(e))}function je(e,t){return ne=e,ae=t,{getMouseEventHandlers:re,getDefaultMouseEventHandlers:oe,getMouseEventName:de,getRawMouseEvents:ue}}var Ie={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ve(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=Te.reactive({width:0,height:0}),o=Te.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=Te.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Te.withDirectives(Te.h("div",e,[a()]),[[Ie,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:i,__renderCalendar:l}}const ie={modelValue:{type:String,default:We(),validator:e=>""===e||c(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function He(r,{startDate:e,endDate:t,times:a}){const n=Te.computed(()=>H(r.weekdays)),o=Te.computed(()=>Ee(e.value)),d=Te.computed(()=>{if("0000-00-00"===t.value)return h(o.value);return Ee(t.value)}),u=Te.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return N(r.locale,(e,t)=>a)}),i=Te.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return N(r.locale,(e,t)=>t?n:a)}),l=Te.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return N(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Be(t),r=Be(Ae(e[0])),o=Be(Ae(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:i}=c(n,e);return{"q-past-day":!0!==d&&!0!==i&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==i&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===i,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===i),"q-disabled-day disabled":!0===e.disabled}}function y(e){return x(e,r.weekdays,a.today)}function h(e){return F(e,r.weekdays,a.today)}function f(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:i,ariaDateFormatter:l,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:h,dayStyleDefault:f}}const le={dayHeight:{type:[Number,String],default:0,validator:U},dayMinHeight:{type:[Number,String],default:0,validator:U},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayPadding:String,minWeeks:{type:[Number,String],validator:U,default:1},shortMonthLabel:Boolean,showWorkWeeks:Boolean,showMonthLabel:{type:Boolean,default:!0},showDayOfYearLabel:Boolean,enableOutsideDays:Boolean,noOutsideDays:Boolean,hover:Boolean,miniMode:{type:[Boolean,String],validator:e=>[!0,!1,"auto"].includes(e)},breakpoint:{type:[Number,String],default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)||U(e)},monthLabelSize:{type:String,default:"sm",validator:e=>["xxs","xs","sm","md","lg","xl","xxl"].includes(e)||!!e&&e.length>0}};function ze(r,t,{weekdaySkips:n,times:a,parsedStart:o,parsedEnd:d,size:u,headerColumnRef:i}){const e=Te.computed(()=>parseInt(r.minWeeks,10)),l=Te.computed(()=>e.value*r.weekdays.length),s=Te.computed(()=>g(D(o.value))),c=Te.computed(()=>b(_(d.value))),v=Te.computed(()=>{let e=0;r.cellWidth?e=r.cellWidth:u.width>0&&i.value&&(e=i.value.offsetWidth/r.weekdays.length);return e}),y=Te.computed(()=>{return z(s.value,c.value,a.today,n.value,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,Number.MAX_SAFE_INTEGER,l.value)}),h=Te.computed(()=>{const e=y.value[0];const t=g(e);const a=b(e);return z(t,a,e,n,r.disabledBefore,r.disabledAfter,r.disabledWeekdays,r.disabledDays,r.weekdays.length,r.weekdays.length)}),f=Te.computed(()=>{const a={timeZone:"UTC",month:"long"};const n={timeZone:"UTC",month:"short"};return N(r.locale,(e,t)=>t?n:a)}),m=Te.computed(()=>{switch(r.breakpoint){case"xs":return 300;case"sm":return 350;case"md":return 400;case"lg":return 450;case"xl":return 500;default:return parseInt(r.breakpoint,10)}}),p=Te.computed(()=>{switch(r.monthLabelSize){case"xxs":return".4em";case"xs":return".6em";case"sm":return".8em";case"md":return"1.0em";case"lg":return"1.2em";case"xl":return"1.4em";case"xxl":return"1.6em";default:return r.monthLabelSize}});let w=!0;const k=Te.computed(()=>{const e=!0===r.miniMode||"auto"===r.miniMode&&void 0!==r.breakpoint&&u.width<m.value;!0===w&&(w=!1,t("mini-mode",e));return e});function g(e){return x(e,r.weekdays,a.today)}function b(e){return F(e,r.weekdays,a.today)}function D(e){return S(e)}function _(e){return C(e)}function q(e){const t=Be(e);return t<Be(o.value)||t>Be(d.value)}return Te.watch(k,e=>{t("mini-mode",e)}),{parsedCellWidth:v,parsedMinWeeks:e,parsedMinDays:l,parsedMonthStart:s,parsedMonthEnd:c,parsedBreakpoint:m,parsedMonthLabelSize:p,days:y,todayWeek:h,isMiniMode:k,monthFormatter:f,isOutside:q}}const se={now:{type:String,validator:e=>""===e||c(e),default:""}};function Ne(e){const t=Te.reactive({now:Ee("0000-00-00 00:00"),today:Ee("0000-00-00")}),a=Te.computed(()=>e.now?Ee(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return v(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Te.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function Re(r,{parsedView:o,times:d,parsedValue:u}){const e=Te.computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=S(e),n=C(e),t=M(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=x(e,r.weekdays,d.today),n=F(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=j(T(n),L,t>1?t-1:t,r.weekdays),D(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=S(e),n=C(e),D(n),t=M(a.year,a.month);break;case"resource":t=1,n=j(T(n),L,t,r.weekdays),D(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const ce=["moved"];function Pe(u,{parsedView:i,parsedValue:l,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:h,emit:f}){function e(a=1){if(0!==a){let e=T(l.value);const n=a>0,r=n?L:O,o=n?m:p;let t=n?a:-a;c.value=n?"next":"prev";const d=s.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),k(e);while(0===s.value[e.weekday])e=K(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":I(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":I(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":I(e,r,v.value,u.weekdays);break}k(e),D(e),g(e),w(e,y.now),h.value=e.date,f("moved",e)}else h.value=We()}return{move:e}}const ve=/^on[A-Z]/;function Ue(e=Te.getCurrentInstance()){return{emitListeners:Te.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===ve.test(e)&&(t[e]=!0)});return t})}}function $e(){return[Te.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function Ke(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Te.h("button",t,[a,!0===n&&$e()])}const ye={cellWidth:[Number,String]};function Ye(e){const t=Te.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const he=["change"];function Ze(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function Qe(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:fe}=Qe(),me={useNavigation:Boolean};function Ge(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:i,weekdaySkips:l,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",m),document.addEventListener("keydown",f))}function v(){document&&(document.removeEventListener("keyup",m),document.removeEventListener("keydown",f),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function h(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function f(e){y(e)&&fe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function m(e){if(y(e)&&fe(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:D();break;case 35:q();break;case 36:_();break;case 37:k();break;case 38:p();break;case 39:g();break;case 40:w();break}}function p(e){let t=T(o.value);if("month"===u.value){if(t=K(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(i.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function w(e){let t=T(o.value);if("month"===u.value){if(t=K(t,{day:7}),o.value.month!==t.month)return s.value="next",void(i.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function k(e){let t=T(o.value);s.value="prev";do{t=K(t,{day:-1})}while(0===l.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===u.value)return void(i.value=t.date);r.value=t.date}function g(e){let t=T(o.value);s.value="next";do{t=K(t,{day:1})}while(0===l.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===u.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=T(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:-1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:-1}):"week"===u.value&&(t=K(t,{day:-7}));s.value="prev",r.value=t.date}function D(e){let t=T(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:1}):"week"===u.value&&(t=K(t,{day:7}));s.value="next",r.value=t.date}function _(e){let t=T(o.value);"month"===u.value||"month-interval"===u.value?t=S(t):"week"===u.value&&(t=x(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=K(t,{day:-1});r.value=t.date}function q(e){let t=T(o.value);"month"===u.value||"month-interval"===u.value?t=C(t):"week"===u.value&&(t=F(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=K(t,{day:-1});r.value=t.date}return Te.onBeforeUnmount(()=>{v()}),Te.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:h}}var pe=Te.defineComponent({name:"QCalendarMonth",directives:[Ie],props:{...ie,...le,...se,...ye,...me},emits:["update:model-value",...he,...ce,"mini-mode",...ue("-date"),...ue("-day"),...ue("-head-workweek"),...ue("-head-day"),...ue("-workweek")],setup(y,{slots:h,emit:c,expose:e}){const t=Te.ref(null),a=Te.ref(null),n=Te.ref(null),f=Te.ref(null),r=Te.ref(null),v=Te.ref({}),d=Te.ref([]),u=Te.ref([]),o=Te.ref("next"),i=Te.ref(y.modelValue||We()),l=Te.ref("0000-00-00"),s=Te.ref(0),m=Te.ref(y.modelValue),p=Te.reactive({width:0,height:0}),w=Te.ref(!1),k=Te.ref(!1),g=Te.ref(null),b=Te.ref(null),D=Te.computed(()=>{return"month"}),_=Te.getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:q}=Ue(_),{isSticky:x}=Ye(y);Te.watch(x,e=>{});const{times:F,setCurrent:S,updateCurrent:C}=Ne(y);C(),S();const{weekdaySkips:M,parsedStart:T,parsedEnd:W,dayFormatter:A,weekdayFormatter:E,ariaDateFormatter:B,dayStyleDefault:L,getRelativeClasses:O}=He(y,{startDate:i,endDate:l,times:F}),j=Te.computed(()=>{return Ee(y.modelValue,F.now)||T.value||F.today});r.value=j.value,f.value=j.value.date;const I=Te.computed(()=>{const e={};void 0!==y.dayPadding&&(e.padding=y.dayPadding);e.minWidth=ne.value;e.maxWidth=ne.value;e.width=ne.value;return e}),{renderValues:V}=Re(y,{parsedView:D,times:F,parsedValue:j}),{rootRef:H,__initCalendar:z,__renderCalendar:N}=Ve(y,Me,{scrollArea:t,pane:a}),{days:R,todayWeek:P,isMiniMode:U,parsedCellWidth:$,parsedMonthLabelSize:K,isOutside:Y,monthFormatter:Z}=ze(y,c,{weekdaySkips:M,times:F,parsedStart:T,parsedEnd:W,size:p,headerColumnRef:n}),{move:Q}=Pe(y,{parsedView:D,parsedValue:j,weekdaySkips:M,direction:o,maxDays:s,times:F,emittedValue:m,emit:c}),{getDefaultMouseEventHandlers:G}=je(c,q),{checkChange:J}=Ze(c,{days:R,lastStart:g,lastEnd:b}),{isKeyCode:X}=Qe(),{tryFocus:ee}=Ge(y,{rootRef:H,focusRef:f,focusValue:r,datesRef:v,days:R,parsedView:D,parsedValue:j,emittedValue:m,weekdaySkips:M,direction:o,times:F}),te=Te.computed(()=>{if(H.value)return!0===y.showWorkWeeks?parseInt(getComputedStyle(H.value).getPropertyValue(!0===U.value?"--calendar-mini-work-week-width":"--calendar-work-week-width"),10):0;return 0}),ae=Te.computed(()=>{return y.weekdays.length}),ne=Te.computed(()=>{if(H.value){const e=p.width||H.value.getBoundingClientRect().width;if(e&&ae.value)return(e-te.value)/ae.value+"px"}return 100/ae.value+"%"}),re=Te.computed(()=>{return!0===y.focusable&&y.focusType.includes("day")&&!0!==U.value}),oe=Te.computed(()=>{return!0===y.focusable&&y.focusType.includes("date")&&!0!==re.value});function de(){m.value=We()}function ue(e=1){Q(e)}function ie(e=1){Q(-e)}function le({width:e,height:t}){p.width=e,p.height=t}function se(e){return e.date===m.value}function ce(t){for(let e=0;e<t.length;++e)if(!0===t[e].current)return{timestamp:t[e]};return{timestamp:!1}}function ve(){if(!0!==U.value&&0===y.dayHeight){const e=h.week;if(void 0!==e&&window)for(const t in d.value){const a=d.value[t];if(void 0!==a){const n=u.value[t];if(void 0!==n){const r=window.getComputedStyle(a),o=parseFloat(r.marginTop,10)+parseFloat(r.marginBottom,10);a.clientHeight+o>n.clientHeight&&(n.style.height=a.clientHeight+o+"px")}}}}}function ye(){return Te.h("div",{class:"q-calendar-month__body"},[...be()])}function he(){return Te.h("div",{role:"presentation",class:"q-calendar-month__head"},[!0===y.showWorkWeeks&&me(),Te.h("div",{class:"q-calendar-month__head--wrapper"},[fe()])])}function fe(){return Te.h("div",{ref:n,class:{"q-calendar-month__head--weekdays":!0}},[...pe()])}function me(){const e=h["head-workweek"],t={start:T.value,end:W.value,miniMode:U.value};return Te.h("div",{class:"q-calendar-month__head--workweek",...G("-head-workweek",e=>{return{scope:t,event:e}})},e?e({scope:t}):"#")}function pe(){return P.value.map((e,t)=>we(e,t))}function we(t,e){const a=h["head-day"],n=R.value.filter(e=>e.weekday===t.weekday),r=n[0].weekday,o={weekday:r,timestamp:t,days:n,index:e,miniMode:U.value};o.droppable=w.value===t.weekday;const d=!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday),u="function"===typeof y.weekdayClass?y.weekdayClass({scope:o}):{},i=!0===y.focusable&&y.focusType.includes("weekday"),l=ne.value,s=y.weekdayStyle||L,c={width:l,maxWidth:l,minWidth:l,...s({scope:o})},v={key:t.date+(void 0!==e?"-"+e:""),tabindex:!0===i?0:-1,class:{"q-calendar-month__head--weekday":!0,...u,"q-disabled-day disabled":!0===d,["q-calendar__"+y.weekdayAlign]:!0,"q-calendar__ellipsis":!0,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"head-day",o)?w.value=t.weekday:w.value="")},onFocus:e=>{!0===i&&(f.value=t.date)},...G("-head-day",e=>{return{scope:o,event:e}})};return!0!==y.noAria&&(v.ariaLabel=E.value(t,!1)),Te.h("div",v,[void 0===a&&ge(t,y.shortWeekdayLabel||U.value),void 0!==a&&a({scope:o}),ke(t,e),!0===i&&$e()])}function ke(t,e){const a=h["head-day-event"],n=!0!==y.noActiveDate&&se(t),r=!!y.disabledWeekdays&&y.disabledWeekdays.includes(t.weekday),o=R.value.filter(e=>e.weekday===t.weekday),d=o[0].weekday,u={weekday:d,timestamp:t,days:o,index:e,miniMode:U.value,activeDate:n,disabled:r},i=ne.value,l=y.weekdayStyle||L,s={width:i,maxWidth:i,minWidth:i,...l({scope:u})};return Te.h("div",{key:"event-"+t.date+(void 0!==e?"-"+e:""),class:{"q-calendar-month__head--event":!0},style:s},[void 0!==a&&a({scope:u})])}function ge(e,t){const a=E.value(e,t||y.weekdayBreakpoints[0]>0&&$.value<=y.weekdayBreakpoints[0]);return Te.h("span",{class:"q-calendar__ellipsis"},!0===U.value&&!0===y.shortWeekdayLabel||y.weekdayBreakpoints[1]>0&&$.value<=y.weekdayBreakpoints[1]?Oe(a,y.minWeekdayLabel):a)}function be(){const t=y.weekdays.length,a=[];for(let e=0;e<R.value.length;e+=t)a.push(De(R.value.slice(e,e+t),e/t));return a}function De(e,t){const a=h.week,n=y.weekdays,r={week:e,weekdays:n,miniMode:U.value},o={};return o.height=y.dayHeight>0&&!0!==U.value?Le(parseInt(y.dayHeight,10)):"auto",y.dayMinHeight>0&&!0!==U.value&&(o.minHeight=Le(parseInt(y.dayMinHeight,10))),Te.h("div",{key:e[0].date,ref:e=>{u.value[t]=e},class:"q-calendar-month__week--wrapper",style:o},[!0===y.showWorkWeeks?_e(e):void 0,Te.h("div",{class:"q-calendar-month__week"},[Te.h("div",{class:"q-calendar-month__week--days"},e.map((e,t)=>qe(e))),!0!==U.value&&void 0!==a?Te.h("div",{ref:e=>{d.value[t]=e},class:"q-calendar-month__week--events"},a({scope:r})):void 0])])}function _e(e){const t=h.workweek,a=e.length>2?e[2]:e[0],{timestamp:n}=ce(e),r=Number(a.workweek).toLocaleString(y.locale),o={workweekLabel:r,week:e,miniMode:U.value};return Te.h("div",{key:a.workweek,class:{"q-calendar-month__workweek":!0,...O(!1!==n?n:a,!1)},...G("-workweek",e=>{return{scope:o,event:e}})},t?t({scope:o}):r)}function qe(t){const e=h.day,a=y.dayStyle||L,n=Y(t),r=!0!==y.noActiveDate&&j.value.date===t.date,o=!1===n&&!0===y.showMonthLabel&&R.value.find(e=>e.month===t.month).day===t.day,d={outside:n,timestamp:t,miniMode:U.value,activeDate:r,hasMonth:o,droppable:k.value===t.date},u=Object.assign({...I.value},a({scope:d})),i="function"===typeof y.dayClass?y.dayClass({scope:d}):{},l={key:t.date,ref:e=>{!0===re.value&&(v.value[t.date]=e)},tabindex:!0===re.value?0:-1,class:{"q-calendar-month__day":!0,...i,...O(t,n,y.selectedDates,y.selectedStartEndDates,y.hover),"q-active-date":!0===r,disabled:!0!==y.enableOutsideDays&&!0===n,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===re.value},style:u,onFocus:e=>{!0===re.value&&(f.value=t.date)},onKeydown:e=>{!0!==n&&!0!==t.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==n&&!0!==t.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),void 0!==q.value.onClickDay&&!0!==U.value&&c("click-day",{scope:d,event:e}))},...G("-day",e=>{return{scope:d,event:e}})},s={onDragenter:e=>{void 0!==y.dragEnterFunc&&"function"===typeof y.dragEnterFunc&&(!0===y.dragEnterFunc(e,"day",d)?k.value=t.date:k.value="")},onDragover:e=>{void 0!==y.dragOverFunc&&"function"===typeof y.dragOverFunc&&(!0===y.dragOverFunc(e,"day",d)?k.value=t.date:k.value="")},onDragleave:e=>{void 0!==y.dragLeaveFunc&&"function"===typeof y.dragLeaveFunc&&(!0===y.dragLeaveFunc(e,"day",d)?k.value=t.date:k.value="")},onDrop:e=>{void 0!==y.dropFunc&&"function"===typeof y.dropFunc&&(!0===y.dropFunc(e,"day",d)?k.value=t.date:k.value="")}};return!0!==n&&Object.assign(l,s),!0!==y.noAria&&(l.ariaLabel=B.value(t)),Te.h("div",l,[xe(t,n,o),Te.h("div",{class:{"q-calendar-month__day--content":!0}},e?e({scope:d}):void 0),!0===re.value&&$e()])}function xe(e,t,a){let n,r;const o=[Fe(e,t)];!0!==U.value&&!0===a&&p.width>340&&(r=Ce(e,t)),!0!==U.value&&!0===y.showDayOfYearLabel&&void 0===r&&p.width>300&&(n=Se(e,t)),"left"===y.dateAlign?(void 0!==n&&o.push(n),void 0!==r&&o.push(r)):"right"===y.dateAlign?(void 0!==n&&o.unshift(n),void 0!==r&&o.unshift(r)):(n=void 0,r=void 0);const d={class:{"q-calendar-month__day--label__wrapper":!0,"q-calendar__ellipsis":!0,["q-calendar__"+y.dateAlign]:void 0===n&&void 0===r,"q-calendar__justify":void 0!==n||void 0!==r}};return Te.h("div",d,o)}function Fe(a,t){if(!0!==t||!0!==y.noOutsideDays){const e=A.value(a,!1),n=h["head-day-label"],r=h["head-day-button"],o=y.selectedDates&&y.selectedDates.length>0&&y.selectedDates.includes(a.date),d=!0!==y.noActiveDate&&se(a),u={dayLabel:e,timestamp:a,outside:t,activeDate:d,selectedDate:o,miniMode:U.value},i={key:a.date,ref:e=>{!0===oe.value&&(v.value[a.date]=e)},tabindex:!0===oe.value?0:-1,class:{"q-calendar-month__day--label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===y.dateType,"q-calendar__button--rounded":"rounded"===y.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===y.hoverable,"q-calendar__focusable":!0===oe.value},disabled:!0===a.disabled||!0!==y.enableOutsideDays&&!0===t,onFocus:e=>{!0===oe.value&&(f.value=a.date)},onKeydown:e=>{!0!==t&&!0!==a.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0===oe.value&&!0!==t&&!0!==a.disabled&&X(e,[13,32])&&(e.stopPropagation(),e.preventDefault(),m.value=a.date,void 0!==q.value.onClickDate&&c("click-date",{scope:u,event:e}))},...G("-date",(e,t)=>{e.stopPropagation();"click-date"!==t&&"contextmenu-date"!==t||(m.value=a.date);return{scope:u,event:e}})};return!0!==y.noAria&&(i.ariaLabel=B.value(a)),[r?r({scope:u}):Ke(y,i,n?n({scope:u}):e),!0===oe.value&&$e()]}}function Se(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=h["day-of-year"],n={timestamp:e};return Te.h("span",{class:{"q-calendar-month__day--day-of-year":!0,"q-calendar__ellipsis":!0}},a?a({scope:n}):e.doy)}}function Ce(e,t){if(!0!==t||!0!==y.noOutsideDays){const a=h["month-label"],n=Z.value(e,y.shortMonthLabel||p.width<500),r={monthLabel:n,timestamp:e,miniMode:U.value},o={};return!0!==U.value&&void 0!==K.value&&(o.fontSize=K.value),Te.h("span",{class:"q-calendar-month__day--month q-calendar__ellipsis",style:o},[a?a({scope:r}):!0!==U.value?n:void 0])}}function Me(){const{start:e,end:t}=V.value;i.value=e.date,l.value=t.date;const a=p.width>0,n=Te.withDirectives(Te.h("div",{class:{"q-calendar-mini":!0===U.value,"q-calendar-month":!0},key:i.value},[!0===a&&!0!==y.noHeader&&he(),!0===a&&ye()]),[[Ie,le]]);if(!0!==y.animated)return n;{const r="q-calendar--"+("prev"===o.value?y.transitionPrev:y.transitionNext);return Te.h(Te.Transition,{name:r,appear:!0},()=>n)}}return Te.watch([R],J,{deep:!0,immediate:!0}),Te.watch(()=>y.modelValue,(e,t)=>{if(m.value!==e){if(!0===y.animated){const a=Be(Ae(e)),n=Be(Ae(t));o.value=a>=n?"next":"prev"}m.value=e}f.value=e}),Te.watch(m,(e,t)=>{if(m.value!==y.modelValue){if(!0===y.animated){const a=Be(Ae(e)),n=Be(Ae(t));o.value=a>=n?"next":"prev"}c("update:model-value",e)}}),Te.watch(f,e=>{e&&(r.value=Ee(e),m.value!==e&&(m.value=e))}),Te.watch(r,e=>{v.value[f.value]?v.value[f.value].focus():ee()}),Te.onBeforeUpdate(()=>{v.value={};d.value=[];u.value=[];Te.nextTick(()=>{ve()})}),Te.onMounted(()=>{z();ve()}),e({prev:ie,next:ue,move:Q,moveToToday:de,updateCurrent:C}),()=>N()}}),we="@quasar/quasar-ui-qcalendar",ke="4.0.0-beta.3",ge="Jeff Galbraith <jeff@quasar.dev>",be="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",De="MIT",_e="dist/index.esm.js",qe="dist/index.common.js",xe="dist/types/index.d.ts",Fe={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},Se={type:"github",url:"https://github.com/sponsors/hawkeye64"},Ce={access:"public"},Me={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},Je="https://github.com/quasarframework/quasar-ui-qcalendar/issues",Xe="https://github.com/quasarframework/quasar-ui-qcalendar",et=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],tt={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},at={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},nt=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],nt={name:we,version:ke,author:ge,description:be,license:De,module:_e,main:qe,typings:xe,scripts:Fe,funding:Se,publishConfig:Ce,repository:Me,bugs:Je,homepage:Xe,keywords:et,vetur:tt,devDependencies:at,browserslist:nt};const{version:rt}=nt;e.QCalendarMonth=pe,e.version=rt,Object.defineProperty(e,"__esModule",{value:!0})});
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var vue=require("vue");const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const l in r)if(Array.isArray(r[l])&&2===r[l].length){const d=parsed(r[l][0]),c=parsed(r[l][1]);if(isBetweenDates(e,d,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,l=0){const d=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===d;if(d<getDayIdentifier(e))return c;while((!p||c.length<l)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>d&&c.length>=l,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),l=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:l,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const l=vue.computed(()=>parseInt(o.intervalStart,10)),p=vue.computed(()=>parseInt(o.intervalMinutes,10)),d=vue.computed(()=>parseInt(o.intervalCount,10)),y=vue.computed(()=>parseFloat(o.intervalHeight)),m=vue.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),f=vue.computed(()=>l.value*p.value),c=vue.computed(()=>d.value*y.value),v=vue.computed(()=>d.value*m.value),h=vue.computed(()=>b(a.value)),g=vue.computed(()=>k(r.value)),w=vue.computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=vue.computed(()=>{return w.value.map(e=>createIntervalList(e,l.value,p.value,d.value,t.now))});function b(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function T(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function M(e,t=[],a=[]){const n=T(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function F(e){}function C(e){}function O(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=f.value,i=e,s=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:s).clientY,c=(d-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function A(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=f.value,i=e,s=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:s).clientY,c=(d-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return updateMinutes(r,m,n)}function R(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientX,d=(l-o.left)/m.value,c=Math.floor((a?Math.floor(d):d)*p.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function x(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function H(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=j,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=j(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/p.value*y.value}function U(e){return e/p.value*m.value}function z(e){return parseInt(e,10)*p.value/y.value}function P(e){return parseInt(e,10)*p.value/m.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=d.value*p.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function j(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=f.value,r=d.value*p.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:l,parsedIntervalMinutes:p,parsedIntervalCount:d,parsedIntervalHeight:y,parsedCellWidth:m,parsedStartMinute:f,bodyHeight:c,bodyWidth:v,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:T,checkIntervals:_,getIntervalClasses:M,getResourceClasses:I,showIntervalLabelDefault:E,showResourceLabelDefault:F,styleDefault:C,getTimestampAtEventInterval:O,getTimestampAtEvent:A,getTimestampAtEventX:R,getScopeForSlot:x,getScopeForSlotX:H,scrollToTime:q,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:j}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:l,weekdaySkips:d,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===d.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:l,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:k();break;case 35:_();break;case 36:T();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return d.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);d.value="prev";do{t=addToDate(t,{day:-1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);d.value="next";do{t=addToDate(t,{day:1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));d.value="prev",r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));d.value="next",r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarResource=vue.defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(m,{slots:p,emit:v,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),r=vue.ref(null),y=vue.ref(null),o=vue.ref(null),f=vue.ref({}),h=vue.ref({}),u=vue.ref("next"),i=vue.ref(today()),s=vue.ref("0000-00-00"),l=vue.ref(0),d=vue.ref(m.modelValue),c=vue.reactive({width:0,height:0}),g=vue.ref(!1),w=vue.ref(!1),D=vue.ref(!1),b=vue.ref(null),k=vue.ref(null),T=vue.computed(()=>{return"day"}),_=vue.computed(()=>{return parseInt(m.cellWidth,10)}),M=vue.getCurrentInstance();if(null===M)throw new Error("current instance is null");const{emitListeners:I}=useEmitListeners(M),{times:S,setCurrent:N,updateCurrent:E}=useTimes(m);E(),N();const{weekdaySkips:F,parsedStart:C,parsedEnd:O,dayStyleDefault:A}=useCommon(m,{startDate:i,endDate:s,times:S}),R=vue.computed(()=>{return parseTimestamp(m.modelValue,S.now)||C.value||S.today});o.value=R.value,y.value=R.value.date;const x=vue.computed(()=>{if(0===l.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===U.value||0===U.value.length)return!0;const e=U.value[0];const t=U.value[U.value.length-1];return!0!==isBetweenDates(R.value,e,t)}),{renderValues:H}=useRenderValues(m,{parsedView:T,times:S,parsedValue:R}),{rootRef:q,__initCalendar:W,__renderCalendar:L}=useCalendar(m,be,{scrollArea:t,pane:a}),{days:U,intervals:z,intervalFormatter:P,styleDefault:Y,scrollToTimeX:j,timeDurationWidth:V,timeStartPosX:B,widthToMinutes:X}=useInterval(m,{weekdaySkips:F,times:S,scrollArea:t,parsedStart:C,parsedEnd:O,maxDays:l,size:c,headerColumnRef:r}),{move:$}=useMove(m,{parsedView:T,parsedValue:R,weekdaySkips:F,direction:u,maxDays:l,times:S,emittedValue:d,emit:v}),{getDefaultMouseEventHandlers:K}=useMouse(v,I),{checkChange:Z}=useCheckChange(v,{days:U,lastStart:b,lastEnd:k}),{isKeyCode:Q}=useEvents(),{tryFocus:G}=useKeyboard(m,{rootRef:q,focusRef:y,focusValue:o,datesRef:f,days:U,parsedView:T,parsedValue:R,emittedValue:d,weekdaySkips:F,direction:u,times:S}),J=vue.computed(()=>{const e=parseInt(m.resourceHeight,10);if(0===e)return"auto";return e}),ee=vue.computed(()=>{return parseInt(m.resourceMinHeight,10)}),te=vue.computed(()=>{return parseInt(m.intervalHeaderHeight,10)});function ae(){d.value=today()}function ne(e=1){$(e)}function re(e=1){$(-e)}function oe({width:e,height:t}){c.width=e,c.height=t}function ue(e){return e.date===d.value}function ie(){const e={height:convertToUnit(te.value)};return vue.h("div",{ref:n,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[se(),le()])}function se(){const e=p["head-resources"],t=convertToUnit(te.value),a={timestamps:z,date:m.modelValue,resources:m.modelResources};return vue.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...K("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function le(){return vue.h("div",{ref:r,class:{"q-calendar-resource__head--intervals":!0}},[z.value.map(e=>e.map((e,t)=>de(e,t)))])}function de(e,t){const a=p["interval-label"],n=!0!==m.noActiveDate&&ue(e),r=convertToUnit(_.value),o=convertToUnit(te.value),u=m.shortIntervalLabel,i=P.value(e,u),s={timestamp:e,index:t,label:i};s.droppable=g.value===i;const l=m.intervalStyle||A,d={width:r,maxWidth:r,minWidth:r,height:o,...l({scope:s})},c="function"===typeof m.intervalClass?m.intervalClass({scope:s}):{},v=!0===m.focusable&&m.focusType.includes("interval");return vue.h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",s)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",s)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",s)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",s)?g.value=i:g.value="")},onFocus:e=>{!0===v&&(y.value=i)},...K("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):i,useFocusHelper()])}function ce(){return vue.h("div",{class:"q-calendar-resource__body"},[ve()])}function ve(){return vue.h("div",{ref:t,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[pe()])}function me(){return vue.h("div",{},"No resources have been defined")}function pe(){return vue.h("div",{class:"q-calendar-resource__day--container"},[ie(),void 0===m.modelResources&&me(),void 0!==m.modelResources&&ye()])}function ye(){const e={class:"q-calendar-resource__resources--body"};return vue.h("div",e,fe())}function fe(e=void 0,a=0,n=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return he(e,t,a,void 0!==e.children?e.expanded:n)})}function he(e,t,a=0,n=!0){const r={};r.height="auto"===J.value?J.value:convertToUnit(J.value),ee.value>0&&(r.minHeight=convertToUnit(ee.value));const o=vue.h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ge(e,t,a,n),we(e,t)]);return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[fe(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function ge(t,e,a=0,n=!0){const r=p["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):J.value?convertToUnit(J.value):"auto",ee.value>0&&(o.minHeight=convertToUnit(ee.value));const u=m.resourceStyle||Y,i=t[m.resourceLabel],s=!0===m.focusable&&m.focusType.includes("resource")&&!0===n,l={resource:t,timestamps:z,resourceIndex:e,indentLevel:a,label:i},d=t[m.resourceKey];l.droppable=w.value===d;const c="function"===typeof m.resourceClass?m.resourceClass({scope:l}):{};return vue.h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{h.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:l})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",l)?w.value=d:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",l)?w.value=d:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",l)?w.value=d:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",l)?w.value=d:w.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==I.value.onClickResource&&v("click-resource",{scope:l,event:e})},...K("-resource",e=>{return{scope:l,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;v("resource-expanded",{expanded:t.expanded,scope:l})}}),vue.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):i]),useFocusHelper()]])}function we(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:z,resourceIndex:a,timeStartPosX:B,timeDurationWidth:V};return vue.h("div",{class:"q-calendar-resource__resource--intervals"},[z.value.map(e=>e.map(e=>De(t,e,a))),e&&e({scope:n})])}function De(t,e,a){const n=p["resource-interval"],r=!0!==m.noActiveDate&&ue(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[m.resourceKey],i=e.time+"-"+u;o.droppable=D.value===i;const s=!0===m.focusable&&m.focusType.includes("time"),l=m.intervalStyle||A,d=convertToUnit(_.value),c={width:d,maxWidth:d,minWidth:d,...l({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):J.value>0?convertToUnit(J.value):"auto",ee.value>0&&(c.minHeight=convertToUnit(ee.value)),vue.h("div",{key:i,ref:e=>{f.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",o)?D.value=i:D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",o)?D.value=i:D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",o)?D.value=i:D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",o)?D.value=i:D.value="")},onFocus:e=>{!0===s&&(y.value=i)},...K("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function be(){if(x.value){const{start:a,end:n,maxDays:r}=H.value;i.value=a.date,s.value=n.date,l.value=r}const e=c.width>0,t=vue.withDirectives(vue.h("div",{class:"q-calendar-resource",key:i.value},[!0===e&&ce()]),[[ResizeObserver$1,oe]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>t)}}return vue.watch([U],Z,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(d.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}d.value=e}y.value=e}),vue.watch(d,(e,t)=>{if(d.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),vue.watch(y,e=>{e&&(o.value=parseTimestamp(e))}),vue.watch(o,e=>{f.value[y.value]?f.value[y.value].focus():G()}),vue.onBeforeUpdate(()=>{f.value={};h.value={}}),vue.onMounted(()=>{W()}),e({prev:re,next:ne,move:$,moveToToday:ae,updateCurrent:E,timeStartPosX:B,timeDurationWidth:V,widthToMinutes:X,scrollToTimeX:j}),()=>L()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarResource:QCalendarResource,install(e){e.component(QCalendarResource.name,QCalendarResource)}};module.exports=Plugin;
"use strict";var vue=require("vue");const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const l in r)if(Array.isArray(r[l])&&2===r[l].length){const d=parsed(r[l][0]),c=parsed(r[l][1]);if(isBetweenDates(e,d,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,l=0){const d=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===d;if(d<getDayIdentifier(e))return c;while((!p||c.length<l)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>d&&c.length>=l,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),l=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:l,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const l=vue.computed(()=>parseInt(o.intervalStart,10)),v=vue.computed(()=>parseInt(o.intervalMinutes,10)),d=vue.computed(()=>parseInt(o.intervalCount,10)),m=vue.computed(()=>parseFloat(o.intervalHeight)),p=vue.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=vue.computed(()=>l.value*v.value),y=vue.computed(()=>d.value*m.value),f=vue.computed(()=>d.value*p.value),h=vue.computed(()=>b(a.value)),g=vue.computed(()=>k(r.value)),w=vue.computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=vue.computed(()=>{return w.value.map(e=>createIntervalList(e,l.value,v.value,d.value,t.now))});function b(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function T(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function M(e,t=[],a=[]){const n=T(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function F(e){}function C(e){}function O(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientY,d=(l-o.top)/m.value,c=Math.floor((a?Math.floor(d):d)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientY,d=(l-o.top)/m.value,c=Math.floor((a?Math.floor(d):d)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function A(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientX,d=(l-o.left)/p.value,c=Math.floor((a?Math.floor(d):d)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function H(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=j,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=j(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function U(e){return e/v.value*p.value}function z(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/p.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=d.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}function j(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=d.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value&&(u=f.value)),u}return{parsedIntervalStart:l,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:f,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:T,checkIntervals:_,getIntervalClasses:M,getResourceClasses:I,showIntervalLabelDefault:E,showResourceLabelDefault:F,styleDefault:C,getTimestampAtEventInterval:O,getTimestampAtEvent:R,getTimestampAtEventX:A,getScopeForSlot:x,getScopeForSlotX:H,scrollToTime:q,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:j}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:l,weekdaySkips:d,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===d.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:l,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:k();break;case 35:_();break;case 36:T();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return d.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);d.value="prev";do{t=addToDate(t,{day:-1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);d.value="next";do{t=addToDate(t,{day:1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));d.value="prev",r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));d.value="next",r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarResource=vue.defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(m,{slots:p,emit:v,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),r=vue.ref(null),y=vue.ref(null),o=vue.ref(null),f=vue.ref({}),h=vue.ref({}),u=vue.ref("next"),i=vue.ref(today()),s=vue.ref("0000-00-00"),l=vue.ref(0),d=vue.ref(m.modelValue),c=vue.reactive({width:0,height:0}),g=vue.ref(!1),w=vue.ref(!1),D=vue.ref(!1),b=vue.ref(null),k=vue.ref(null),T=vue.computed(()=>{return"day"}),_=vue.computed(()=>{return parseInt(m.cellWidth,10)}),M=vue.getCurrentInstance();if(null===M)throw new Error("current instance is null");const{emitListeners:I}=useEmitListeners(M),{times:S,setCurrent:N,updateCurrent:E}=useTimes(m);E(),N();const{weekdaySkips:F,parsedStart:C,parsedEnd:O,dayStyleDefault:R}=useCommon(m,{startDate:i,endDate:s,times:S}),A=vue.computed(()=>{return parseTimestamp(m.modelValue,S.now)||C.value||S.today});o.value=A.value,y.value=A.value.date;const x=vue.computed(()=>{if(0===l.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===U.value||0===U.value.length)return!0;const e=U.value[0];const t=U.value[U.value.length-1];return!0!==isBetweenDates(A.value,e,t)}),{renderValues:H}=useRenderValues(m,{parsedView:T,times:S,parsedValue:A}),{rootRef:q,__initCalendar:W,__renderCalendar:L}=useCalendar(m,be,{scrollArea:t,pane:a}),{days:U,intervals:z,intervalFormatter:P,styleDefault:Y,scrollToTimeX:j,timeDurationWidth:V,timeStartPosX:B,widthToMinutes:X}=useInterval(m,{weekdaySkips:F,times:S,scrollArea:t,parsedStart:C,parsedEnd:O,maxDays:l,size:c,headerColumnRef:r}),{move:$}=useMove(m,{parsedView:T,parsedValue:A,weekdaySkips:F,direction:u,maxDays:l,times:S,emittedValue:d,emit:v}),{getDefaultMouseEventHandlers:K}=useMouse(v,I),{checkChange:Z}=useCheckChange(v,{days:U,lastStart:b,lastEnd:k}),{isKeyCode:Q}=useEvents(),{tryFocus:G}=useKeyboard(m,{rootRef:q,focusRef:y,focusValue:o,datesRef:f,days:U,parsedView:T,parsedValue:A,emittedValue:d,weekdaySkips:F,direction:u,times:S}),J=vue.computed(()=>{const e=parseInt(m.resourceHeight,10);if(0===e)return"auto";return e}),ee=vue.computed(()=>{return parseInt(m.resourceMinHeight,10)}),te=vue.computed(()=>{return parseInt(m.intervalHeaderHeight,10)});function ae(){d.value=today()}function ne(e=1){$(e)}function re(e=1){$(-e)}function oe({width:e,height:t}){c.width=e,c.height=t}function ue(e){return e.date===d.value}function ie(){const e={height:convertToUnit(te.value)};return vue.h("div",{ref:n,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[se(),le()])}function se(){const e=p["head-resources"],t=convertToUnit(te.value),a={timestamps:z,date:m.modelValue,resources:m.modelResources};return vue.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...K("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function le(){return vue.h("div",{ref:r,class:{"q-calendar-resource__head--intervals":!0}},[z.value.map(e=>e.map((e,t)=>de(e,t)))])}function de(e,t){const a=p["interval-label"],n=!0!==m.noActiveDate&&ue(e),r=convertToUnit(_.value),o=convertToUnit(te.value),u=m.shortIntervalLabel,i=P.value(e,u),s={timestamp:e,index:t,label:i};s.droppable=g.value===i;const l=m.intervalStyle||R,d={width:r,maxWidth:r,minWidth:r,height:o,...l({scope:s})},c="function"===typeof m.intervalClass?m.intervalClass({scope:s}):{},v=!0===m.focusable&&m.focusType.includes("interval");return vue.h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",s)?g.value=i:g.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",s)?g.value=i:g.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",s)?g.value=i:g.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",s)?g.value=i:g.value="")},onFocus:e=>{!0===v&&(y.value=i)},...K("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):i,useFocusHelper()])}function ce(){return vue.h("div",{class:"q-calendar-resource__body"},[ve()])}function ve(){return vue.h("div",{ref:t,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[pe()])}function me(){return vue.h("div",{},"No resources have been defined")}function pe(){return vue.h("div",{class:"q-calendar-resource__day--container"},[ie(),void 0===m.modelResources&&me(),void 0!==m.modelResources&&ye()])}function ye(){const e={class:"q-calendar-resource__resources--body"};return vue.h("div",e,fe())}function fe(e=void 0,a=0,n=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return he(e,t,a,void 0!==e.children?e.expanded:n)})}function he(e,t,a=0,n=!0){const r={};r.height="auto"===J.value?J.value:convertToUnit(J.value),ee.value>0&&(r.minHeight=convertToUnit(ee.value));const o=vue.h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ge(e,t,a,n),we(e,t)]);return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[fe(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function ge(t,e,a=0,n=!0){const r=p["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):J.value?convertToUnit(J.value):"auto",ee.value>0&&(o.minHeight=convertToUnit(ee.value));const u=m.resourceStyle||Y,i=t[m.resourceLabel],s=!0===m.focusable&&m.focusType.includes("resource")&&!0===n,l={resource:t,timestamps:z,resourceIndex:e,indentLevel:a,label:i},d=t[m.resourceKey];l.droppable=w.value===d;const c="function"===typeof m.resourceClass?m.resourceClass({scope:l}):{};return vue.h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{h.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:l})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",l)?w.value=d:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",l)?w.value=d:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",l)?w.value=d:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",l)?w.value=d:w.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==I.value.onClickResource&&v("click-resource",{scope:l,event:e})},...K("-resource",e=>{return{scope:l,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;v("resource-expanded",{expanded:t.expanded,scope:l})}}),vue.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):i]),useFocusHelper()]])}function we(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:z,resourceIndex:a,timeStartPosX:B,timeDurationWidth:V};return vue.h("div",{class:"q-calendar-resource__resource--intervals"},[z.value.map(e=>e.map(e=>De(t,e,a))),e&&e({scope:n})])}function De(t,e,a){const n=p["resource-interval"],r=!0!==m.noActiveDate&&ue(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[m.resourceKey],i=e.time+"-"+u;o.droppable=D.value===i;const s=!0===m.focusable&&m.focusType.includes("time"),l=m.intervalStyle||R,d=convertToUnit(_.value),c={width:d,maxWidth:d,minWidth:d,...l({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):J.value>0?convertToUnit(J.value):"auto",ee.value>0&&(c.minHeight=convertToUnit(ee.value)),vue.h("div",{key:i,ref:e=>{f.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",o)?D.value=i:D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",o)?D.value=i:D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",o)?D.value=i:D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",o)?D.value=i:D.value="")},onFocus:e=>{!0===s&&(y.value=i)},...K("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function be(){if(x.value){const{start:a,end:n,maxDays:r}=H.value;i.value=a.date,s.value=n.date,l.value=r}const e=c.width>0,t=vue.withDirectives(vue.h("div",{class:"q-calendar-resource",key:i.value},[!0===e&&ce()]),[[ResizeObserver$1,oe]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return vue.h(vue.Transition,{name:o,appear:!0},()=>t)}}return vue.watch([U],Z,{deep:!0,immediate:!0}),vue.watch(()=>m.modelValue,(e,t)=>{if(d.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}d.value=e}y.value=e}),vue.watch(d,(e,t)=>{if(d.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),vue.watch(y,e=>{e&&(o.value=parseTimestamp(e))}),vue.watch(o,e=>{f.value[y.value]?f.value[y.value].focus():G()}),vue.onBeforeUpdate(()=>{f.value={};h.value={}}),vue.onMounted(()=>{W()}),e({prev:re,next:ne,move:$,moveToToday:ae,updateCurrent:E,timeStartPosX:B,timeDurationWidth:V,widthToMinutes:X,scrollToTimeX:j}),()=>L()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarResource:QCalendarResource,install(e){e.component(QCalendarResource.name,QCalendarResource)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const l in r)if(Array.isArray(r[l])&&2===r[l].length){const d=parsed(r[l][0]),c=parsed(r[l][1]);if(isBetweenDates(e,d,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,l=0){const d=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===d;if(d<getDayIdentifier(e))return c;while((!p||c.length<l)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>d&&c.length>=l,p)break;if(0!==n[v.weekday]){const f=copyTimestamp(v);updateFormatted(f),updateRelative(f,a),updateDisabled(f,r,o,u,i),c.push(f),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=reactive({width:0,height:0}),o=ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),u=computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),l=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function f(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:l,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:f}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const l=computed(()=>parseInt(o.intervalStart,10)),p=computed(()=>parseInt(o.intervalMinutes,10)),d=computed(()=>parseInt(o.intervalCount,10)),f=computed(()=>parseFloat(o.intervalHeight)),m=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),y=computed(()=>l.value*p.value),c=computed(()=>d.value*f.value),v=computed(()=>d.value*m.value),h=computed(()=>b(a.value)),g=computed(()=>k(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=computed(()=>{return w.value.map(e=>createIntervalList(e,l.value,p.value,d.value,t.now))});function b(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function T(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function M(e,t=[],a=[]){const n=T(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function F(e){}function C(e){}function O(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=y.value,i=e,s=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:s).clientY,c=(d-o.top)/f.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=y.value,i=e,s=e,l=i.changedTouches||i.touches,d=(l&&l[0]?l[0]:s).clientY,c=(d-o.top)/f.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return updateMinutes(r,m,n)}function x(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientX,d=(l-o.left)/m.value,c=Math.floor((a?Math.floor(d):d)*p.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function A(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function H(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=j,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=j(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/p.value*f.value}function U(e){return e/p.value*m.value}function z(e){return parseInt(e,10)*p.value/f.value}function P(e){return parseInt(e,10)*p.value/m.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=y.value,r=d.value*p.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function j(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=y.value,r=d.value*p.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:l,parsedIntervalMinutes:p,parsedIntervalCount:d,parsedIntervalHeight:f,parsedCellWidth:m,parsedStartMinute:y,bodyHeight:c,bodyWidth:v,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:T,checkIntervals:_,getIntervalClasses:M,getResourceClasses:I,showIntervalLabelDefault:E,showResourceLabelDefault:F,styleDefault:C,getTimestampAtEventInterval:O,getTimestampAtEvent:R,getTimestampAtEventX:x,getScopeForSlot:A,getScopeForSlotX:H,scrollToTime:q,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:j}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:l,weekdaySkips:d,direction:c,maxDays:v,times:m,emittedValue:p,emit:f}){function e(a=1){if(0!==a){let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===d.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,f("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:l,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function v(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function f(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:k();break;case 35:_();break;case 36:T();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return d.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);d.value="prev";do{t=addToDate(t,{day:-1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);d.value="next";do{t=addToDate(t,{day:1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));d.value="prev",r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));d.value="next",r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarResource=defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(m,{slots:p,emit:v,expose:e}){const t=ref(null),a=ref(null),n=ref(null),r=ref(null),f=ref(null),o=ref(null),y=ref({}),g=ref({}),u=ref("next"),i=ref(today()),s=ref("0000-00-00"),l=ref(0),d=ref(m.modelValue),c=reactive({width:0,height:0}),w=ref(!1),D=ref(!1),b=ref(!1),k=ref(null),T=ref(null),_=computed(()=>{return"day"}),M=computed(()=>{return parseInt(m.cellWidth,10)}),I=getCurrentInstance();if(null===I)throw new Error("current instance is null");const{emitListeners:S}=useEmitListeners(I),{times:N,setCurrent:E,updateCurrent:F}=useTimes(m);F(),E();const{weekdaySkips:C,parsedStart:O,parsedEnd:R,dayStyleDefault:x}=useCommon(m,{startDate:i,endDate:s,times:N}),A=computed(()=>{return parseTimestamp(m.modelValue,N.now)||O.value||N.today});o.value=A.value,f.value=A.value.date;const H=computed(()=>{if(0===l.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===z.value||0===z.value.length)return!0;const e=z.value[0];const t=z.value[z.value.length-1];return!0!==isBetweenDates(A.value,e,t)}),{renderValues:q}=useRenderValues(m,{parsedView:_,times:N,parsedValue:A}),{rootRef:W,__initCalendar:L,__renderCalendar:U}=useCalendar(m,ke,{scrollArea:t,pane:a}),{days:z,intervals:P,intervalFormatter:Y,styleDefault:j,scrollToTimeX:V,timeDurationWidth:B,timeStartPosX:X,widthToMinutes:K}=useInterval(m,{weekdaySkips:C,times:N,scrollArea:t,parsedStart:O,parsedEnd:R,maxDays:l,size:c,headerColumnRef:r}),{move:$}=useMove(m,{parsedView:_,parsedValue:A,weekdaySkips:C,direction:u,maxDays:l,times:N,emittedValue:d,emit:v}),{getDefaultMouseEventHandlers:Z}=useMouse(v,S),{checkChange:Q}=useCheckChange(v,{days:z,lastStart:k,lastEnd:T}),{isKeyCode:G}=useEvents(),{tryFocus:J}=useKeyboard(m,{rootRef:W,focusRef:f,focusValue:o,datesRef:y,days:z,parsedView:_,parsedValue:A,emittedValue:d,weekdaySkips:C,direction:u,times:N}),ee=computed(()=>{const e=parseInt(m.resourceHeight,10);if(0===e)return"auto";return e}),te=computed(()=>{return parseInt(m.resourceMinHeight,10)}),ae=computed(()=>{return parseInt(m.intervalHeaderHeight,10)});function ne(){d.value=today()}function re(e=1){$(e)}function oe(e=1){$(-e)}function ue({width:e,height:t}){c.width=e,c.height=t}function ie(e){return e.date===d.value}function se(){const e={height:convertToUnit(ae.value)};return h("div",{ref:n,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[le(),de()])}function le(){const e=p["head-resources"],t=convertToUnit(ae.value),a={timestamps:P,date:m.modelValue,resources:m.modelResources};return h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...Z("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function de(){return h("div",{ref:r,class:{"q-calendar-resource__head--intervals":!0}},[P.value.map(e=>e.map((e,t)=>ce(e,t)))])}function ce(e,t){const a=p["interval-label"],n=!0!==m.noActiveDate&&ie(e),r=convertToUnit(M.value),o=convertToUnit(ae.value),u=m.shortIntervalLabel,i=Y.value(e,u),s={timestamp:e,index:t,label:i};s.droppable=w.value===i;const l=m.intervalStyle||x,d={width:r,maxWidth:r,minWidth:r,height:o,...l({scope:s})},c="function"===typeof m.intervalClass?m.intervalClass({scope:s}):{},v=!0===m.focusable&&m.focusType.includes("interval");return h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",s)?w.value=i:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",s)?w.value=i:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",s)?w.value=i:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",s)?w.value=i:w.value="")},onFocus:e=>{!0===v&&(f.value=i)},...Z("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):i,useFocusHelper()])}function ve(){return h("div",{class:"q-calendar-resource__body"},[me()])}function me(){return h("div",{ref:t,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[fe()])}function pe(){return h("div",{},"No resources have been defined")}function fe(){return h("div",{class:"q-calendar-resource__day--container"},[se(),void 0===m.modelResources&&pe(),void 0!==m.modelResources&&ye()])}function ye(){const e={class:"q-calendar-resource__resources--body"};return h("div",e,he())}function he(e=void 0,a=0,n=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return ge(e,t,a,void 0!==e.children?e.expanded:n)})}function ge(e,t,a=0,n=!0){const r={};r.height="auto"===ee.value?ee.value:convertToUnit(ee.value),te.value>0&&(r.minHeight=convertToUnit(te.value));const o=h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[we(e,t,a,n),De(e,t)]);return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[he(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function we(t,e,a=0,n=!0){const r=p["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):ee.value?convertToUnit(ee.value):"auto",te.value>0&&(o.minHeight=convertToUnit(te.value));const u=m.resourceStyle||j,i=t[m.resourceLabel],s=!0===m.focusable&&m.focusType.includes("resource")&&!0===n,l={resource:t,timestamps:P,resourceIndex:e,indentLevel:a,label:i},d=t[m.resourceKey];l.droppable=D.value===d;const c="function"===typeof m.resourceClass?m.resourceClass({scope:l}):{};return h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{g.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:l})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",l)?D.value=d:D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",l)?D.value=d:D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",l)?D.value=d:D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",l)?D.value=d:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==S.value.onClickResource&&v("click-resource",{scope:l,event:e})},...Z("-resource",e=>{return{scope:l,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;v("resource-expanded",{expanded:t.expanded,scope:l})}}),h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):i]),useFocusHelper()]])}function De(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:P,resourceIndex:a,timeStartPosX:X,timeDurationWidth:B};return h("div",{class:"q-calendar-resource__resource--intervals"},[P.value.map(e=>e.map(e=>be(t,e,a))),e&&e({scope:n})])}function be(t,e,a){const n=p["resource-interval"],r=!0!==m.noActiveDate&&ie(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[m.resourceKey],i=e.time+"-"+u;o.droppable=b.value===i;const s=!0===m.focusable&&m.focusType.includes("time"),l=m.intervalStyle||x,d=convertToUnit(M.value),c={width:d,maxWidth:d,minWidth:d,...l({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):ee.value>0?convertToUnit(ee.value):"auto",te.value>0&&(c.minHeight=convertToUnit(te.value)),h("div",{key:i,ref:e=>{y.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",o)?b.value=i:b.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",o)?b.value=i:b.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",o)?b.value=i:b.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",o)?b.value=i:b.value="")},onFocus:e=>{!0===s&&(f.value=i)},...Z("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function ke(){if(H.value){const{start:a,end:n,maxDays:r}=q.value;i.value=a.date,s.value=n.date,l.value=r}const e=c.width>0,t=withDirectives(h("div",{class:"q-calendar-resource",key:i.value},[!0===e&&ve()]),[[ResizeObserver$1,ue]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>t)}}return watch([z],Q,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(d.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}d.value=e}f.value=e}),watch(d,(e,t)=>{if(d.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),watch(f,e=>{e&&(o.value=parseTimestamp(e))}),watch(o,e=>{y.value[f.value]?y.value[f.value].focus():J()}),onBeforeUpdate(()=>{y.value={};g.value={}}),onMounted(()=>{L()}),e({prev:oe,next:re,move:$,moveToToday:ne,updateCurrent:F,timeStartPosX:X,timeDurationWidth:B,widthToMinutes:K,scrollToTimeX:V}),()=>U()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarResource:QCalendarResource,install(e){e.component(QCalendarResource.name,QCalendarResource)}};export default Plugin;export{QCalendarResource,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const l in r)if(Array.isArray(r[l])&&2===r[l].length){const d=parsed(r[l][0]),c=parsed(r[l][1]);if(isBetweenDates(e,d,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[l]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,l=0){const d=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===d;if(d<getDayIdentifier(e))return c;while((!p||c.length<l)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>d&&c.length>=l,p)break;if(0!==n[v.weekday]){const f=copyTimestamp(v);updateFormatted(f),updateRelative(f,a),updateDisabled(f,r,o,u,i),c.push(f),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=reactive({width:0,height:0}),o=ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function l(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:l}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),u=computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),l=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=d(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function f(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:l,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:f}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useIntervalProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},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},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},useResourceProps={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:validateNumber},noSticky:Boolean};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const l=computed(()=>parseInt(o.intervalStart,10)),v=computed(()=>parseInt(o.intervalMinutes,10)),d=computed(()=>parseInt(o.intervalCount,10)),m=computed(()=>parseFloat(o.intervalHeight)),p=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=computed(()=>l.value*v.value),f=computed(()=>d.value*m.value),y=computed(()=>d.value*p.value),h=computed(()=>b(a.value)),g=computed(()=>k(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),D=computed(()=>{return w.value.map(e=>createIntervalList(e,l.value,v.value,d.value,t.now))});function b(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function T(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function _(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function M(e,t=[],a=[]){const n=T(t,e),{firstDay:r,lastDay:o,betweenDays:u}=_(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function I(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=D.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function F(e){}function C(e){}function O(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientY,d=(l-o.top)/m.value,c=Math.floor((a?Math.floor(d):d)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function R(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientY,d=(l-o.top)/m.value,c=Math.floor((a?Math.floor(d):d)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function x(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,l=(s&&s[0]?s[0]:i).clientX,d=(l-o.left)/p.value,c=Math.floor((a?Math.floor(d):d)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function A(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function H(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=j,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function q(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=j(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function U(e){return e/v.value*p.value}function z(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/p.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=d.value*v.value,o=(a-n)/r;let u=o*f.value;return t&&(u<0&&(u=0),u>f.value&&(u=f.value)),u}function j(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=d.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}return{parsedIntervalStart:l,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:f,bodyWidth:y,parsedWeekStart:h,parsedWeekEnd:g,days:w,intervals:D,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:T,checkIntervals:_,getIntervalClasses:M,getResourceClasses:I,showIntervalLabelDefault:E,showResourceLabelDefault:F,styleDefault:C,getTimestampAtEventInterval:O,getTimestampAtEvent:R,getTimestampAtEventX:x,getScopeForSlot:A,getScopeForSlotX:H,scrollToTime:q,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:j}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:l,weekdaySkips:d,direction:c,maxDays:v,times:m,emittedValue:p,emit:f}){function e(a=1){if(0!==a){let e=copyTimestamp(l.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===d.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,f("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:l,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",f))}function v(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",f),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function f(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:k();break;case 35:_();break;case 36:T();break;case 37:w();break;case 38:h();break;case 39:D();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return d.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);d.value="prev";do{t=addToDate(t,{day:-1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);d.value="next";do{t=addToDate(t,{day:1})}while(0===l.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));d.value="prev",r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===l.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));d.value="next",r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function _(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===l.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarResource=defineComponent({name:"QCalendarResource",props:{...useCommonProps,...useResourceProps,...useIntervalProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-interval"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-time"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-resource")],setup(m,{slots:p,emit:v,expose:e}){const t=ref(null),a=ref(null),n=ref(null),r=ref(null),f=ref(null),o=ref(null),y=ref({}),g=ref({}),u=ref("next"),i=ref(today()),s=ref("0000-00-00"),l=ref(0),d=ref(m.modelValue),c=reactive({width:0,height:0}),w=ref(!1),D=ref(!1),b=ref(!1),k=ref(null),T=ref(null),_=computed(()=>{return"day"}),M=computed(()=>{return parseInt(m.cellWidth,10)}),I=getCurrentInstance();if(null===I)throw new Error("current instance is null");const{emitListeners:S}=useEmitListeners(I),{times:N,setCurrent:E,updateCurrent:F}=useTimes(m);F(),E();const{weekdaySkips:C,parsedStart:O,parsedEnd:R,dayStyleDefault:x}=useCommon(m,{startDate:i,endDate:s,times:N}),A=computed(()=>{return parseTimestamp(m.modelValue,N.now)||O.value||N.today});o.value=A.value,f.value=A.value.date;const H=computed(()=>{if(0===l.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===z.value||0===z.value.length)return!0;const e=z.value[0];const t=z.value[z.value.length-1];return!0!==isBetweenDates(A.value,e,t)}),{renderValues:q}=useRenderValues(m,{parsedView:_,times:N,parsedValue:A}),{rootRef:W,__initCalendar:L,__renderCalendar:U}=useCalendar(m,ke,{scrollArea:t,pane:a}),{days:z,intervals:P,intervalFormatter:Y,styleDefault:j,scrollToTimeX:V,timeDurationWidth:B,timeStartPosX:X,widthToMinutes:K}=useInterval(m,{weekdaySkips:C,times:N,scrollArea:t,parsedStart:O,parsedEnd:R,maxDays:l,size:c,headerColumnRef:r}),{move:$}=useMove(m,{parsedView:_,parsedValue:A,weekdaySkips:C,direction:u,maxDays:l,times:N,emittedValue:d,emit:v}),{getDefaultMouseEventHandlers:Z}=useMouse(v,S),{checkChange:Q}=useCheckChange(v,{days:z,lastStart:k,lastEnd:T}),{isKeyCode:G}=useEvents(),{tryFocus:J}=useKeyboard(m,{rootRef:W,focusRef:f,focusValue:o,datesRef:y,days:z,parsedView:_,parsedValue:A,emittedValue:d,weekdaySkips:C,direction:u,times:N}),ee=computed(()=>{const e=parseInt(m.resourceHeight,10);if(0===e)return"auto";return e}),te=computed(()=>{return parseInt(m.resourceMinHeight,10)}),ae=computed(()=>{return parseInt(m.intervalHeaderHeight,10)});function ne(){d.value=today()}function re(e=1){$(e)}function oe(e=1){$(-e)}function ue({width:e,height:t}){c.width=e,c.height=t}function ie(e){return e.date===d.value}function se(){const e={height:convertToUnit(ae.value)};return h("div",{ref:n,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==m.noSticky},style:e},[le(),de()])}function le(){const e=p["head-resources"],t=convertToUnit(ae.value),a={timestamps:P,date:m.modelValue,resources:m.modelResources};return h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==m.noSticky},style:{height:t},...Z("-head-resources",e=>{return{scope:a,event:e}})},[e&&e({scope:a})])}function de(){return h("div",{ref:r,class:{"q-calendar-resource__head--intervals":!0}},[P.value.map(e=>e.map((e,t)=>ce(e,t)))])}function ce(e,t){const a=p["interval-label"],n=!0!==m.noActiveDate&&ie(e),r=convertToUnit(M.value),o=convertToUnit(ae.value),u=m.shortIntervalLabel,i=Y.value(e,u),s={timestamp:e,index:t,label:i};s.droppable=w.value===i;const l=m.intervalStyle||x,d={width:r,maxWidth:r,minWidth:r,height:o,...l({scope:s})},c="function"===typeof m.intervalClass?m.intervalClass({scope:s}):{},v=!0===m.focusable&&m.focusType.includes("interval");return h("div",{key:i,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":n,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===v},style:d,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"interval",s)?w.value=i:w.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"interval",s)?w.value=i:w.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"interval",s)?w.value=i:w.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"interval",s)?w.value=i:w.value="")},onFocus:e=>{!0===v&&(f.value=i)},...Z("-interval",e=>{return{scope:s,event:e}})},[a?a({scope:s}):i,useFocusHelper()])}function ve(){return h("div",{class:"q-calendar-resource__body"},[me()])}function me(){return h("div",{ref:t,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[fe()])}function pe(){return h("div",{},"No resources have been defined")}function fe(){return h("div",{class:"q-calendar-resource__day--container"},[se(),void 0===m.modelResources&&pe(),void 0!==m.modelResources&&ye()])}function ye(){const e={class:"q-calendar-resource__resources--body"};return h("div",e,he())}function he(e=void 0,a=0,n=!0){return void 0===e&&(e=m.modelResources),e.map((e,t)=>{return ge(e,t,a,void 0!==e.children?e.expanded:n)})}function ge(e,t,a=0,n=!0){const r={};r.height="auto"===ee.value?ee.value:convertToUnit(ee.value),te.value>0&&(r.minHeight=convertToUnit(te.value));const o=h("div",{key:e[m.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[we(e,t,a,n),De(e,t)]);return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[he(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function we(t,e,a=0,n=!0){const r=p["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):ee.value?convertToUnit(ee.value):"auto",te.value>0&&(o.minHeight=convertToUnit(te.value));const u=m.resourceStyle||j,i=t[m.resourceLabel],s=!0===m.focusable&&m.focusType.includes("resource")&&!0===n,l={resource:t,timestamps:P,resourceIndex:e,indentLevel:a,label:i},d=t[m.resourceKey];l.droppable=D.value===d;const c="function"===typeof m.resourceClass?m.resourceClass({scope:l}):{};return h("div",{key:t[m.resourceKey]+"-"+e,ref:e=>{g.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource":0===a,"q-calendar-resource__resource--section":0!==a,...c,"q-calendar__sticky":!0!==m.noSticky,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:l})},onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"resource",l)?D.value=d:D.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"resource",l)?D.value=d:D.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"resource",l)?D.value=d:D.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"resource",l)?D.value=d:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==S.value.onClickResource&&v("click-resource",{scope:l,event:e})},...Z("-resource",e=>{return{scope:l,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;v("resource-expanded",{expanded:t.expanded,scope:l})}}),h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:l}):i]),useFocusHelper()]])}function De(t,a){const e=p["resource-intervals"],n={resource:t,timestamps:P,resourceIndex:a,timeStartPosX:X,timeDurationWidth:B};return h("div",{class:"q-calendar-resource__resource--intervals"},[P.value.map(e=>e.map(e=>be(t,e,a))),e&&e({scope:n})])}function be(t,e,a){const n=p["resource-interval"],r=!0!==m.noActiveDate&&ie(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:a},u=t[m.resourceKey],i=e.time+"-"+u;o.droppable=b.value===i;const s=!0===m.focusable&&m.focusType.includes("time"),l=m.intervalStyle||x,d=convertToUnit(M.value),c={width:d,maxWidth:d,minWidth:d,...l({scope:o})};return c.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):ee.value>0?convertToUnit(ee.value):"auto",te.value>0&&(c.minHeight=convertToUnit(te.value)),h("div",{key:i,ref:e=>{y.value[t[m.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===m.hoverable,"q-calendar__focusable":!0===s},style:c,onDragenter:e=>{void 0!==m.dragEnterFunc&&"function"===typeof m.dragEnterFunc&&(!0===m.dragEnterFunc(e,"time",o)?b.value=i:b.value="")},onDragover:e=>{void 0!==m.dragOverFunc&&"function"===typeof m.dragOverFunc&&(!0===m.dragOverFunc(e,"time",o)?b.value=i:b.value="")},onDragleave:e=>{void 0!==m.dragLeaveFunc&&"function"===typeof m.dragLeaveFunc&&(!0===m.dragLeaveFunc(e,"time",o)?b.value=i:b.value="")},onDrop:e=>{void 0!==m.dropFunc&&"function"===typeof m.dropFunc&&(!0===m.dropFunc(e,"time",o)?b.value=i:b.value="")},onFocus:e=>{!0===s&&(f.value=i)},...Z("-time",e=>{return{scope:o,event:e}})},[n&&n({scope:o}),useFocusHelper()])}function ke(){if(H.value){const{start:a,end:n,maxDays:r}=q.value;i.value=a.date,s.value=n.date,l.value=r}const e=c.width>0,t=withDirectives(h("div",{class:"q-calendar-resource",key:i.value},[!0===e&&ve()]),[[ResizeObserver$1,ue]]);if(!0!==m.animated)return t;{const o="q-calendar--"+("prev"===u.value?m.transitionPrev:m.transitionNext);return h(Transition,{name:o,appear:!0},()=>t)}}return watch([z],Q,{deep:!0,immediate:!0}),watch(()=>m.modelValue,(e,t)=>{if(d.value!==e){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}d.value=e}f.value=e}),watch(d,(e,t)=>{if(d.value!==m.modelValue){if(!0===m.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));u.value=a>=n?"next":"prev"}v("update:model-value",e)}}),watch(f,e=>{e&&(o.value=parseTimestamp(e))}),watch(o,e=>{y.value[f.value]?y.value[f.value].focus():J()}),onBeforeUpdate(()=>{y.value={};g.value={}}),onMounted(()=>{L()}),e({prev:oe,next:re,move:$,moveToToday:ne,updateCurrent:F,timeStartPosX:X,timeDurationWidth:B,widthToMinutes:K,scrollToTimeX:V}),()=>U()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarResource:QCalendarResource,install(e){e.component(QCalendarResource.name,QCalendarResource)}};export default Plugin;export{QCalendarResource,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarResource={},e.Vue))})(this,function(e,De){"use strict";const n=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,a=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,y=31,l=12,u=1,p=1,i=7,s=60,d=24,c=6048e5;function _e(){const e=new Date,t=""+(e.getMonth()+1),n=""+e.getDate(),a=e.getFullYear();return[a,C(t,2),C(n,2)].join("-")}function P(e,t,n){let a=Q(e);if(1===a.day||0===a.weekday)while(!t.includes(a.weekday))a=E(a);return a=H(a,t[0],M),a=k(a),n&&(a=$(a,n,a.hasTime)),a}function X(e,t,n){let a=Q(e);const r=x(a.year,a.month);if(r===a.day||6===a.weekday)while(!t.includes(a.weekday))a=M(a);return a=H(a,t[t.length-1],E),a=k(a),n&&(a=$(a,n,a.hasTime)),a}function F(e){const t=Q(e);return t.day=p,k(t),t}function q(e){const t=Q(e);return t.day=x(t.year,t.month),k(t),t}function K(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=a.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!n.exec(e)}function Se(e){const t=n.exec(e);return t?{date:e,time:C(parseInt(t[6],10)||0,2)+":"+C(parseInt(t[8],10)||0,2),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 Fe(e,t){let n=Se(e);return null===n?null:(n=k(n),t&&$(n,t,n.hasTime),n)}function f(e){return k({date:C(e.getFullYear(),4)+"-"+C(e.getMonth()+1,2)+"-"+C(e.getDate(),2),time:C(e.getHours()||0,2)+":"+C(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function qe(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function h(e){return 100*e.hour+e.minute}function Y(e){return qe(e)+h(e)}function $(e,t,n=!1){let a=qe(t),r=qe(e),o=a===r;return e.hasTime&&n&&o&&(a=h(t),r=h(e),o=a===r),e.past=r<a,e.current=o,e.future=r>a,e}function Z(e,t,n){return e.hasTime=!0,e.hour=Math.floor(t/s),e.minute=t%s,e.time=I(e),n&&$(e,n,!0),e}function g(e){return e.weekday=_(e),e}function w(e){return e.doy=m(e),e}function b(e,t,n,a,r){const o=qe(e);if(void 0!==t){const u=qe(Se(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==n){const l=qe(Se(n));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(const i in a)if(a[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const d=Se(r[s][0]),c=Se(r[s][1]);if(xe(e,d,c)){e.disabled=!0;break}}else{const v=qe(Fe(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=I(e),e.date=T(e),e.weekday=_(e),e.doy=m(e),e.workweek=D(e),e}function m(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 D(e){let t;if(t=0===e.year?Date.UTC(new Date):O(e),isNaN(t))return 0;const n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);const a=new Date(n.getFullYear(),0,4);a.setDate(a.getDate()-(a.getDay()+6)%7+3);const r=n.getTimezoneOffset()-a.getTimezoneOffset();n.setHours(n.getHours()-r);const o=(n-a)/c;return 1+Math.floor(o)}function _(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,a=e.day,r=(e.month+9)%l+1,o=n(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((a+n(2.6*r-.2)-2*o+u+n(u/4)+n(o/4))%7+7)%7}return t}function S(e){return 1===(e%4===0^e%100===0^e%400===0)}function x(e,t){return(S(e)?o:r)[t]}function Q(e){return{...e}}function C(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function T(e){let t=`${C(e.year,4)}-${C(e.month,2)}`;return e.hasDay&&(t+=`-${C(e.day,2)}`),t}function I(e){return e.hasTime?`${C(e.hour,2)}:${C(e.minute,2)}`:""}function G(e){return T(e)+" "+(e.hasTime?I(e):"00:00")}function E(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>t&&e.day>x(e.year,e.month)&&(e.day=p,++e.month,e.month>l&&(e.month=u,++e.year)),e}function M(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<p&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=x(e.year,e.month)),e}function A(e,t=E,n=1,a=[0,1,2,3,4,5,6]){return j(e,t,n,a)}function j(e,t=E,n=1,a=[0,1,2,3,4,5,6]){a.includes(e.weekday)||0!==e.weekday||t!==E||++n;while(--n>=0)e=t(e),a.length<7&&!a.includes(e.weekday)&&++n;return e}function H(e,t,n=E,a=6){while(e.weekday!==t&&--a>=0)e=n(e);return e}function R(t){const e=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)a[t[e]]=1;for(let n=0;n<i;++n){let t=1;for(let e=1;e<i;++e){const r=(n+e)%i;if(a[r])break;++t}e[n]=a[n]*t}return e}function J(e,t,n,a,r,o,u=[],l=[],i=42,s=0){const d=qe(t),c=[];let v=Q(e),f=0,h=f===d;if(d<qe(e))return c;while((!h||c.length<s)&&c.length<i){if(f=qe(v),h=h||f>d&&c.length>=s,h)break;if(0!==a[v.weekday]){const m=Q(v);k(m),$(m,n),b(m,r,o,u,l),c.push(m),v=j(v,E)}else v=j(v,E)}return c}function ee(t,n,a,r,o){const u=[];for(let e=0;e<r;++e){const l=(n+e)*a,i=Q(t);u.push(Z(i,l,o))}return u}function te(a,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(a||void 0,r(t,e));return n.format(L(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${G(t)}`),""}}}function O(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function L(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function N(e){return isFinite(parseInt(e,10))}function xe(e,t,n,a){const r=qe(e)+(!0===a?h(e):0),o=qe(t)+(!0===a?h(t):0),u=qe(n)+(!0===a?h(n):0);return r>=o&&r<=u}function ne(e,t){const a=Q(e);let r;return B(t,(e,t)=>{if(void 0!==a[t]){a[t]+=parseInt(e,10);const n=W.indexOf(t);-1!==n&&(r=void 0===r?n:Math.min(n,r))}}),void 0!==r&&re(a,W[r]),k(a),a}const W=["minute","hour","day","month"];function B(t,n){Object.keys(t).forEach(e=>n(t[e],e))}function V(e){if(e.minute>=s||e.minute<0){const t=Math.floor(e.minute/s);e.minute-=t*s,e.hour+=t,z(e)}return e}function z(e){if(e.hour>=d||e.hour<0){const t=Math.floor(e.hour/d);e.hour-=t*d,e.day+=t,U(e)}return e}function U(t){ae(t);let n=x(t.year,t.month);if(t.day>n){++t.month,t.month>l&&ae(t);let e=t.day-n;n=x(t.year,t.month);do{e>n&&(++t.month,t.month>l&&ae(t),e-=n,n=x(t.year,t.month))}while(e>n);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&ae(t),n=x(t.year,t.month);do{e>n&&(e-=n,--t.month,t.month<=0&&ae(t),n=x(t.year,t.month))}while(e>n);t.day=n-e}return t}function ae(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function re(e,t){switch(t){case"minute":return V(e);case"hour":return z(e);case"day":return U(e);case"month":return ae(e)}}function Ce(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}var Te={name:"ResizeObserver",mounted(e,{value:t}){if(t){const n={};n.callback=t,n.size={width:0,height:0},n.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.callback(n.size))}),n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ie(t,n,{scrollArea:e,pane:a}){if(!n){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=De.reactive({width:0,height:0}),o=De.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=De.computed(()=>{return!0!==t.noScroll&&e.value&&a.value&&r.height?e.value.offsetWidth-a.value.offsetWidth:0});function i(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return De.withDirectives(De.h("div",e,[n()]),[[Te,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:s}}const oe={modelValue:{type:String,default:_e(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function Ee(r,{startDate:e,endDate:t,times:n}){const a=De.computed(()=>R(r.weekdays)),o=De.computed(()=>Fe(e.value)),u=De.computed(()=>{if("0000-00-00"===t.value)return h(o.value);return Fe(t.value)}),l=De.computed(()=>{const n={timeZone:"UTC",day:"numeric"};return te(r.locale,(e,t)=>n)}),i=De.computed(()=>{const n={timeZone:"UTC",weekday:"long"};const a={timeZone:"UTC",weekday:"short"};return te(r.locale,(e,t)=>t?a:n)}),s=De.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return te(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const a=qe(t),r=qe(Se(e[0])),o=qe(Se(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function v(e,t=!1,n=[],a=[],r=!1){const o=d(n,e),{firstDay:u,lastDay:l,betweenDays:i}=c(a,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function f(e){return P(e,r.weekdays,n.today)}function h(e){return X(e,r.weekdays,n.today)}function m(e){}return{weekdaySkips:a,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:f,endOfWeek:h,dayStyleDefault:m}}function ue(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function le(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ie(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function se(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function de(a,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=ie(a);o<=0?l!==r&&ue(a,r):requestAnimationFrame(e=>{const t=e-u;const n=l+(r-l)/Math.max(t,o)*t;ue(a,n);n!==r&&de(a,r,o-t,e)})}function ce(a,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=se(a);o<=0?l!==r&&le(a,r):requestAnimationFrame(e=>{const t=e-u;const n=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(a,n);n!==r&&ce(a,r,o-t,e)})}const ve={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:N},intervalMinutes:{type:[Number,String],default:60,validator:N},intervalStart:{type:[Number,String],default:0,validator:N},intervalCount:{type:[Number,String],default:24,validator:N},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},fe={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:N},resourceMinHeight:{type:[Number,String],default:70,validator:N},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:N},noSticky:Boolean};function Me(o,{weekdaySkips:e,times:t,scrollArea:a,parsedStart:n,parsedEnd:r,maxDays:u,size:l,headerColumnRef:i}){const s=De.computed(()=>parseInt(o.intervalStart,10)),h=De.computed(()=>parseInt(o.intervalMinutes,10)),d=De.computed(()=>parseInt(o.intervalCount,10)),m=De.computed(()=>parseFloat(o.intervalHeight)),f=De.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),y=De.computed(()=>s.value*h.value),c=De.computed(()=>d.value*m.value),v=De.computed(()=>d.value*f.value),p=De.computed(()=>k(n.value)),g=De.computed(()=>D(r.value)),w=De.computed(()=>{return J(n.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=De.computed(()=>{return w.value.map(e=>ee(e,s.value,h.value,d.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function D(e){return X(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(G(t))}function S(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const a=Y(t),r=Y(Se(e[0])),o=Y(Se(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function F(e,t=[],n=[]){const a=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=S(n,e);return{"q-selected":a,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function q(e,t=0,n){return[]}const x=De.computed(()=>{const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return te(o.locale,(e,t)=>t?0===e.minute?r:a:n)}),C=De.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return te(o.locale,e=>t)});function T(e){const t=b.value[0][0],n=t.hour===e.hour&&t.minute===e.minute;return!n&&0===e.minute}function I(e){}function E(e){}function M(e,t,n=!1,a=void 0){let r=Q(t);const o=e.currentTarget.getBoundingClientRect(),u=y.value,l=e,i=e,s=l.changedTouches||l.touches,d=(s&&s[0]?s[0]:i).clientY,c=(d-o.top)/m.value,v=Math.floor((n?Math.floor(c):c)*h.value),f=u+v;return 0!==f&&(r=ne(r,{minute:f})),a&&$(r,a,!0),r}function A(e,t,n=!1,a=void 0){const r=Q(t),o=e.currentTarget.getBoundingClientRect(),u=y.value,l=e,i=e,s=l.changedTouches||l.touches,d=(s&&s[0]?s[0]:i).clientY,c=(d-o.top)/m.value,v=Math.floor((n?Math.floor(c):c)*h.value),f=u+v;return Z(r,f,a)}function j(e,t,n=!1,a=void 0){const r=Q(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,s=(i&&i[0]?i[0]:l).clientX,d=(s-o.left)/f.value,c=Math.floor((n?Math.floor(d):d)*h.value),v=c+(60*t.hour+t.minute);return Z(r,v,a)}function H(e,t){const n={timestamp:e};return n.timeStartPos=z,n.timeDurationHeight=N,void 0!==t&&(n.columnIndex=t),n}function R(e,t){const n={timestamp:Q(e)};return n.timeStartPosX=U,n.timeDurationWidth=W,void 0!==t&&(n.index=t),n}function O(e,t=0){const n=z(e);return!(!1===n||!a.value)&&(de(a.value,n,t),!0)}function L(e,t=0){const n=U(e);return!(!1===n||!a.value)&&(ce(a.value,n,t),!0)}function N(e){return e/h.value*m.value}function W(e){return e/h.value*f.value}function B(e){return parseInt(e,10)*h.value/m.value}function V(e){return parseInt(e,10)*h.value/f.value}function z(e,t=!0){const n=K(e);if(!1===n)return!1;const a=y.value,r=d.value*h.value,o=(n-a)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function U(e,t=!0){const n=K(e);if(!1===n)return!1;const a=y.value,r=d.value*h.value,o=(n-a)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:s,parsedIntervalMinutes:h,parsedIntervalCount:d,parsedIntervalHeight:m,parsedCellWidth:f,parsedStartMinute:y,bodyHeight:c,bodyWidth:v,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:x,ariaDateTimeFormatter:C,arrayHasDateTime:_,checkIntervals:S,getIntervalClasses:F,getResourceClasses:q,showIntervalLabelDefault:T,showResourceLabelDefault:I,styleDefault:E,getTimestampAtEventInterval:M,getTimestampAtEvent:A,getTimestampAtEventX:j,getScopeForSlot:H,getScopeForSlotX:R,scrollToTime:O,scrollToTimeX:L,timeDurationHeight:N,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:V,timeStartPos:z,timeStartPosX:U}}const he={columnCount:{type:[Number,String],default:0,validator:N},columnIndexStart:{type:[Number,String],default:0,validator:N}},me={maxDays:{type:Number,default:1}},ye={now:{type:String,validator:e=>""===e||v(e),default:""}};function Ae(e){const t=De.reactive({now:Fe("0000-00-00 00:00"),today:Fe("0000-00-00")}),n=De.computed(()=>e.now?Fe(e.now):o());function a(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=n.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return f(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return De.watch(()=>n,e=>r()),{times:t,parsedNow:n,setCurrent:a,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function je(r,{parsedView:o,times:u,parsedValue:l}){const e=De.computed(()=>{const e=l.value;let t=r.maxDays;let n=e;let a=e;switch(o.value){case"month":n=F(e),a=q(e),t=x(n.year,n.month);break;case"week":case"week-agenda":case"week-scheduler":n=P(e,r.weekdays,u.today),a=X(n,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":a=A(Q(a),E,t>1?t-1:t,r.weekdays),k(a);break;case"month-interval":case"month-scheduler":case"month-agenda":n=F(e),a=q(e),k(a),t=x(n.year,n.month);break;case"resource":t=1,a=A(Q(a),E,t,r.weekdays),k(a);break}return{start:n,end:a,maxDays:t}});return{renderValues:e}}const pe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let ge,we;function be(e,n){const t={};for(const a in e){const r=e[a],o=pe("on-"+a);if(void 0===ge)return void console.warn("$listeners has not been set up");if(void 0!==ge.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),we(a,n(t,a)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function ke(e,t){return be(He(e),t)}function He(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function Re(e){return Object.keys(He(e))}function Oe(e,t){return we=e,ge=t,{getMouseEventHandlers:be,getDefaultMouseEventHandlers:ke,getMouseEventName:He,getRawMouseEvents:Re}}const Le=["moved"];function Ne(l,{parsedView:i,parsedValue:s,weekdaySkips:d,direction:c,maxDays:v,times:f,emittedValue:h,emit:m}){function e(n=1){if(0!==n){let e=Q(s.value);const a=n>0,r=a?E:M,o=a?y:p;let t=a?n:-n;c.value=a?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),g(e);while(0===d.value[e.weekday])e=ne(e,{day:!0===a?1:-1});break;case"week":case"week-agenda":case"week-scheduler":j(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":j(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":j(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),$(e,f.now),h.value=e.date,m("moved",e)}else h.value=_e()}return{move:e}}const We=/^on[A-Z]/;function Be(e=De.getCurrentInstance()){return{emitListeners:De.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===We.test(e)&&(t[e]=!0)});return t})}}function Ve(){return[De.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}const ze=["change"];function Ue(n,{days:a,lastStart:r,lastEnd:o}){function e(){if(a.value&&a.value.length>0){const e=a.value[0].date,t=a.value[a.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,n("change",{start:e,end:t,days:a.value}),!0}return!1}return{checkChange:e}}function Pe(){function e(t,{bubbles:n=!1,cancelable:a=!1}={}){try{return new CustomEvent(t,{bubbles:n,cancelable:a})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,n,a),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Xe}=Pe(),Ke={useNavigation:Boolean};function Ye(n,{rootRef:a,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:i,weekdaySkips:s,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",m))}function v(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",m),e=!1)}function f(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function h(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function m(e){f(e)&&Xe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(f(e)&&Xe(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:D();break;case 35:S();break;case 36:_();break;case 37:w();break;case 38:p();break;case 39:b();break;case 40:g();break}}function p(e){let t=Q(o.value);if("month"===l.value){if(t=ne(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ne(t,{minute:parseInt(n.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=Q(o.value);if("month"===l.value){if(t=ne(t,{day:7}),o.value.month!==t.month)return d.value="next",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ne(t,{minute:parseInt(n.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=Q(o.value);d.value="prev";do{t=ne(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=Q(o.value);d.value="next";do{t=ne(t,{day:1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function k(e){let t=Q(o.value);if("month"===l.value||"month-interval"===l.value){t=ne(t,{month:-1});const n=t.day<=15?1:-1;while(0===s.value[t.weekday])t=ne(t,{day:n})}else"day"===l.value?t=ne(t,{day:-1}):"week"===l.value&&(t=ne(t,{day:-7}));d.value="prev",r.value=t.date}function D(e){let t=Q(o.value);if("month"===l.value||"month-interval"===l.value){t=ne(t,{month:1});const n=t.day<=15?1:-1;while(0===s.value[t.weekday])t=ne(t,{day:n})}else"day"===l.value?t=ne(t,{day:1}):"week"===l.value&&(t=ne(t,{day:7}));d.value="next",r.value=t.date}function _(e){let t=Q(o.value);"month"===l.value||"month-interval"===l.value?t=F(t):"week"===l.value&&(t=P(t,n.weekdays,c.today));while(0===s.value[t.weekday])t=ne(t,{day:-1});r.value=t.date}function S(e){let t=Q(o.value);"month"===l.value||"month-interval"===l.value?t=q(t):"week"===l.value&&(t=X(t,n.weekdays,c.today));while(0===s.value[t.weekday])t=ne(t,{day:-1});r.value=t.date}return De.onBeforeUnmount(()=>{v()}),De.watch(()=>n.useNavigation,e=>{(!0===e?t:v)()}),!0===n.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:h}}var $e=De.defineComponent({name:"QCalendarResource",props:{...oe,...fe,...ve,...he,...me,...ye,...Ke},emits:["update:model-value","update:model-resources","resource-expanded",...ze,...Le,...Re("-date"),...Re("-interval"),...Re("-head-day"),...Re("-time"),...Re("-head-resources"),...Re("-resource")],setup(f,{slots:h,emit:v,expose:e}){const t=De.ref(null),n=De.ref(null),a=De.ref(null),r=De.ref(null),m=De.ref(null),o=De.ref(null),y=De.ref({}),p=De.ref({}),u=De.ref("next"),l=De.ref(_e()),i=De.ref("0000-00-00"),s=De.ref(0),d=De.ref(f.modelValue),c=De.reactive({width:0,height:0}),g=De.ref(!1),w=De.ref(!1),b=De.ref(!1),k=De.ref(null),D=De.ref(null),_=De.computed(()=>{return"day"}),S=De.computed(()=>{return parseInt(f.cellWidth,10)}),F=De.getCurrentInstance();if(null===F)throw new Error("current instance is null");const{emitListeners:q}=Be(F),{times:x,setCurrent:C,updateCurrent:T}=Ae(f);T(),C();const{weekdaySkips:I,parsedStart:E,parsedEnd:M,dayStyleDefault:A}=Ee(f,{startDate:l,endDate:i,times:x}),j=De.computed(()=>{return Fe(f.modelValue,x.now)||E.value||x.today});o.value=j.value,m.value=j.value.date;const H=De.computed(()=>{if(0===s.value)return!0;if("0000-00-00"===i.value)return!0;if(void 0===W.value||0===W.value.length)return!0;const e=W.value[0];const t=W.value[W.value.length-1];return!0!==xe(j.value,e,t)}),{renderValues:R}=je(f,{parsedView:_,times:x,parsedValue:j}),{rootRef:O,__initCalendar:L,__renderCalendar:N}=Ie(f,ke,{scrollArea:t,pane:n}),{days:W,intervals:B,intervalFormatter:V,styleDefault:z,scrollToTimeX:U,timeDurationWidth:P,timeStartPosX:X,widthToMinutes:K}=Me(f,{weekdaySkips:I,times:x,scrollArea:t,parsedStart:E,parsedEnd:M,maxDays:s,size:c,headerColumnRef:r}),{move:Y}=Ne(f,{parsedView:_,parsedValue:j,weekdaySkips:I,direction:u,maxDays:s,times:x,emittedValue:d,emit:v}),{getDefaultMouseEventHandlers:$}=Oe(v,q),{checkChange:Z}=Ue(v,{days:W,lastStart:k,lastEnd:D}),{isKeyCode:Q}=Pe(),{tryFocus:G}=Ye(f,{rootRef:O,focusRef:m,focusValue:o,datesRef:y,days:W,parsedView:_,parsedValue:j,emittedValue:d,weekdaySkips:I,direction:u,times:x}),J=De.computed(()=>{const e=parseInt(f.resourceHeight,10);if(0===e)return"auto";return e}),ee=De.computed(()=>{return parseInt(f.resourceMinHeight,10)}),te=De.computed(()=>{return parseInt(f.intervalHeaderHeight,10)});function ne(){d.value=_e()}function ae(e=1){Y(e)}function re(e=1){Y(-e)}function oe({width:e,height:t}){c.width=e,c.height=t}function ue(e){return e.date===d.value}function le(){const e={height:Ce(te.value)};return De.h("div",{ref:a,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==f.noSticky},style:e},[ie(),se()])}function ie(){const e=h["head-resources"],t=Ce(te.value),n={timestamps:B,date:f.modelValue,resources:f.modelResources};return De.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==f.noSticky},style:{height:t},...$("-head-resources",e=>{return{scope:n,event:e}})},[e&&e({scope:n})])}function se(){return De.h("div",{ref:r,class:{"q-calendar-resource__head--intervals":!0}},[B.value.map(e=>e.map((e,t)=>de(e,t)))])}function de(e,t){const n=h["interval-label"],a=!0!==f.noActiveDate&&ue(e),r=Ce(S.value),o=Ce(te.value),u=f.shortIntervalLabel,l=V.value(e,u),i={timestamp:e,index:t,label:l};i.droppable=g.value===l;const s=f.intervalStyle||A,d={width:r,maxWidth:r,minWidth:r,height:o,...s({scope:i})},c="function"===typeof f.intervalClass?f.intervalClass({scope:i}):{},v=!0===f.focusable&&f.focusType.includes("interval");return De.h("div",{key:l,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":a,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===v},style:d,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"interval",i)?g.value=l:g.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"interval",i)?g.value=l:g.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"interval",i)?g.value=l:g.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"interval",i)?g.value=l:g.value="")},onFocus:e=>{!0===v&&(m.value=l)},...$("-interval",e=>{return{scope:i,event:e}})},[n?n({scope:i}):l,Ve()])}function ce(){return De.h("div",{class:"q-calendar-resource__body"},[ve()])}function ve(){return De.h("div",{ref:t,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[he()])}function fe(){return De.h("div",{},"No resources have been defined")}function he(){return De.h("div",{class:"q-calendar-resource__day--container"},[le(),void 0===f.modelResources&&fe(),void 0!==f.modelResources&&me()])}function me(){const e={class:"q-calendar-resource__resources--body"};return De.h("div",e,ye())}function ye(e=void 0,n=0,a=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return pe(e,t,n,void 0!==e.children?e.expanded:a)})}function pe(e,t,n=0,a=!0){const r={};r.height="auto"===J.value?J.value:Ce(J.value),ee.value>0&&(r.minHeight=Ce(ee.value));const o=De.h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ge(e,t,n,a),we(e,t)]);return void 0!==e.children?[o,De.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===a,"q-calendar__child--collapsed":!0!==a}},[ye(e.children,n+1,!1===a?a:e.expanded)])]:[o]}function ge(t,e,n=0,a=!0){const r=h["resource-label"],o={};o.height=void 0!==t.height?Ce(parseInt(t.height,10)):J.value?Ce(J.value):"auto",ee.value>0&&(o.minHeight=Ce(ee.value));const u=f.resourceStyle||z,l=t[f.resourceLabel],i=!0===f.focusable&&f.focusType.includes("resource")&&!0===a,s={resource:t,timestamps:B,resourceIndex:e,indentLevel:n,label:l},d=t[f.resourceKey];s.droppable=w.value===d;const c="function"===typeof f.resourceClass?f.resourceClass({scope:s}):{};return De.h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{p.value[t[f.resourceKey]]=e},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource":0===n,"q-calendar-resource__resource--section":0!==n,...c,"q-calendar__sticky":!0!==f.noSticky,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===i},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",s)?w.value=d:w.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",s)?w.value=d:w.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",s)?w.value=d:w.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",s)?w.value=d:w.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==q.value.onClickResource&&v("click-resource",{scope:s,event:e})},...$("-resource",e=>{return{scope:s,event:e}})},[[De.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;v("resource-expanded",{expanded:t.expanded,scope:s})}}),De.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*n+2+"px"}},[r?r({scope:s}):l]),Ve()]])}function we(t,n){const e=h["resource-intervals"],a={resource:t,timestamps:B,resourceIndex:n,timeStartPosX:X,timeDurationWidth:P};return De.h("div",{class:"q-calendar-resource__resource--intervals"},[B.value.map(e=>e.map(e=>be(t,e,n))),e&&e({scope:a})])}function be(t,e,n){const a=h["resource-interval"],r=!0!==f.noActiveDate&&ue(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:n},u=t[f.resourceKey],l=e.time+"-"+u;o.droppable=b.value===l;const i=!0===f.focusable&&f.focusType.includes("time"),s=f.intervalStyle||A,d=Ce(S.value),c={width:d,maxWidth:d,minWidth:d,...s({scope:o})};return c.height=void 0!==t.height?Ce(parseInt(t.height,10)):J.value>0?Ce(J.value):"auto",ee.value>0&&(c.minHeight=Ce(ee.value)),De.h("div",{key:l,ref:e=>{y.value[t[f.resourceKey]]=e},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"time",o)?b.value=l:b.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"time",o)?b.value=l:b.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"time",o)?b.value=l:b.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"time",o)?b.value=l:b.value="")},onFocus:e=>{!0===i&&(m.value=l)},...$("-time",e=>{return{scope:o,event:e}})},[a&&a({scope:o}),Ve()])}function ke(){if(H.value){const{start:n,end:a,maxDays:r}=R.value;l.value=n.date,i.value=a.date,s.value=r}const e=c.width>0,t=De.withDirectives(De.h("div",{class:"q-calendar-resource",key:l.value},[!0===e&&ce()]),[[Te,oe]]);if(!0!==f.animated)return t;{const o="q-calendar--"+("prev"===u.value?f.transitionPrev:f.transitionNext);return De.h(De.Transition,{name:o,appear:!0},()=>t)}}return De.watch([W],Z,{deep:!0,immediate:!0}),De.watch(()=>f.modelValue,(e,t)=>{if(d.value!==e){if(!0===f.animated){const n=qe(Se(e)),a=qe(Se(t));u.value=n>=a?"next":"prev"}d.value=e}m.value=e}),De.watch(d,(e,t)=>{if(d.value!==f.modelValue){if(!0===f.animated){const n=qe(Se(e)),a=qe(Se(t));u.value=n>=a?"next":"prev"}v("update:model-value",e)}}),De.watch(m,e=>{e&&(o.value=Fe(e))}),De.watch(o,e=>{y.value[m.value]?y.value[m.value].focus():G()}),De.onBeforeUpdate(()=>{y.value={};p.value={}}),De.onMounted(()=>{L()}),e({prev:re,next:ae,move:Y,moveToToday:ne,updateCurrent:T,timeStartPosX:X,timeDurationWidth:P,widthToMinutes:K,scrollToTimeX:U}),()=>N()}}),Ze="@quasar/quasar-ui-qcalendar",Qe="4.0.0-beta.2",Ge="Jeff Galbraith <jeff@quasar.dev>",Je="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",et="MIT",tt="dist/index.esm.js",nt="dist/index.common.js",at="dist/types/index.d.ts",rt={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},ot={type:"github",url:"https://github.com/sponsors/hawkeye64"},ut={access:"public"},lt={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},it="https://github.com/quasarframework/quasar-ui-qcalendar/issues",st="https://github.com/quasarframework/quasar-ui-qcalendar",dt=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ct={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},vt={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},ft=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],ft={name:Ze,version:Qe,author:Ge,description:Je,license:et,module:tt,main:nt,typings:at,scripts:rt,funding:ot,publishConfig:ut,repository:lt,bugs:it,homepage:st,keywords:dt,vetur:ct,devDependencies:vt,browserslist:ft};const{version:ht}=ft;e.QCalendarResource=$e,e.version=ht,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarResource={},e.Vue))})(this,function(e,De){"use strict";const n=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,a=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,y=31,l=12,u=1,p=1,i=7,s=60,d=24,c=6048e5;function _e(){const e=new Date,t=""+(e.getMonth()+1),n=""+e.getDate(),a=e.getFullYear();return[a,T(t,2),T(n,2)].join("-")}function P(e,t,n){let a=Z(e);if(1===a.day||0===a.weekday)while(!t.includes(a.weekday))a=M(a);return a=R(a,t[0],A),a=k(a),n&&(a=$(a,n,a.hasTime)),a}function X(e,t,n){let a=Z(e);const r=C(a.year,a.month);if(r===a.day||6===a.weekday)while(!t.includes(a.weekday))a=A(a);return a=R(a,t[t.length-1],M),a=k(a),n&&(a=$(a,n,a.hasTime)),a}function F(e){const t=Z(e);return t.day=p,k(t),t}function q(e){const t=Z(e);return t.day=C(t.year,t.month),k(t),t}function K(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=a.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!n.exec(e)}function Se(e){const t=n.exec(e);return t?{date:e,time:T(parseInt(t[6],10)||0,2)+":"+T(parseInt(t[8],10)||0,2),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 Fe(e,t){let n=Se(e);return null===n?null:(n=k(n),t&&$(n,t,n.hasTime),n)}function f(e){return k({date:T(e.getFullYear(),4)+"-"+T(e.getMonth()+1,2)+"-"+T(e.getDate(),2),time:T(e.getHours()||0,2)+":"+T(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function qe(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function h(e){return 100*e.hour+e.minute}function Y(e){return qe(e)+h(e)}function $(e,t,n=!1){let a=qe(t),r=qe(e),o=a===r;return e.hasTime&&n&&o&&(a=h(t),r=h(e),o=a===r),e.past=r<a,e.current=o,e.future=r>a,e}function m(e,t,n){return e.hasTime=!0,e.hour=Math.floor(t/s),e.minute=t%s,e.time=E(e),n&&$(e,n,!0),e}function g(e){return e.weekday=S(e),e}function w(e){return e.doy=D(e),e}function b(e,t,n,a,r){const o=qe(e);if(void 0!==t){const u=qe(Se(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==n){const l=qe(Se(n));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(const i in a)if(a[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const d=Se(r[s][0]),c=Se(r[s][1]);if(xe(e,d,c)){e.disabled=!0;break}}else{const v=qe(Fe(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=E(e),e.date=I(e),e.weekday=S(e),e.doy=D(e),e.workweek=_(e),e}function D(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 _(e){let t;if(t=0===e.year?Date.UTC(new Date):L(e),isNaN(t))return 0;const n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);const a=new Date(n.getFullYear(),0,4);a.setDate(a.getDate()-(a.getDay()+6)%7+3);const r=n.getTimezoneOffset()-a.getTimezoneOffset();n.setHours(n.getHours()-r);const o=(n-a)/c;return 1+Math.floor(o)}function S(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,a=e.day,r=(e.month+9)%l+1,o=n(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((a+n(2.6*r-.2)-2*o+u+n(u/4)+n(o/4))%7+7)%7}return t}function x(e){return 1===(e%4===0^e%100===0^e%400===0)}function C(e,t){return(x(e)?o:r)[t]}function Z(e){return{...e}}function T(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function I(e){let t=`${T(e.year,4)}-${T(e.month,2)}`;return e.hasDay&&(t+=`-${T(e.day,2)}`),t}function E(e){return e.hasTime?`${T(e.hour,2)}:${T(e.minute,2)}`:""}function Q(e){return I(e)+" "+(e.hasTime?E(e):"00:00")}function M(e){return++e.day,e.weekday=(e.weekday+1)%i,e.day>t&&e.day>C(e.year,e.month)&&(e.day=p,++e.month,e.month>l&&(e.month=u,++e.year)),e}function A(e){return e.day--,e.weekday=(e.weekday+6)%i,e.day<p&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=C(e.year,e.month)),e}function j(e,t=M,n=1,a=[0,1,2,3,4,5,6]){return H(e,t,n,a)}function H(e,t=M,n=1,a=[0,1,2,3,4,5,6]){a.includes(e.weekday)||0!==e.weekday||t!==M||++n;while(--n>=0)e=t(e),a.length<7&&!a.includes(e.weekday)&&++n;return e}function R(e,t,n=M,a=6){while(e.weekday!==t&&--a>=0)e=n(e);return e}function O(t){const e=[1,1,1,1,1,1,1],a=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)a[t[e]]=1;for(let n=0;n<i;++n){let t=1;for(let e=1;e<i;++e){const r=(n+e)%i;if(a[r])break;++t}e[n]=a[n]*t}return e}function G(e,t,n,a,r,o,u=[],l=[],i=42,s=0){const d=qe(t),c=[];let v=Z(e),f=0,h=f===d;if(d<qe(e))return c;while((!h||c.length<s)&&c.length<i){if(f=qe(v),h=h||f>d&&c.length>=s,h)break;if(0!==a[v.weekday]){const m=Z(v);k(m),$(m,n),b(m,r,o,u,l),c.push(m),v=H(v,M)}else v=H(v,M)}return c}function J(t,n,a,r,o){const u=[];for(let e=0;e<r;++e){const l=(n+e)*a,i=Z(t);u.push(m(i,l,o))}return u}function ee(a,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(a||void 0,r(t,e));return n.format(N(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${Q(t)}`),""}}}function L(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function N(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function W(e){return isFinite(parseInt(e,10))}function xe(e,t,n,a){const r=qe(e)+(!0===a?h(e):0),o=qe(t)+(!0===a?h(t):0),u=qe(n)+(!0===a?h(n):0);return r>=o&&r<=u}function te(e,t){const a=Z(e);let r;return V(t,(e,t)=>{if(void 0!==a[t]){a[t]+=parseInt(e,10);const n=B.indexOf(t);-1!==n&&(r=void 0===r?n:Math.min(n,r))}}),void 0!==r&&re(a,B[r]),k(a),a}const B=["minute","hour","day","month"];function V(t,n){Object.keys(t).forEach(e=>n(t[e],e))}function z(e){if(e.minute>=s||e.minute<0){const t=Math.floor(e.minute/s);e.minute-=t*s,e.hour+=t,U(e)}return e}function U(e){if(e.hour>=d||e.hour<0){const t=Math.floor(e.hour/d);e.hour-=t*d,e.day+=t,ne(e)}return e}function ne(t){ae(t);let n=C(t.year,t.month);if(t.day>n){++t.month,t.month>l&&ae(t);let e=t.day-n;n=C(t.year,t.month);do{e>n&&(++t.month,t.month>l&&ae(t),e-=n,n=C(t.year,t.month))}while(e>n);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&ae(t),n=C(t.year,t.month);do{e>n&&(e-=n,--t.month,t.month<=0&&ae(t),n=C(t.year,t.month))}while(e>n);t.day=n-e}return t}function ae(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function re(e,t){switch(t){case"minute":return z(e);case"hour":return U(e);case"day":return ne(e);case"month":return ae(e)}}function Ce(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}var Te={name:"ResizeObserver",mounted(e,{value:t}){if(t){const n={};n.callback=t,n.size={width:0,height:0},n.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===n.size.width&&t.height===n.size.height||(n.size.width=t.width,n.size.height=t.height,n.callback(n.size))}),n.observer.observe(e),e.__onResizeObserver=n}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ie(t,n,{scrollArea:e,pane:a}){if(!n){const d="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(d),new Error(d)}const r=De.reactive({width:0,height:0}),o=De.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=De.computed(()=>{return!0!==t.noScroll&&e.value&&a.value&&r.height?e.value.offsetWidth-a.value.offsetWidth:0});function i(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return De.withDirectives(De.h("div",e,[n()]),[[Te,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:i,__renderCalendar:s}}const oe={modelValue:{type:String,default:_e(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function Ee(r,{startDate:e,endDate:t,times:n}){const a=De.computed(()=>O(r.weekdays)),o=De.computed(()=>Fe(e.value)),u=De.computed(()=>{if("0000-00-00"===t.value)return h(o.value);return Fe(t.value)}),l=De.computed(()=>{const n={timeZone:"UTC",day:"numeric"};return ee(r.locale,(e,t)=>n)}),i=De.computed(()=>{const n={timeZone:"UTC",weekday:"long"};const a={timeZone:"UTC",weekday:"short"};return ee(r.locale,(e,t)=>t?a:n)}),s=De.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return ee(r.locale,e=>t)});function d(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const a=qe(t),r=qe(Se(e[0])),o=qe(Se(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function v(e,t=!1,n=[],a=[],r=!1){const o=d(n,e),{firstDay:u,lastDay:l,betweenDays:i}=c(a,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===i),"q-disabled-day disabled":!0===e.disabled}}function f(e){return P(e,r.weekdays,n.today)}function h(e){return X(e,r.weekdays,n.today)}function m(e){}return{weekdaySkips:a,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:i,ariaDateFormatter:s,arrayHasDate:d,checkDays:c,getRelativeClasses:v,startOfWeek:f,endOfWeek:h,dayStyleDefault:m}}function ue(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function le(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ie(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function se(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function de(a,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=ie(a);o<=0?l!==r&&ue(a,r):requestAnimationFrame(e=>{const t=e-u;const n=l+(r-l)/Math.max(t,o)*t;ue(a,n);n!==r&&de(a,r,o-t,e)})}function ce(a,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=se(a);o<=0?l!==r&&le(a,r):requestAnimationFrame(e=>{const t=e-u;const n=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(a,n);n!==r&&ce(a,r,o-t,e)})}const ve={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},shortIntervalLabel:Boolean,intervalHeight:{type:[Number,String],default:40,validator:W},intervalMinutes:{type:[Number,String],default:60,validator:W},intervalStart:{type:[Number,String],default:0,validator:W},intervalCount:{type:[Number,String],default:24,validator:W},intervalStyle:{type:Function,default:null},intervalClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},showIntervalLabel:{type:Function,default:null},hour24Format:Boolean,timeClicksClamped:Boolean,dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}},fe={modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:W},resourceMinHeight:{type:[Number,String],default:70,validator:W},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},cellWidth:{type:[Number,String],default:100},intervalHeaderHeight:{type:[Number,String],default:20,validator:W},noSticky:Boolean};function Me(o,{weekdaySkips:e,times:t,scrollArea:a,parsedStart:n,parsedEnd:r,maxDays:u,size:l,headerColumnRef:i}){const s=De.computed(()=>parseInt(o.intervalStart,10)),v=De.computed(()=>parseInt(o.intervalMinutes,10)),d=De.computed(()=>parseInt(o.intervalCount,10)),f=De.computed(()=>parseFloat(o.intervalHeight)),h=De.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=De.computed(()=>s.value*v.value),m=De.computed(()=>d.value*f.value),y=De.computed(()=>d.value*h.value),p=De.computed(()=>k(n.value)),g=De.computed(()=>D(r.value)),w=De.computed(()=>{return G(n.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=De.computed(()=>{return w.value.map(e=>J(e,s.value,v.value,d.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function D(e){return X(e,o.weekdays,t.today)}function _(e,t){return e&&e.length>0&&e.includes(Q(t))}function S(e,t){const n={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const a=Y(t),r=Y(Se(e[0])),o=Y(Se(e[1]));n.firstDay=r===a,n.lastDay=o===a,n.betweenDays=r<a&&o>a}return n}function F(e,t=[],n=[]){const a=_(t,e),{firstDay:r,lastDay:o,betweenDays:u}=S(n,e);return{"q-selected":a,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function q(e,t=0,n){return[]}const x=De.computed(()=>{const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return ee(o.locale,(e,t)=>t?0===e.minute?r:a:n)}),C=De.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return ee(o.locale,e=>t)});function T(e){const t=b.value[0][0],n=t.hour===e.hour&&t.minute===e.minute;return!n&&0===e.minute}function I(e){}function E(e){}function M(e,t,n=!1,a=void 0){let r=Z(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,s=(i&&i[0]?i[0]:l).clientY,d=(s-o.top)/f.value,c=Math.floor((n?Math.floor(d):d)*v.value);return 0!==c&&(r=te(r,{minute:c})),a&&$(r,a,!0),r}function A(e,t,n=!1,a=void 0){const r=Z(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,s=(i&&i[0]?i[0]:l).clientY,d=(s-o.top)/f.value,c=Math.floor((n?Math.floor(d):d)*v.value);return 0!==c&&(r=te(r,{minute:c})),a&&$(r,a,!0),r}function j(e,t,n=!1,a=void 0){const r=Z(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,i=u.changedTouches||u.touches,s=(i&&i[0]?i[0]:l).clientX,d=(s-o.left)/h.value,c=Math.floor((n?Math.floor(d):d)*v.value);return 0!==c&&(r=te(r,{minute:c})),a&&$(r,a,!0),r}function H(e,t){const n={timestamp:e};return n.timeStartPos=z,n.timeDurationHeight=N,void 0!==t&&(n.columnIndex=t),n}function R(e,t){const n={timestamp:Z(e)};return n.timeStartPosX=U,n.timeDurationWidth=W,void 0!==t&&(n.index=t),n}function O(e,t=0){const n=z(e);return!(!1===n||!a.value)&&(de(a.value,n,t),!0)}function L(e,t=0){const n=U(e);return!(!1===n||!a.value)&&(ce(a.value,n,t),!0)}function N(e){return e/v.value*f.value}function W(e){return e/v.value*h.value}function B(e){return parseInt(e,10)*v.value/f.value}function V(e){return parseInt(e,10)*v.value/h.value}function z(e,t=!0){const n=K(e);if(!1===n)return!1;const a=c.value,r=d.value*v.value,o=(n-a)/r;let u=o*m.value;return t&&(u<0&&(u=0),u>m.value&&(u=m.value)),u}function U(e,t=!0){const n=K(e);if(!1===n)return!1;const a=c.value,r=d.value*v.value,o=(n-a)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}return{parsedIntervalStart:s,parsedIntervalMinutes:v,parsedIntervalCount:d,parsedIntervalHeight:f,parsedCellWidth:h,parsedStartMinute:c,bodyHeight:m,bodyWidth:y,parsedWeekStart:p,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:x,ariaDateTimeFormatter:C,arrayHasDateTime:_,checkIntervals:S,getIntervalClasses:F,getResourceClasses:q,showIntervalLabelDefault:T,showResourceLabelDefault:I,styleDefault:E,getTimestampAtEventInterval:M,getTimestampAtEvent:A,getTimestampAtEventX:j,getScopeForSlot:H,getScopeForSlotX:R,scrollToTime:O,scrollToTimeX:L,timeDurationHeight:N,timeDurationWidth:W,heightToMinutes:B,widthToMinutes:V,timeStartPos:z,timeStartPosX:U}}const he={columnCount:{type:[Number,String],default:0,validator:W},columnIndexStart:{type:[Number,String],default:0,validator:W}},me={maxDays:{type:Number,default:1}},ye={now:{type:String,validator:e=>""===e||v(e),default:""}};function Ae(e){const t=De.reactive({now:Fe("0000-00-00 00:00"),today:Fe("0000-00-00")}),n=De.computed(()=>e.now?Fe(e.now):o());function a(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=n.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return f(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return De.watch(()=>n,e=>r()),{times:t,parsedNow:n,setCurrent:a,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function je(r,{parsedView:o,times:u,parsedValue:l}){const e=De.computed(()=>{const e=l.value;let t=r.maxDays;let n=e;let a=e;switch(o.value){case"month":n=F(e),a=q(e),t=C(n.year,n.month);break;case"week":case"week-agenda":case"week-scheduler":n=P(e,r.weekdays,u.today),a=X(n,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":a=j(Z(a),M,t>1?t-1:t,r.weekdays),k(a);break;case"month-interval":case"month-scheduler":case"month-agenda":n=F(e),a=q(e),k(a),t=C(n.year,n.month);break;case"resource":t=1,a=j(Z(a),M,t,r.weekdays),k(a);break}return{start:n,end:a,maxDays:t}});return{renderValues:e}}const pe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let ge,we;function be(e,n){const t={};for(const a in e){const r=e[a],o=pe("on-"+a);if(void 0===ge)return void console.warn("$listeners has not been set up");if(void 0!==ge.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),we(a,n(t,a)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function ke(e,t){return be(He(e),t)}function He(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function Re(e){return Object.keys(He(e))}function Oe(e,t){return we=e,ge=t,{getMouseEventHandlers:be,getDefaultMouseEventHandlers:ke,getMouseEventName:He,getRawMouseEvents:Re}}const Le=["moved"];function Ne(l,{parsedView:i,parsedValue:s,weekdaySkips:d,direction:c,maxDays:v,times:f,emittedValue:h,emit:m}){function e(n=1){if(0!==n){let e=Z(s.value);const a=n>0,r=a?M:A,o=a?y:p;let t=a?n:-n;c.value=a?"next":"prev";const u=d.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),g(e);while(0===d.value[e.weekday])e=te(e,{day:!0===a?1:-1});break;case"week":case"week-agenda":case"week-scheduler":H(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":H(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":H(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),$(e,f.now),h.value=e.date,m("moved",e)}else h.value=_e()}return{move:e}}const We=/^on[A-Z]/;function Be(e=De.getCurrentInstance()){return{emitListeners:De.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===We.test(e)&&(t[e]=!0)});return t})}}function Ve(){return[De.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}const ze=["change"];function Ue(n,{days:a,lastStart:r,lastEnd:o}){function e(){if(a.value&&a.value.length>0){const e=a.value[0].date,t=a.value[a.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,n("change",{start:e,end:t,days:a.value}),!0}return!1}return{checkChange:e}}function Pe(){function e(t,{bubbles:n=!1,cancelable:a=!1}={}){try{return new CustomEvent(t,{bubbles:n,cancelable:a})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,n,a),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Xe}=Pe(),Ke={useNavigation:Boolean};function Ye(n,{rootRef:a,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:i,weekdaySkips:s,direction:d,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",y),document.addEventListener("keydown",m))}function v(){document&&(document.removeEventListener("keyup",y),document.removeEventListener("keydown",m),e=!1)}function f(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===a.value.contains(t))return!0}return!1}function h(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function m(e){f(e)&&Xe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function y(e){if(f(e)&&Xe(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:D();break;case 35:S();break;case 36:_();break;case 37:w();break;case 38:p();break;case 39:b();break;case 40:g();break}}function p(e){let t=Z(o.value);if("month"===l.value){if(t=te(t,{day:-7}),o.value.month!==t.month)return d.value="prev",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=te(t,{minute:parseInt(n.intervalMinutes)}));d.value="prev",r.value=t.date}function g(e){let t=Z(o.value);if("month"===l.value){if(t=te(t,{day:7}),o.value.month!==t.month)return d.value="next",void(i.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=te(t,{minute:parseInt(n.intervalMinutes)}));d.value="next",r.value=t.date}function w(e){let t=Z(o.value);d.value="prev";do{t=te(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function b(e){let t=Z(o.value);d.value="next";do{t=te(t,{day:1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===l.value)return void(i.value=t.date);r.value=t.date}function k(e){let t=Z(o.value);if("month"===l.value||"month-interval"===l.value){t=te(t,{month:-1});const n=t.day<=15?1:-1;while(0===s.value[t.weekday])t=te(t,{day:n})}else"day"===l.value?t=te(t,{day:-1}):"week"===l.value&&(t=te(t,{day:-7}));d.value="prev",r.value=t.date}function D(e){let t=Z(o.value);if("month"===l.value||"month-interval"===l.value){t=te(t,{month:1});const n=t.day<=15?1:-1;while(0===s.value[t.weekday])t=te(t,{day:n})}else"day"===l.value?t=te(t,{day:1}):"week"===l.value&&(t=te(t,{day:7}));d.value="next",r.value=t.date}function _(e){let t=Z(o.value);"month"===l.value||"month-interval"===l.value?t=F(t):"week"===l.value&&(t=P(t,n.weekdays,c.today));while(0===s.value[t.weekday])t=te(t,{day:-1});r.value=t.date}function S(e){let t=Z(o.value);"month"===l.value||"month-interval"===l.value?t=q(t):"week"===l.value&&(t=X(t,n.weekdays,c.today));while(0===s.value[t.weekday])t=te(t,{day:-1});r.value=t.date}return De.onBeforeUnmount(()=>{v()}),De.watch(()=>n.useNavigation,e=>{(!0===e?t:v)()}),!0===n.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:h}}var $e=De.defineComponent({name:"QCalendarResource",props:{...oe,...fe,...ve,...he,...me,...ye,...Ke},emits:["update:model-value","update:model-resources","resource-expanded",...ze,...Le,...Re("-date"),...Re("-interval"),...Re("-head-day"),...Re("-time"),...Re("-head-resources"),...Re("-resource")],setup(f,{slots:h,emit:v,expose:e}){const t=De.ref(null),n=De.ref(null),a=De.ref(null),r=De.ref(null),m=De.ref(null),o=De.ref(null),y=De.ref({}),p=De.ref({}),u=De.ref("next"),l=De.ref(_e()),i=De.ref("0000-00-00"),s=De.ref(0),d=De.ref(f.modelValue),c=De.reactive({width:0,height:0}),g=De.ref(!1),w=De.ref(!1),b=De.ref(!1),k=De.ref(null),D=De.ref(null),_=De.computed(()=>{return"day"}),S=De.computed(()=>{return parseInt(f.cellWidth,10)}),F=De.getCurrentInstance();if(null===F)throw new Error("current instance is null");const{emitListeners:q}=Be(F),{times:x,setCurrent:C,updateCurrent:T}=Ae(f);T(),C();const{weekdaySkips:I,parsedStart:E,parsedEnd:M,dayStyleDefault:A}=Ee(f,{startDate:l,endDate:i,times:x}),j=De.computed(()=>{return Fe(f.modelValue,x.now)||E.value||x.today});o.value=j.value,m.value=j.value.date;const H=De.computed(()=>{if(0===s.value)return!0;if("0000-00-00"===i.value)return!0;if(void 0===W.value||0===W.value.length)return!0;const e=W.value[0];const t=W.value[W.value.length-1];return!0!==xe(j.value,e,t)}),{renderValues:R}=je(f,{parsedView:_,times:x,parsedValue:j}),{rootRef:O,__initCalendar:L,__renderCalendar:N}=Ie(f,ke,{scrollArea:t,pane:n}),{days:W,intervals:B,intervalFormatter:V,styleDefault:z,scrollToTimeX:U,timeDurationWidth:P,timeStartPosX:X,widthToMinutes:K}=Me(f,{weekdaySkips:I,times:x,scrollArea:t,parsedStart:E,parsedEnd:M,maxDays:s,size:c,headerColumnRef:r}),{move:Y}=Ne(f,{parsedView:_,parsedValue:j,weekdaySkips:I,direction:u,maxDays:s,times:x,emittedValue:d,emit:v}),{getDefaultMouseEventHandlers:$}=Oe(v,q),{checkChange:Z}=Ue(v,{days:W,lastStart:k,lastEnd:D}),{isKeyCode:Q}=Pe(),{tryFocus:G}=Ye(f,{rootRef:O,focusRef:m,focusValue:o,datesRef:y,days:W,parsedView:_,parsedValue:j,emittedValue:d,weekdaySkips:I,direction:u,times:x}),J=De.computed(()=>{const e=parseInt(f.resourceHeight,10);if(0===e)return"auto";return e}),ee=De.computed(()=>{return parseInt(f.resourceMinHeight,10)}),te=De.computed(()=>{return parseInt(f.intervalHeaderHeight,10)});function ne(){d.value=_e()}function ae(e=1){Y(e)}function re(e=1){Y(-e)}function oe({width:e,height:t}){c.width=e,c.height=t}function ue(e){return e.date===d.value}function le(){const e={height:Ce(te.value)};return De.h("div",{ref:a,roll:"presentation",class:{"q-calendar-resource__head":!0,"q-calendar__sticky":!0!==f.noSticky},style:e},[ie(),se()])}function ie(){const e=h["head-resources"],t=Ce(te.value),n={timestamps:B,date:f.modelValue,resources:f.modelResources};return De.h("div",{class:{"q-calendar-resource__head--resources":!0,"q-calendar__sticky":!0!==f.noSticky},style:{height:t},...$("-head-resources",e=>{return{scope:n,event:e}})},[e&&e({scope:n})])}function se(){return De.h("div",{ref:r,class:{"q-calendar-resource__head--intervals":!0}},[B.value.map(e=>e.map((e,t)=>de(e,t)))])}function de(e,t){const n=h["interval-label"],a=!0!==f.noActiveDate&&ue(e),r=Ce(S.value),o=Ce(te.value),u=f.shortIntervalLabel,l=V.value(e,u),i={timestamp:e,index:t,label:l};i.droppable=g.value===l;const s=f.intervalStyle||A,d={width:r,maxWidth:r,minWidth:r,height:o,...s({scope:i})},c="function"===typeof f.intervalClass?f.intervalClass({scope:i}):{},v=!0===f.focusable&&f.focusType.includes("interval");return De.h("div",{key:l,tabindex:!0===v?0:-1,class:{"q-calendar-resource__head--interval":!0,...c,"q-active-date":a,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===v},style:d,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"interval",i)?g.value=l:g.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"interval",i)?g.value=l:g.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"interval",i)?g.value=l:g.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"interval",i)?g.value=l:g.value="")},onFocus:e=>{!0===v&&(m.value=l)},...$("-interval",e=>{return{scope:i,event:e}})},[n?n({scope:i}):l,Ve()])}function ce(){return De.h("div",{class:"q-calendar-resource__body"},[ve()])}function ve(){return De.h("div",{ref:t,class:{"q-calendar-resource__scroll-area":!0,"q-calendar__scroll":!0}},[he()])}function fe(){return De.h("div",{},"No resources have been defined")}function he(){return De.h("div",{class:"q-calendar-resource__day--container"},[le(),void 0===f.modelResources&&fe(),void 0!==f.modelResources&&me()])}function me(){const e={class:"q-calendar-resource__resources--body"};return De.h("div",e,ye())}function ye(e=void 0,n=0,a=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return pe(e,t,n,void 0!==e.children?e.expanded:a)})}function pe(e,t,n=0,a=!0){const r={};r.height="auto"===J.value?J.value:Ce(J.value),ee.value>0&&(r.minHeight=Ce(ee.value));const o=De.h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-resource__resource--row":!0},style:r},[ge(e,t,n,a),we(e,t)]);return void 0!==e.children?[o,De.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===a,"q-calendar__child--collapsed":!0!==a}},[ye(e.children,n+1,!1===a?a:e.expanded)])]:[o]}function ge(t,e,n=0,a=!0){const r=h["resource-label"],o={};o.height=void 0!==t.height?Ce(parseInt(t.height,10)):J.value?Ce(J.value):"auto",ee.value>0&&(o.minHeight=Ce(ee.value));const u=f.resourceStyle||z,l=t[f.resourceLabel],i=!0===f.focusable&&f.focusType.includes("resource")&&!0===a,s={resource:t,timestamps:B,resourceIndex:e,indentLevel:n,label:l},d=t[f.resourceKey];s.droppable=w.value===d;const c="function"===typeof f.resourceClass?f.resourceClass({scope:s}):{};return De.h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{p.value[t[f.resourceKey]]=e},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource":0===n,"q-calendar-resource__resource--section":0!==n,...c,"q-calendar__sticky":!0!==f.noSticky,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===i},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",s)?w.value=d:w.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",s)?w.value=d:w.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",s)?w.value=d:w.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",s)?w.value=d:w.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==q.value.onClickResource&&v("click-resource",{scope:s,event:e})},...$("-resource",e=>{return{scope:s,event:e}})},[[De.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;v("resource-expanded",{expanded:t.expanded,scope:s})}}),De.h("div",{class:{"q-calendar-resource__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*n+2+"px"}},[r?r({scope:s}):l]),Ve()]])}function we(t,n){const e=h["resource-intervals"],a={resource:t,timestamps:B,resourceIndex:n,timeStartPosX:X,timeDurationWidth:P};return De.h("div",{class:"q-calendar-resource__resource--intervals"},[B.value.map(e=>e.map(e=>be(t,e,n))),e&&e({scope:a})])}function be(t,e,n){const a=h["resource-interval"],r=!0!==f.noActiveDate&&ue(e),o={activeDate:r,resource:t,timestamp:e,resourceIndex:n},u=t[f.resourceKey],l=e.time+"-"+u;o.droppable=b.value===l;const i=!0===f.focusable&&f.focusType.includes("time"),s=f.intervalStyle||A,d=Ce(S.value),c={width:d,maxWidth:d,minWidth:d,...s({scope:o})};return c.height=void 0!==t.height?Ce(parseInt(t.height,10)):J.value>0?Ce(J.value):"auto",ee.value>0&&(c.minHeight=Ce(ee.value)),De.h("div",{key:l,ref:e=>{y.value[t[f.resourceKey]]=e},tabindex:!0===i?0:-1,class:{"q-calendar-resource__resource--interval":!0,"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===i},style:c,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"time",o)?b.value=l:b.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"time",o)?b.value=l:b.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"time",o)?b.value=l:b.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"time",o)?b.value=l:b.value="")},onFocus:e=>{!0===i&&(m.value=l)},...$("-time",e=>{return{scope:o,event:e}})},[a&&a({scope:o}),Ve()])}function ke(){if(H.value){const{start:n,end:a,maxDays:r}=R.value;l.value=n.date,i.value=a.date,s.value=r}const e=c.width>0,t=De.withDirectives(De.h("div",{class:"q-calendar-resource",key:l.value},[!0===e&&ce()]),[[Te,oe]]);if(!0!==f.animated)return t;{const o="q-calendar--"+("prev"===u.value?f.transitionPrev:f.transitionNext);return De.h(De.Transition,{name:o,appear:!0},()=>t)}}return De.watch([W],Z,{deep:!0,immediate:!0}),De.watch(()=>f.modelValue,(e,t)=>{if(d.value!==e){if(!0===f.animated){const n=qe(Se(e)),a=qe(Se(t));u.value=n>=a?"next":"prev"}d.value=e}m.value=e}),De.watch(d,(e,t)=>{if(d.value!==f.modelValue){if(!0===f.animated){const n=qe(Se(e)),a=qe(Se(t));u.value=n>=a?"next":"prev"}v("update:model-value",e)}}),De.watch(m,e=>{e&&(o.value=Fe(e))}),De.watch(o,e=>{y.value[m.value]?y.value[m.value].focus():G()}),De.onBeforeUpdate(()=>{y.value={};p.value={}}),De.onMounted(()=>{L()}),e({prev:re,next:ae,move:Y,moveToToday:ne,updateCurrent:T,timeStartPosX:X,timeDurationWidth:P,widthToMinutes:K,scrollToTimeX:U}),()=>N()}}),Ze="@quasar/quasar-ui-qcalendar",Qe="4.0.0-beta.3",Ge="Jeff Galbraith <jeff@quasar.dev>",Je="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",et="MIT",tt="dist/index.esm.js",nt="dist/index.common.js",at="dist/types/index.d.ts",rt={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},ot={type:"github",url:"https://github.com/sponsors/hawkeye64"},ut={access:"public"},lt={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},it="https://github.com/quasarframework/quasar-ui-qcalendar/issues",st="https://github.com/quasarframework/quasar-ui-qcalendar",dt=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ct={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},vt={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},ft=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],ft={name:Ze,version:Qe,author:Ge,description:Je,license:et,module:tt,main:nt,typings:at,scripts:rt,funding:ot,publishConfig:ut,repository:lt,bugs:it,homepage:st,keywords:dt,vetur:ct,devDependencies:vt,browserslist:ft};const{version:ht}=ft;e.QCalendarResource=$e,e.version=ht,Object.defineProperty(e,"__esModule",{value:!0})});
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var vue=require("vue");const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const l=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],s=[],i=42,d=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===l;if(l<getDayIdentifier(e))return c;while((!p||c.length<d)&&c.length<i){if(m=getDayIdentifier(v),p=p||m>l&&c.length>=d,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,s),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const s=(a+e)*n,i=copyTimestamp(t);u.push(updateMinutes(i,s,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const s=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:s,__initCalendar:i,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),s=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),i=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:s,betweenDays:i}=c(n,e);return{"q-past-day":!0!==u&&!0!==i&&!0!==s&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==i&&!0!==s&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===i,"q-range-last":!0===s,"q-range-hover":!0===r&&(!0===u||!0===s||!0===i),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:s,weekdayFormatter:i,ariaDateFormatter:d,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],s=getVerticalScrollPosition(n);o<=0?s!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=s+(r-s)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],s=getHorizontalScrollPosition(n);o<=0?s!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=s+(r-s)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:s,headerColumnRef:i}){const d=vue.computed(()=>parseInt(o.intervalStart,10)),p=vue.computed(()=>parseInt(o.intervalMinutes,10)),l=vue.computed(()=>parseInt(o.intervalCount,10)),y=vue.computed(()=>parseFloat(o.intervalHeight)),m=vue.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:s.width>0&&i.value&&(e=i.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),h=vue.computed(()=>d.value*p.value),c=vue.computed(()=>l.value*y.value),v=vue.computed(()=>l.value*m.value),f=vue.computed(()=>D(a.value)),g=vue.computed(()=>b(r.value)),w=vue.computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),_=vue.computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,p.value,l.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function b(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function x(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=h.value,s=e,i=e,d=s.changedTouches||s.touches,l=(d&&d[0]?d[0]:i).clientY,c=(l-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function A(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=h.value,s=e,i=e,d=s.changedTouches||s.touches,l=(d&&d[0]?d[0]:i).clientY,c=(l-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return updateMinutes(r,m,n)}function H(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,s=e,i=u.changedTouches||u.touches,d=(i&&i[0]?i[0]:s).clientX,l=(d-o.left)/m.value,c=Math.floor((a?Math.floor(l):l)*p.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function q(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function O(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=j,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function R(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=j(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/p.value*y.value}function U(e){return e/p.value*m.value}function z(e){return parseInt(e,10)*p.value/y.value}function P(e){return parseInt(e,10)*p.value/m.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=h.value,r=l.value*p.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function j(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=h.value,r=l.value*p.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:p,parsedIntervalCount:l,parsedIntervalHeight:y,parsedCellWidth:m,parsedStartMinute:h,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:g,days:w,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:k,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:C,styleDefault:x,getTimestampAtEventInterval:F,getTimestampAtEvent:A,getTimestampAtEventX:H,getScopeForSlot:q,getScopeForSlotX:O,scrollToTime:R,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:j}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),s(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function s(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:s}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:s}){const e=vue.computed(()=>{const e=s.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),s=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(s):t[u]=[t[u],s]:t[u]=s}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(s,{parsedView:i,parsedValue:d,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,s.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,s.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:s,emittedValue:i,weekdaySkips:d,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:b();break;case 35:T();break;case 36:k();break;case 37:w();break;case 38:f();break;case 39:_();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===s.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(i.value=t.date)}else"day"!==s.value&&"week"!==s.value&&"month-interval"!==s.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===s.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(i.value=t.date)}else"day"!==s.value&&"week"!==s.value&&"month-interval"!==s.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===s.value||"month-interval"===s.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===s.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===s.value)return void(i.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===s.value||"month-interval"===s.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===s.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===s.value)return void(i.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===s.value||"month-interval"===s.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===s.value?t=addToDate(t,{day:-1}):"week"===s.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===s.value||"month-interval"===s.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===s.value?t=addToDate(t,{day:1}):"week"===s.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);"month"===s.value||"month-interval"===s.value?t=getStartOfMonth(t):"week"===s.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===s.value||"month-interval"===s.value?t=getEndOfMonth(t):"week"===s.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarScheduler=vue.defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(h,{slots:f,emit:g,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),m=vue.ref(null),r=vue.ref(null),p=vue.ref({}),v=vue.ref({}),o=vue.ref({}),u=vue.ref({}),s=vue.ref("next"),i=vue.ref(h.modelValue||today()),d=vue.ref("0000-00-00"),l=vue.ref(0),w=vue.ref(h.modelValue),c=vue.reactive({width:0,height:0}),y=vue.ref(!1),_=vue.ref(!1),D=vue.ref(null),b=vue.ref(null),k=vue.computed(()=>{if("month"===h.view)return"month-interval";return h.view}),T=vue.getCurrentInstance();if(null===T)throw new Error("current instance is null");const{emitListeners:I}=useEmitListeners(T),{isSticky:M}=useCellWidth(h),{times:S,setCurrent:N,updateCurrent:E}=useTimes(h);E(),N();const{weekdaySkips:C,parsedStart:x,parsedEnd:F,dayFormatter:A,weekdayFormatter:H,ariaDateFormatter:q,dayStyleDefault:O,getRelativeClasses:R}=useCommon(h,{startDate:i,endDate:d,times:S}),W=vue.computed(()=>{return parseTimestamp(h.modelValue,S.now)||x.value||S.today});r.value=W.value,m.value=W.value.date;const L=vue.computed(()=>{if(0===l.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===B.value||0===B.value.length)return!0;const e=B.value[0];const t=B.value[B.value.length-1];return!0!==isBetweenDates(W.value,e,t)}),{renderValues:U}=useRenderValues(h,{parsedView:k,times:S,parsedValue:W}),{rootRef:z,scrollWidth:P,__initCalendar:Y,__renderCalendar:j}=useCalendar(h,Oe,{scrollArea:t,pane:a}),{days:B,parsedCellWidth:V,styleDefault:K}=useInterval(h,{weekdaySkips:C,times:S,scrollArea:t,parsedStart:x,parsedEnd:F,maxDays:l,size:c,headerColumnRef:n}),{move:$}=useMove(h,{parsedView:k,parsedValue:W,weekdaySkips:C,direction:s,maxDays:l,times:S,emittedValue:w,emit:g}),{getDefaultMouseEventHandlers:X}=useMouse(g,I),{checkChange:Z}=useCheckChange(g,{days:B,lastStart:D,lastEnd:b}),{isKeyCode:Q}=useEvents(),{tryFocus:G}=useKeyboard(h,{rootRef:z,focusRef:m,focusValue:r,datesRef:p,days:B,parsedView:k,parsedValue:W,emittedValue:w,weekdaySkips:C,direction:s,times:S}),J=vue.computed(()=>{{if("day"===h.view&&parseInt(h.columnCount,10)>1)return parseInt(h.columnCount,10);if("day"===h.view&&h.maxDays&&h.maxDays>1)return h.maxDays}return B.value.length}),ee=vue.computed(()=>{if(z.value)return parseInt(getComputedStyle(z.value).getPropertyValue("--calendar-resources-width"),10);return 0}),te=vue.computed(()=>{const e=parseInt(h.resourceHeight,10);if(0===e)return"auto";return e}),ae=vue.computed(()=>{return parseInt(h.resourceMinHeight,10)}),ne=vue.computed(()=>{if(z.value){const e=c.width||z.value.getBoundingClientRect().width;if(e&&ee.value&&J.value)return(e-P.value-ee.value)/J.value+"px"}return 100/J.value+"%"});function re(){w.value=today()}function oe(e=1){$(e)}function ue(e=1){$(-e)}function se({width:e,height:t}){c.width=e,c.height=t}function ie(e){return e.date===w.value}function de(){return vue.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===M.value},style:{marginRight:P.value+"px"}},[le(),ce()])}function le(){const e=f["head-resources"],t={days:B.value,timestamps:B.value,date:h.modelValue,resources:h.modelResources};return vue.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===M.value},...X("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ce(){return vue.h("div",{ref:n,class:{"q-calendar-scheduler__head--days__column":!0}},[ve(),me()])}function ve(){return vue.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...pe()])}function me(){const e=f["head-days-events"];return vue.nextTick(()=>{if(u.value&&0===parseInt(h.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),vue.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&vue.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:B.value,days:B.value,ref:u}})]),...ye()])}function pe(){return 1===B.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>he(B.value[0],e)):B.value.map(e=>he(e))}function ye(){return 1===B.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>ge(B.value[0],e)):B.value.map(e=>ge(e))}function he(t,e){const a=f["head-day"],n=f["head-date"],r=!0!==h.noActiveDate&&ie(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date};void 0!==e&&(o.columnIndex=e);const u=!0===M.value?convertToUnit(V.value):ne.value,s=h.weekdayStyle||O,i={width:u,maxWidth:u,minWidth:u,...s({scope:o})};!0===M.value&&(i.minWidth=u);const d="function"===typeof h.weekdayClass?h.weekdayClass({scope:o}):{},l=!0===h.focusable&&h.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...d,...R(t),"q-active-date":r,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===l},style:i,onFocus:e=>{!0===l&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&Q(e,[13,32])&&(w.value=t.date)},...X("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return vue.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&ke(t,e),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),void 0===a&&Te(t,e),useFocusHelper()])}function fe(e){return"stacked"===h.dateHeader?[!0!==h.noDefaultHeaderText&&we(e),!0!==h.noDefaultHeaderBtn&&De(e)]:"inline"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderText&&we(e),!0!==h.noDefaultHeaderBtn&&De(e)])):"inverted"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderBtn&&De(e),!0!==h.noDefaultHeaderText&&we(e)])):void 0}function ge(e,t){const a=f["head-day-event"],n=!0!==h.noActiveDate&&ie(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date};void 0!==t&&(r.columnIndex=t);const o=!0===M.value?convertToUnit(V.value):ne.value,u={width:o,maxWidth:o,minWidth:o};return!0===M.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...R(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function we(e){const t=f["head-weekday-label"],a=!0===h.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+h.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||_e(e,a))}function _e(e,t){const a=H.value(e,t||h.weekdayBreakpoints[0]>0&&V.value<=h.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},h.weekdayBreakpoints[1]>0&&V.value<=h.weekdayBreakpoints[1]?minCharWidth(a,h.minWeekdayLabel):a)}function De(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+h.dateAlign]:!0}};return vue.h("div",t,be(e))}function be(a){const e=!0!==h.noActiveDate&&ie(a),t=A.value(a,!1),n=f["head-day-label"],r=f["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===h.dateType,"q-calendar__button--rounded":"rounded"===h.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Q(e,[13,32])&&(w.value=a.date,void 0!==I.value.onClickDate&&g("click-date",{scope:o}))},...X("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==h.noAria&&(u.ariaLabel=q.value(a)),r?r({scope:o}):useButton(h,u,n?n({scope:o}):t)}function ke(e,t){const a=f["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function Te(e,t){const a=f["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Ie(){return vue.h("div",{class:"q-calendar-scheduler__body"},[Me()])}function Me(){return!0===M.value?vue.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==M.value&&Fe(),Ne()]):!0===h.noScroll?Se():vue.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Se()])}function Se(){return vue.h("div",{ref:a,class:"q-calendar-scheduler__pane"},[Ne()])}function Ne(){return vue.h("div",{class:"q-calendar-scheduler__day--container"},[!0===M.value&&!0!==h.noHeader&&de(),Ee()])}function Ee(e=void 0,a=0,n=!0){return void 0===e&&(e=h.modelResources),e.map((e,t)=>{return Ce(e,t,a,void 0!==e.children?e.expanded:n)})}function Ce(e,t,a=0,n=!0){const r={};r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):te.value?convertToUnit(te.value):"auto",ae.value>0&&(r.minHeight=convertToUnit(ae.value));const o=vue.h("div",{key:e[h.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[xe(e,t,a,n),Fe(e,t,a,n)]);return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ee(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function xe(t,e,a=0,n=!0){const r=f["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):te.value?convertToUnit(te.value):"auto",parseInt(h.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(h.resourceMinHeight,10)));const u=h.resourceStyle||K,s=t[h.resourceLabel],i=!0===h.focusable&&h.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:B.value,days:B.value,resourceIndex:e,indentLevel:a,label:s},l=t[h.resourceKey];d.droppable=_.value===l;const c="function"===typeof h.resourceClass?h.resourceClass({scope:d}):{};return vue.h("div",{key:t[h.resourceKey]+"-"+e,ref:e=>{v.value[t[h.resourceKey]]=e},tabindex:!0===i?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===M.value,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===i},style:{...o,...u({scope:d})},onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"resource",d)?_.value=l:_.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"resource",d)?_.value=l:_.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"resource",d)?_.value=l:_.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"resource",d)?_.value=l:_.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==I.value.onClickResource&&g("click-resource",{scope:d,event:e})},...X("-resource",e=>{return{scope:d,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;g("resource-expanded",{expanded:t.expanded,scope:d})}}),vue.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):s]),useFocusHelper()]])}function Fe(e,t,a=0,n=!0){const r=f["resource-days"],o=!0===M.value?convertToUnit(V.value):ne.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:B.value,days:B.value},s={};s.height=parseInt(h.resourceHeight,10)>0?convertToUnit(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(s.minHeight=convertToUnit(parseInt(h.resourceMinHeight,10)));const i={class:"q-calendar-scheduler__resource--days",style:s};return vue.h("div",i,[...Ae(e,t,a,n),r&&r({scope:u})])}function Ae(t,a,n=0,r=!0){return 1===B.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>He(B.value[0],e,t,a,n,r)):B.value.map(e=>He(e,void 0,t,a,n,r))}function He(e,t,a,n,r=0,o=!0){const u=f.day,s=h.dayStyle||O,i=!0!==h.noActiveDate&&W.value.date===e.date,d=e.date+":"+a[h.resourceKey]+(void 0!==t?":"+t:""),l=_.value===d,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:i,droppable:l},v=!0===M.value?convertToUnit(V.value):ne.value,m={width:v,maxWidth:v,...s({scope:c})};m.height=parseInt(h.resourceHeight,10)>0?convertToUnit(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(m.minHeight=convertToUnit(parseInt(h.resourceMinHeight,10)));const p="function"===typeof h.dayClass?h.dayClass({scope:c}):{},y=!0===h.focusable&&h.focusType.includes("day")&&!0===o;return vue.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...R(e),"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"day",c)?_.value=d:_.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"day",c)?_.value=d:_.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"day",c)?_.value=d:_.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"day",c)?_.value=d:_.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&(w.value=c.timestamp.date,void 0!==I.value.onClickResource&&g("click-resource",{scope:c,event:e}))},...X("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function qe(){return vue.h("div",{},"No resources have been defined")}function Oe(){if(L.value){const{start:n,end:r,maxDays:o}=U.value;i.value=n.date,d.value=r.date,l.value=o}const e=c.width>0,t=h.modelResources&&h.modelResources.length>0,a=vue.withDirectives(vue.h("div",{key:i.value,class:"q-calendar-scheduler"},[!0===e&&!0===t&&!0!==M.value&&!0!==h.noHeader&&de(),!0===e&&!0===t&&Ie(),!1===t&&qe()]),[[ResizeObserver$1,se]]);if(!0!==h.animated)return a;{const u="q-calendar--"+("prev"===s.value?h.transitionPrev:h.transitionNext);return vue.h(vue.Transition,{name:u,appear:!0},()=>a)}}return vue.watch([B],Z,{deep:!0,immediate:!0}),vue.watch(()=>h.modelValue,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));s.value=a>=n?"next":"prev"}w.value=e}m.value=e}),vue.watch(w,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));s.value=a>=n?"next":"prev"}g("update:model-value",e)}}),vue.watch(m,e=>{e&&(r.value=parseTimestamp(e))}),vue.watch(r,e=>{p.value[m.value]?p.value[m.value].focus():G()}),vue.watch(()=>h.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{p.value={};o.value={};u.value={};v.value={}}),vue.onMounted(()=>{Y()}),e({prev:ue,next:oe,move:$,moveToToday:re,updateCurrent:E}),()=>j()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,install(e){e.component(QCalendarScheduler.name,QCalendarScheduler)}};module.exports=Plugin;
"use strict";var vue=require("vue");const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const l=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,d=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===l;if(l<getDayIdentifier(e))return c;while((!p||c.length<d)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>l&&c.length>=d,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),u=vue.computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:d,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const d=vue.computed(()=>parseInt(o.intervalStart,10)),v=vue.computed(()=>parseInt(o.intervalMinutes,10)),l=vue.computed(()=>parseInt(o.intervalCount,10)),m=vue.computed(()=>parseFloat(o.intervalHeight)),p=vue.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=vue.computed(()=>d.value*v.value),y=vue.computed(()=>l.value*m.value),h=vue.computed(()=>l.value*p.value),f=vue.computed(()=>D(a.value)),g=vue.computed(()=>b(r.value)),w=vue.computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),_=vue.computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,v.value,l.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function b(e){return getEndOfWeek(e,o.weekdays,t.today)}function k(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=k(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=vue.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function x(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/m.value,c=Math.floor((a?Math.floor(l):l)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function A(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/m.value,c=Math.floor((a?Math.floor(l):l)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function H(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientX,l=(d-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function q(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function O(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=j,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function R(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=j(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function U(e){return e/v.value*p.value}function z(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/p.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}function j(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value&&(u=h.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:l,parsedIntervalHeight:m,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:f,parsedWeekEnd:g,days:w,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:k,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:C,styleDefault:x,getTimestampAtEventInterval:F,getTimestampAtEvent:A,getTimestampAtEventX:H,getScopeForSlot:q,getScopeForSlotX:O,scrollToTime:R,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:j}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=vue.computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:d,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=vue.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:d,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:b();break;case 35:T();break;case 36:k();break;case 37:w();break;case 38:f();break;case 39:_();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarScheduler=vue.defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(h,{slots:f,emit:g,expose:e}){const t=vue.ref(null),a=vue.ref(null),n=vue.ref(null),m=vue.ref(null),r=vue.ref(null),p=vue.ref({}),v=vue.ref({}),o=vue.ref({}),u=vue.ref({}),i=vue.ref("next"),s=vue.ref(h.modelValue||today()),d=vue.ref("0000-00-00"),l=vue.ref(0),w=vue.ref(h.modelValue),c=vue.reactive({width:0,height:0}),y=vue.ref(!1),_=vue.ref(!1),D=vue.ref(null),b=vue.ref(null),k=vue.computed(()=>{if("month"===h.view)return"month-interval";return h.view}),T=vue.getCurrentInstance();if(null===T)throw new Error("current instance is null");const{emitListeners:I}=useEmitListeners(T),{isSticky:M}=useCellWidth(h),{times:S,setCurrent:N,updateCurrent:E}=useTimes(h);E(),N();const{weekdaySkips:C,parsedStart:x,parsedEnd:F,dayFormatter:A,weekdayFormatter:H,ariaDateFormatter:q,dayStyleDefault:O,getRelativeClasses:R}=useCommon(h,{startDate:s,endDate:d,times:S}),W=vue.computed(()=>{return parseTimestamp(h.modelValue,S.now)||x.value||S.today});r.value=W.value,m.value=W.value.date;const L=vue.computed(()=>{if(0===l.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===B.value||0===B.value.length)return!0;const e=B.value[0];const t=B.value[B.value.length-1];return!0!==isBetweenDates(W.value,e,t)}),{renderValues:U}=useRenderValues(h,{parsedView:k,times:S,parsedValue:W}),{rootRef:z,scrollWidth:P,__initCalendar:Y,__renderCalendar:j}=useCalendar(h,Oe,{scrollArea:t,pane:a}),{days:B,parsedCellWidth:V,styleDefault:K}=useInterval(h,{weekdaySkips:C,times:S,scrollArea:t,parsedStart:x,parsedEnd:F,maxDays:l,size:c,headerColumnRef:n}),{move:$}=useMove(h,{parsedView:k,parsedValue:W,weekdaySkips:C,direction:i,maxDays:l,times:S,emittedValue:w,emit:g}),{getDefaultMouseEventHandlers:X}=useMouse(g,I),{checkChange:Z}=useCheckChange(g,{days:B,lastStart:D,lastEnd:b}),{isKeyCode:Q}=useEvents(),{tryFocus:G}=useKeyboard(h,{rootRef:z,focusRef:m,focusValue:r,datesRef:p,days:B,parsedView:k,parsedValue:W,emittedValue:w,weekdaySkips:C,direction:i,times:S}),J=vue.computed(()=>{{if("day"===h.view&&parseInt(h.columnCount,10)>1)return parseInt(h.columnCount,10);if("day"===h.view&&h.maxDays&&h.maxDays>1)return h.maxDays}return B.value.length}),ee=vue.computed(()=>{if(z.value)return parseInt(getComputedStyle(z.value).getPropertyValue("--calendar-resources-width"),10);return 0}),te=vue.computed(()=>{const e=parseInt(h.resourceHeight,10);if(0===e)return"auto";return e}),ae=vue.computed(()=>{return parseInt(h.resourceMinHeight,10)}),ne=vue.computed(()=>{if(z.value){const e=c.width||z.value.getBoundingClientRect().width;if(e&&ee.value&&J.value)return(e-P.value-ee.value)/J.value+"px"}return 100/J.value+"%"});function re(){w.value=today()}function oe(e=1){$(e)}function ue(e=1){$(-e)}function ie({width:e,height:t}){c.width=e,c.height=t}function se(e){return e.date===w.value}function de(){return vue.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===M.value},style:{marginRight:P.value+"px"}},[le(),ce()])}function le(){const e=f["head-resources"],t={days:B.value,timestamps:B.value,date:h.modelValue,resources:h.modelResources};return vue.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===M.value},...X("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ce(){return vue.h("div",{ref:n,class:{"q-calendar-scheduler__head--days__column":!0}},[ve(),me()])}function ve(){return vue.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...pe()])}function me(){const e=f["head-days-events"];return vue.nextTick(()=>{if(u.value&&0===parseInt(h.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),vue.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&vue.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:B.value,days:B.value,ref:u}})]),...ye()])}function pe(){return 1===B.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>he(B.value[0],e)):B.value.map(e=>he(e))}function ye(){return 1===B.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>ge(B.value[0],e)):B.value.map(e=>ge(e))}function he(t,e){const a=f["head-day"],n=f["head-date"],r=!0!==h.noActiveDate&&se(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date};void 0!==e&&(o.columnIndex=e);const u=!0===M.value?convertToUnit(V.value):ne.value,i=h.weekdayStyle||O,s={width:u,maxWidth:u,minWidth:u,...i({scope:o})};!0===M.value&&(s.minWidth=u);const d="function"===typeof h.weekdayClass?h.weekdayClass({scope:o}):{},l=!0===h.focusable&&h.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...d,...R(t),"q-active-date":r,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===l},style:s,onFocus:e=>{!0===l&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&Q(e,[13,32])&&(w.value=t.date)},...X("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return vue.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&ke(t,e),void 0===a&&fe(t),void 0===a&&n&&n({scope:o}),void 0===a&&Te(t,e),useFocusHelper()])}function fe(e){return"stacked"===h.dateHeader?[!0!==h.noDefaultHeaderText&&we(e),!0!==h.noDefaultHeaderBtn&&De(e)]:"inline"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderText&&we(e),!0!==h.noDefaultHeaderBtn&&De(e)])):"inverted"===h.dateHeader?("left"===h.weekdayAlign&&"right"===h.dateAlign||"right"===h.weekdayAlign&&h.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==h.noDefaultHeaderBtn&&De(e),!0!==h.noDefaultHeaderText&&we(e)])):void 0}function ge(e,t){const a=f["head-day-event"],n=!0!==h.noActiveDate&&se(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date};void 0!==t&&(r.columnIndex=t);const o=!0===M.value?convertToUnit(V.value):ne.value,u={width:o,maxWidth:o,minWidth:o};return!0===M.value&&(u.minWidth=o),vue.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...R(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function we(e){const t=f["head-weekday-label"],a=!0===h.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+h.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",r,t&&t({scope:n})||_e(e,a))}function _e(e,t){const a=H.value(e,t||h.weekdayBreakpoints[0]>0&&V.value<=h.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},h.weekdayBreakpoints[1]>0&&V.value<=h.weekdayBreakpoints[1]?minCharWidth(a,h.minWeekdayLabel):a)}function De(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+h.dateAlign]:!0}};return vue.h("div",t,be(e))}function be(a){const e=!0!==h.noActiveDate&&se(a),t=A.value(a,!1),n=f["head-day-label"],r=f["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===h.dateType,"q-calendar__button--rounded":"rounded"===h.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Q(e,[13,32])&&(w.value=a.date,void 0!==I.value.onClickDate&&g("click-date",{scope:o}))},...X("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==h.noAria&&(u.ariaLabel=q.value(a)),r?r({scope:o}):useButton(h,u,n?n({scope:o}):t)}function ke(e,t){const a=f["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function Te(e,t){const a=f["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return vue.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Ie(){return vue.h("div",{class:"q-calendar-scheduler__body"},[Me()])}function Me(){return!0===M.value?vue.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==M.value&&Fe(),Ne()]):!0===h.noScroll?Se():vue.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Se()])}function Se(){return vue.h("div",{ref:a,class:"q-calendar-scheduler__pane"},[Ne()])}function Ne(){return vue.h("div",{class:"q-calendar-scheduler__day--container"},[!0===M.value&&!0!==h.noHeader&&de(),Ee()])}function Ee(e=void 0,a=0,n=!0){return void 0===e&&(e=h.modelResources),e.map((e,t)=>{return Ce(e,t,a,void 0!==e.children?e.expanded:n)})}function Ce(e,t,a=0,n=!0){const r={};r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):te.value?convertToUnit(te.value):"auto",ae.value>0&&(r.minHeight=convertToUnit(ae.value));const o=vue.h("div",{key:e[h.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[xe(e,t,a,n),Fe(e,t,a,n)]);return void 0!==e.children?[o,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ee(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function xe(t,e,a=0,n=!0){const r=f["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):te.value?convertToUnit(te.value):"auto",parseInt(h.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(h.resourceMinHeight,10)));const u=h.resourceStyle||K,i=t[h.resourceLabel],s=!0===h.focusable&&h.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:B.value,days:B.value,resourceIndex:e,indentLevel:a,label:i},l=t[h.resourceKey];d.droppable=_.value===l;const c="function"===typeof h.resourceClass?h.resourceClass({scope:d}):{};return vue.h("div",{key:t[h.resourceKey]+"-"+e,ref:e=>{v.value[t[h.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===M.value,"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:d})},onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"resource",d)?_.value=l:_.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"resource",d)?_.value=l:_.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"resource",d)?_.value=l:_.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"resource",d)?_.value=l:_.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==I.value.onClickResource&&g("click-resource",{scope:d,event:e})},...X("-resource",e=>{return{scope:d,event:e}})},[[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;g("resource-expanded",{expanded:t.expanded,scope:d})}}),vue.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):i]),useFocusHelper()]])}function Fe(e,t,a=0,n=!0){const r=f["resource-days"],o=!0===M.value?convertToUnit(V.value):ne.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:B.value,days:B.value},i={};i.height=parseInt(h.resourceHeight,10)>0?convertToUnit(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(h.resourceMinHeight,10)));const s={class:"q-calendar-scheduler__resource--days",style:i};return vue.h("div",s,[...Ae(e,t,a,n),r&&r({scope:u})])}function Ae(t,a,n=0,r=!0){return 1===B.value.length&&parseInt(h.columnCount,10)>0?Array.apply(null,new Array(parseInt(h.columnCount,10))).map((e,t)=>t+parseInt(h.columnIndexStart,10)).map(e=>He(B.value[0],e,t,a,n,r)):B.value.map(e=>He(e,void 0,t,a,n,r))}function He(e,t,a,n,r=0,o=!0){const u=f.day,i=h.dayStyle||O,s=!0!==h.noActiveDate&&W.value.date===e.date,d=e.date+":"+a[h.resourceKey]+(void 0!==t?":"+t:""),l=_.value===d,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:s,droppable:l},v=!0===M.value?convertToUnit(V.value):ne.value,m={width:v,maxWidth:v,...i({scope:c})};m.height=parseInt(h.resourceHeight,10)>0?convertToUnit(parseInt(h.resourceHeight,10)):"auto",parseInt(h.resourceMinHeight,10)>0&&(m.minHeight=convertToUnit(parseInt(h.resourceMinHeight,10)));const p="function"===typeof h.dayClass?h.dayClass({scope:c}):{},y=!0===h.focusable&&h.focusType.includes("day")&&!0===o;return vue.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...R(e),"q-calendar__hoverable":!0===h.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==h.dragEnterFunc&&"function"===typeof h.dragEnterFunc&&(!0===h.dragEnterFunc(e,"day",c)?_.value=d:_.value="")},onDragover:e=>{void 0!==h.dragOverFunc&&"function"===typeof h.dragOverFunc&&(!0===h.dragOverFunc(e,"day",c)?_.value=d:_.value="")},onDragleave:e=>{void 0!==h.dragLeaveFunc&&"function"===typeof h.dragLeaveFunc&&(!0===h.dragLeaveFunc(e,"day",c)?_.value=d:_.value="")},onDrop:e=>{void 0!==h.dropFunc&&"function"===typeof h.dropFunc&&(!0===h.dropFunc(e,"day",c)?_.value=d:_.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&(w.value=c.timestamp.date,void 0!==I.value.onClickResource&&g("click-resource",{scope:c,event:e}))},...X("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function qe(){return vue.h("div",{},"No resources have been defined")}function Oe(){if(L.value){const{start:n,end:r,maxDays:o}=U.value;s.value=n.date,d.value=r.date,l.value=o}const e=c.width>0,t=h.modelResources&&h.modelResources.length>0,a=vue.withDirectives(vue.h("div",{key:s.value,class:"q-calendar-scheduler"},[!0===e&&!0===t&&!0!==M.value&&!0!==h.noHeader&&de(),!0===e&&!0===t&&Ie(),!1===t&&qe()]),[[ResizeObserver$1,ie]]);if(!0!==h.animated)return a;{const u="q-calendar--"+("prev"===i.value?h.transitionPrev:h.transitionNext);return vue.h(vue.Transition,{name:u,appear:!0},()=>a)}}return vue.watch([B],Z,{deep:!0,immediate:!0}),vue.watch(()=>h.modelValue,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}w.value=e}m.value=e}),vue.watch(w,(e,t)=>{if(w.value!==h.modelValue){if(!0===h.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}g("update:model-value",e)}}),vue.watch(m,e=>{e&&(r.value=parseTimestamp(e))}),vue.watch(r,e=>{p.value[m.value]?p.value[m.value].focus():G()}),vue.watch(()=>h.maxDays,e=>{l.value=e}),vue.onBeforeUpdate(()=>{p.value={};o.value={};u.value={};v.value={}}),vue.onMounted(()=>{Y()}),e({prev:ue,next:oe,move:$,moveToToday:re,updateCurrent:E}),()=>j()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,install(e){e.component(QCalendarScheduler.name,QCalendarScheduler)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const l=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,d=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===l;if(l<getDayIdentifier(e))return c;while((!p||c.length<d)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>l&&c.length>=d,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),u=computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:d,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const d=computed(()=>parseInt(o.intervalStart,10)),p=computed(()=>parseInt(o.intervalMinutes,10)),l=computed(()=>parseInt(o.intervalCount,10)),y=computed(()=>parseFloat(o.intervalHeight)),m=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),h=computed(()=>d.value*p.value),c=computed(()=>l.value*y.value),v=computed(()=>l.value*m.value),f=computed(()=>D(a.value)),g=computed(()=>k(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),_=computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,p.value,l.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function x(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=h.value,i=e,s=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:s).clientY,c=(l-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return 0!==m&&(r=addToDate(r,{minute:m})),n&&updateRelative(r,n,!0),r}function A(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=h.value,i=e,s=e,d=i.changedTouches||i.touches,l=(d&&d[0]?d[0]:s).clientY,c=(l-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*p.value),m=u+v;return updateMinutes(r,m,n)}function H(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientX,l=(d-o.left)/m.value,c=Math.floor((a?Math.floor(l):l)*p.value),v=c+(60*t.hour+t.minute);return updateMinutes(r,v,n)}function q(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function O(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=B,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function R(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/p.value*y.value}function U(e){return e/p.value*m.value}function z(e){return parseInt(e,10)*p.value/y.value}function P(e){return parseInt(e,10)*p.value/m.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=h.value,r=l.value*p.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=h.value,r=l.value*p.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:p,parsedIntervalCount:l,parsedIntervalHeight:y,parsedCellWidth:m,parsedStartMinute:h,bodyHeight:c,bodyWidth:v,parsedWeekStart:f,parsedWeekEnd:g,days:w,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:C,styleDefault:x,getTimestampAtEventInterval:F,getTimestampAtEvent:A,getTimestampAtEventX:H,getScopeForSlot:q,getScopeForSlotX:O,scrollToTime:R,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:B}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:d,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:d,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:k();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:f();break;case 39:_();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function b(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarScheduler=defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:g,emit:w,expose:e}){const t=ref(null),a=ref(null),n=ref(null),m=ref(null),r=ref(null),p=ref({}),v=ref({}),o=ref({}),u=ref({}),i=ref("next"),s=ref(f.modelValue||today()),d=ref("0000-00-00"),l=ref(0),_=ref(f.modelValue),c=reactive({width:0,height:0}),y=ref(!1),D=ref(!1),k=ref(null),b=ref(null),T=computed(()=>{if("month"===f.view)return"month-interval";return f.view}),I=getCurrentInstance();if(null===I)throw new Error("current instance is null");const{emitListeners:M}=useEmitListeners(I),{isSticky:S}=useCellWidth(f),{times:N,setCurrent:E,updateCurrent:C}=useTimes(f);C(),E();const{weekdaySkips:x,parsedStart:F,parsedEnd:A,dayFormatter:H,weekdayFormatter:q,ariaDateFormatter:O,dayStyleDefault:R,getRelativeClasses:W}=useCommon(f,{startDate:s,endDate:d,times:N}),L=computed(()=>{return parseTimestamp(f.modelValue,N.now)||F.value||N.today});r.value=L.value,m.value=L.value.date;const U=computed(()=>{if(0===l.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===V.value||0===V.value.length)return!0;const e=V.value[0];const t=V.value[V.value.length-1];return!0!==isBetweenDates(L.value,e,t)}),{renderValues:z}=useRenderValues(f,{parsedView:T,times:N,parsedValue:L}),{rootRef:P,scrollWidth:Y,__initCalendar:B,__renderCalendar:j}=useCalendar(f,Re,{scrollArea:t,pane:a}),{days:V,parsedCellWidth:K,styleDefault:X}=useInterval(f,{weekdaySkips:x,times:N,scrollArea:t,parsedStart:F,parsedEnd:A,maxDays:l,size:c,headerColumnRef:n}),{move:$}=useMove(f,{parsedView:T,parsedValue:L,weekdaySkips:x,direction:i,maxDays:l,times:N,emittedValue:_,emit:w}),{getDefaultMouseEventHandlers:Z}=useMouse(w,M),{checkChange:Q}=useCheckChange(w,{days:V,lastStart:k,lastEnd:b}),{isKeyCode:G}=useEvents(),{tryFocus:J}=useKeyboard(f,{rootRef:P,focusRef:m,focusValue:r,datesRef:p,days:V,parsedView:T,parsedValue:L,emittedValue:_,weekdaySkips:x,direction:i,times:N}),ee=computed(()=>{{if("day"===f.view&&parseInt(f.columnCount,10)>1)return parseInt(f.columnCount,10);if("day"===f.view&&f.maxDays&&f.maxDays>1)return f.maxDays}return V.value.length}),te=computed(()=>{if(P.value)return parseInt(getComputedStyle(P.value).getPropertyValue("--calendar-resources-width"),10);return 0}),ae=computed(()=>{const e=parseInt(f.resourceHeight,10);if(0===e)return"auto";return e}),ne=computed(()=>{return parseInt(f.resourceMinHeight,10)}),re=computed(()=>{if(P.value){const e=c.width||P.value.getBoundingClientRect().width;if(e&&te.value&&ee.value)return(e-Y.value-te.value)/ee.value+"px"}return 100/ee.value+"%"});function oe(){_.value=today()}function ue(e=1){$(e)}function ie(e=1){$(-e)}function se({width:e,height:t}){c.width=e,c.height=t}function de(e){return e.date===_.value}function le(){return h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===S.value},style:{marginRight:Y.value+"px"}},[ce(),ve()])}function ce(){const e=g["head-resources"],t={days:V.value,timestamps:V.value,date:f.modelValue,resources:f.modelResources};return h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===S.value},...Z("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ve(){return h("div",{ref:n,class:{"q-calendar-scheduler__head--days__column":!0}},[me(),pe()])}function me(){return h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function pe(){const e=g["head-days-events"];return nextTick(()=>{if(u.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:V.value,days:V.value,ref:u}})]),...he()])}function ye(){return 1===V.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>fe(V.value[0],e)):V.value.map(e=>fe(e))}function he(){return 1===V.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>we(V.value[0],e)):V.value.map(e=>we(e))}function fe(t,e){const a=g["head-day"],n=g["head-date"],r=!0!==f.noActiveDate&&de(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date};void 0!==e&&(o.columnIndex=e);const u=!0===S.value?convertToUnit(K.value):re.value,i=f.weekdayStyle||R,s={width:u,maxWidth:u,minWidth:u,...i({scope:o})};!0===S.value&&(s.minWidth=u);const d="function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{},l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...d,...W(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:s,onFocus:e=>{!0===l&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&G(e,[13,32])&&(_.value=t.date)},...Z("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Te(t,e),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),void 0===a&&Ie(t,e),useFocusHelper()])}function ge(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&_e(e),!0!==f.noDefaultHeaderBtn&&ke(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&_e(e),!0!==f.noDefaultHeaderBtn&&ke(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&ke(e),!0!==f.noDefaultHeaderText&&_e(e)])):void 0}function we(e,t){const a=g["head-day-event"],n=!0!==f.noActiveDate&&de(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date};void 0!==t&&(r.columnIndex=t);const o=!0===S.value?convertToUnit(K.value):re.value,u={width:o,maxWidth:o,minWidth:o};return!0===S.value&&(u.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...W(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function _e(e){const t=g["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||De(e,a))}function De(e,t){const a=q.value(e,t||f.weekdayBreakpoints[0]>0&&K.value<=f.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&K.value<=f.weekdayBreakpoints[1]?minCharWidth(a,f.minWeekdayLabel):a)}function ke(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return h("div",t,be(e))}function be(a){const e=!0!==f.noActiveDate&&de(a),t=H.value(a,!1),n=g["head-day-label"],r=g["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&G(e,[13,32])&&(_.value=a.date,void 0!==M.value.onClickDate&&w("click-date",{scope:o}))},...Z("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(_.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=O.value(a)),r?r({scope:o}):useButton(f,u,n?n({scope:o}):t)}function Te(e,t){const a=g["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function Ie(e,t){const a=g["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Me(){return h("div",{class:"q-calendar-scheduler__body"},[Se()])}function Se(){return!0===S.value?h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==S.value&&Ae(),Ee()]):!0===f.noScroll?Ne():h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Ne()])}function Ne(){return h("div",{ref:a,class:"q-calendar-scheduler__pane"},[Ee()])}function Ee(){return h("div",{class:"q-calendar-scheduler__day--container"},[!0===S.value&&!0!==f.noHeader&&le(),Ce()])}function Ce(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return xe(e,t,a,void 0!==e.children?e.expanded:n)})}function xe(e,t,a=0,n=!0){const r={};r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):ae.value?convertToUnit(ae.value):"auto",ne.value>0&&(r.minHeight=convertToUnit(ne.value));const o=h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Fe(e,t,a,n),Ae(e,t,a,n)]);return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ce(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Fe(t,e,a=0,n=!0){const r=g["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):ae.value?convertToUnit(ae.value):"auto",parseInt(f.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10)));const u=f.resourceStyle||X,i=t[f.resourceLabel],s=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:V.value,days:V.value,resourceIndex:e,indentLevel:a,label:i},l=t[f.resourceKey];d.droppable=D.value===l;const c="function"===typeof f.resourceClass?f.resourceClass({scope:d}):{};return h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{v.value[t[f.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===S.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:d})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",d)?D.value=l:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",d)?D.value=l:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",d)?D.value=l:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",d)?D.value=l:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==M.value.onClickResource&&w("click-resource",{scope:d,event:e})},...Z("-resource",e=>{return{scope:d,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;w("resource-expanded",{expanded:t.expanded,scope:d})}}),h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):i]),useFocusHelper()]])}function Ae(e,t,a=0,n=!0){const r=g["resource-days"],o=!0===S.value?convertToUnit(K.value):re.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:V.value,days:V.value},i={};i.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10)));const s={class:"q-calendar-scheduler__resource--days",style:i};return h("div",s,[...He(e,t,a,n),r&&r({scope:u})])}function He(t,a,n=0,r=!0){return 1===V.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>qe(V.value[0],e,t,a,n,r)):V.value.map(e=>qe(e,void 0,t,a,n,r))}function qe(e,t,a,n,r=0,o=!0){const u=g.day,i=f.dayStyle||R,s=!0!==f.noActiveDate&&L.value.date===e.date,d=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=D.value===d,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:s,droppable:l},v=!0===S.value?convertToUnit(K.value):re.value,m={width:v,maxWidth:v,...i({scope:c})};m.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(m.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10)));const p="function"===typeof f.dayClass?f.dayClass({scope:c}):{},y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...W(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",c)?D.value=d:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",c)?D.value=d:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",c)?D.value=d:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",c)?D.value=d:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&(_.value=c.timestamp.date,void 0!==M.value.onClickResource&&w("click-resource",{scope:c,event:e}))},...Z("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function Oe(){return h("div",{},"No resources have been defined")}function Re(){if(U.value){const{start:n,end:r,maxDays:o}=z.value;s.value=n.date,d.value=r.date,l.value=o}const e=c.width>0,t=f.modelResources&&f.modelResources.length>0,a=withDirectives(h("div",{key:s.value,class:"q-calendar-scheduler"},[!0===e&&!0===t&&!0!==S.value&&!0!==f.noHeader&&le(),!0===e&&!0===t&&Me(),!1===t&&Oe()]),[[ResizeObserver$1,se]]);if(!0!==f.animated)return a;{const u="q-calendar--"+("prev"===i.value?f.transitionPrev:f.transitionNext);return h(Transition,{name:u,appear:!0},()=>a)}}return watch([V],Q,{deep:!0,immediate:!0}),watch(()=>f.modelValue,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}_.value=e}m.value=e}),watch(_,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}w("update:model-value",e)}}),watch(m,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{p.value[m.value]?p.value[m.value].focus():J()}),watch(()=>f.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{p.value={};o.value={};u.value={};v.value={}}),onMounted(()=>{B()}),e({prev:ie,next:ue,move:$,moveToToday:oe,updateCurrent:C}),()=>j()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,install(e){e.component(QCalendarScheduler.name,QCalendarScheduler)}};export default Plugin;export{QCalendarScheduler,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition,nextTick}from"vue";const 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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,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 updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const u=getDayIdentifier(parsed(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const i=getDayIdentifier(parsed(a));o>=i&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const d in r)if(Array.isArray(r[d])&&2===r[d].length){const l=parsed(r[d][0]),c=parsed(r[d][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[d]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,u=[],i=[],s=42,d=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),m=0,p=m===l;if(l<getDayIdentifier(e))return c;while((!p||c.length<d)&&c.length<s){if(m=getDayIdentifier(v),p=p||m>l&&c.length>=d,p)break;if(0!==n[v.weekday]){const y=copyTimestamp(v);updateFormatted(y),updateRelative(y,a),updateDisabled(y,r,o,u,i),c.push(y),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createIntervalList(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const i=(a+e)*n,s=copyTimestamp(t);u.push(updateMinutes(s,i,o))}return u}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),u=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=u}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const i=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function d(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,u]])}return{rootRef:o,scrollWidth:i,__initCalendar:s,__renderCalendar:d}}const useCommonProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),u=computed(()=>{if("0000-00-00"===t.value)return p(o.value);return parseTimestamp(t.value)}),i=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),d=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:u,lastDay:i,betweenDays:s}=c(n,e);return{"q-past-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==s&&!0!==i&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===s,"q-range-last":!0===i,"q-range-hover":!0===r&&(!0===u||!0===i||!0===s),"q-disabled-day disabled":!0===e.disabled}}function m(e){return getStartOfWeek(e,r.weekdays,a.today)}function p(e){return getEndOfWeek(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:i,weekdayFormatter:s,ariaDateFormatter:d,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:m,endOfWeek:p,dayStyleDefault:y}}function scrollTo(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function scrollToHorizontal(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function getVerticalScrollPosition(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function getHorizontalScrollPosition(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function animVerticalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getVerticalScrollPosition(n);o<=0?i!==r&&scrollTo(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;scrollTo(n,a);a!==r&&animVerticalScrollTo(n,r,o-t,e)})}function animHorizontalScrollTo(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],i=getHorizontalScrollPosition(n);o<=0?i!==r&&scrollToHorizontal(n,r):requestAnimationFrame(e=>{const t=e-u;const a=i+(r-i)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&animHorizontalScrollTo(n,r,o-t,e)})}const useSchedulerProps={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:validateNumber},resourceMinHeight:{type:[Number,String],default:70,validator:validateNumber},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function useInterval(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:i,headerColumnRef:s}){const d=computed(()=>parseInt(o.intervalStart,10)),v=computed(()=>parseInt(o.intervalMinutes,10)),l=computed(()=>parseInt(o.intervalCount,10)),m=computed(()=>parseFloat(o.intervalHeight)),p=computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:i.width>0&&s.value&&(e=s.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=computed(()=>d.value*v.value),y=computed(()=>l.value*m.value),h=computed(()=>l.value*p.value),f=computed(()=>D(a.value)),g=computed(()=>k(r.value)),w=computed(()=>{return createDayList(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),_=computed(()=>{return w.value.map(e=>createIntervalList(e,d.value,v.value,l.value,t.now))});function D(e){return getStartOfWeek(e,o.weekdays,t.today)}function k(e){return getEndOfWeek(e,o.weekdays,t.today)}function b(e,t){return e&&e.length>0&&e.includes(getDateTime(t))}function T(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayTimeIdentifier(t),r=getDayTimeIdentifier(parsed(e[0])),o=getDayTimeIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function I(e,t=[],a=[]){const n=b(t,e),{firstDay:r,lastDay:o,betweenDays:u}=T(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function M(e,t=0,a){return[]}const S=computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return createNativeLocaleFormatter(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),N=computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return createNativeLocaleFormatter(o.locale,e=>t)});function E(e){const t=_.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function C(e){}function x(e){}function F(e,t,a=!1,n=void 0){let r=copyTimestamp(t);const o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/m.value,c=Math.floor((a?Math.floor(l):l)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function A(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientY,l=(d-o.top)/m.value,c=Math.floor((a?Math.floor(l):l)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function H(e,t,a=!1,n=void 0){const r=copyTimestamp(t),o=e.currentTarget.getBoundingClientRect(),u=e,i=e,s=u.changedTouches||u.touches,d=(s&&s[0]?s[0]:i).clientX,l=(d-o.left)/p.value,c=Math.floor((a?Math.floor(l):l)*v.value);return 0!==c&&(r=addToDate(r,{minute:c})),n&&updateRelative(r,n,!0),r}function q(e,t){const a={timestamp:e};return a.timeStartPos=Y,a.timeDurationHeight=L,void 0!==t&&(a.columnIndex=t),a}function O(e,t){const a={timestamp:copyTimestamp(e)};return a.timeStartPosX=B,a.timeDurationWidth=U,void 0!==t&&(a.index=t),a}function R(e,t=0){const a=Y(e);return!(!1===a||!n.value)&&(animVerticalScrollTo(n.value,a,t),!0)}function W(e,t=0){const a=B(e);return!(!1===a||!n.value)&&(animHorizontalScrollTo(n.value,a,t),!0)}function L(e){return e/v.value*m.value}function U(e){return e/v.value*p.value}function z(e){return parseInt(e,10)*v.value/m.value}function P(e){return parseInt(e,10)*v.value/p.value}function Y(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}function B(e,t=!0){const a=parseTime(e);if(!1===a)return!1;const n=c.value,r=l.value*v.value,o=(a-n)/r;let u=o*h.value;return t&&(u<0&&(u=0),u>h.value&&(u=h.value)),u}return{parsedIntervalStart:d,parsedIntervalMinutes:v,parsedIntervalCount:l,parsedIntervalHeight:m,parsedCellWidth:p,parsedStartMinute:c,bodyHeight:y,bodyWidth:h,parsedWeekStart:f,parsedWeekEnd:g,days:w,intervals:_,intervalFormatter:S,ariaDateTimeFormatter:N,arrayHasDateTime:b,checkIntervals:T,getIntervalClasses:I,getResourceClasses:M,showIntervalLabelDefault:E,showResourceLabelDefault:C,styleDefault:x,getTimestampAtEventInterval:F,getTimestampAtEvent:A,getTimestampAtEventX:H,getScopeForSlot:q,getScopeForSlotX:O,scrollToTime:R,scrollToTimeX:W,timeDurationHeight:L,timeDurationWidth:U,heightToMinutes:z,widthToMinutes:P,timeStartPos:Y,timeStartPosX:B}}const useColumnProps={columnCount:{type:[Number,String],default:0,validator:validateNumber},columnIndexStart:{type:[Number,String],default:0,validator:validateNumber}},useMaxDaysProps={maxDays:{type:Number,default:1}},useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),i(e,t.now),u(e,t.today)}function o(){return parseDate(new Date)}function u(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)}function i(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:i}}function useRenderValues(r,{parsedView:o,times:u,parsedValue:i}){const e=computed(()=>{const e=i.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,u.today),n=getEndOfWeek(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),i=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(i):t[u]=[t[u],i]:t[u]=i}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}const useMoveEmits=["moved"];function useMove(i,{parsedView:s,parsedValue:d,weekdaySkips:l,direction:c,maxDays:v,times:m,emittedValue:p,emit:y}){function e(a=1){if(0!==a){let e=copyTimestamp(d.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const u=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,u,i.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,i.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,i.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,m.now),p.value=e.date,y("moved",e)}else p.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCellWidthProps={cellWidth:[Number,String]};function useCellWidth(e){const t=computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:i,emittedValue:s,weekdaySkips:d,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",h),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",h),document.removeEventListener("keydown",y),e=!1)}function m(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function p(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function h(e){if(m(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:D();break;case 34:k();break;case 35:T();break;case 36:b();break;case 37:w();break;case 38:f();break;case 39:_();break;case 40:g();break}}function f(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===i.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==i.value&&"week"!==i.value&&"month-interval"!==i.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function w(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===d.value[t.weekday]);if("month"===i.value||"month-interval"===i.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===i.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===i.value)return void(s.value=t.date);r.value=t.date}function D(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:-1}):"week"===i.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function k(e){let t=copyTimestamp(o.value);if("month"===i.value||"month-interval"===i.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===d.value[t.weekday])t=addToDate(t,{day:a})}else"day"===i.value?t=addToDate(t,{day:1}):"week"===i.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function b(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getStartOfMonth(t):"week"===i.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===i.value||"month-interval"===i.value?t=getEndOfMonth(t):"week"===i.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===d.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:p}}var QCalendarScheduler=defineComponent({name:"QCalendarScheduler",directives:[ResizeObserver$1],props:{...useCommonProps,...useSchedulerProps,...useColumnProps,...useMaxDaysProps,...useTimesProps,...useCellWidthProps,...useNavigationProps},emits:["update:model-value","update:model-resources","resource-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day-resource"),...getRawMouseEvents("-head-resources"),...getRawMouseEvents("-head-day"),...getRawMouseEvents("-resource")],setup(f,{slots:g,emit:w,expose:e}){const t=ref(null),a=ref(null),n=ref(null),m=ref(null),r=ref(null),p=ref({}),v=ref({}),o=ref({}),u=ref({}),i=ref("next"),s=ref(f.modelValue||today()),d=ref("0000-00-00"),l=ref(0),_=ref(f.modelValue),c=reactive({width:0,height:0}),y=ref(!1),D=ref(!1),k=ref(null),b=ref(null),T=computed(()=>{if("month"===f.view)return"month-interval";return f.view}),I=getCurrentInstance();if(null===I)throw new Error("current instance is null");const{emitListeners:M}=useEmitListeners(I),{isSticky:S}=useCellWidth(f),{times:N,setCurrent:E,updateCurrent:C}=useTimes(f);C(),E();const{weekdaySkips:x,parsedStart:F,parsedEnd:A,dayFormatter:H,weekdayFormatter:q,ariaDateFormatter:O,dayStyleDefault:R,getRelativeClasses:W}=useCommon(f,{startDate:s,endDate:d,times:N}),L=computed(()=>{return parseTimestamp(f.modelValue,N.now)||F.value||N.today});r.value=L.value,m.value=L.value.date;const U=computed(()=>{if(0===l.value)return!0;if("0000-00-00"===d.value)return!0;if(void 0===V.value||0===V.value.length)return!0;const e=V.value[0];const t=V.value[V.value.length-1];return!0!==isBetweenDates(L.value,e,t)}),{renderValues:z}=useRenderValues(f,{parsedView:T,times:N,parsedValue:L}),{rootRef:P,scrollWidth:Y,__initCalendar:B,__renderCalendar:j}=useCalendar(f,Re,{scrollArea:t,pane:a}),{days:V,parsedCellWidth:K,styleDefault:X}=useInterval(f,{weekdaySkips:x,times:N,scrollArea:t,parsedStart:F,parsedEnd:A,maxDays:l,size:c,headerColumnRef:n}),{move:$}=useMove(f,{parsedView:T,parsedValue:L,weekdaySkips:x,direction:i,maxDays:l,times:N,emittedValue:_,emit:w}),{getDefaultMouseEventHandlers:Z}=useMouse(w,M),{checkChange:Q}=useCheckChange(w,{days:V,lastStart:k,lastEnd:b}),{isKeyCode:G}=useEvents(),{tryFocus:J}=useKeyboard(f,{rootRef:P,focusRef:m,focusValue:r,datesRef:p,days:V,parsedView:T,parsedValue:L,emittedValue:_,weekdaySkips:x,direction:i,times:N}),ee=computed(()=>{{if("day"===f.view&&parseInt(f.columnCount,10)>1)return parseInt(f.columnCount,10);if("day"===f.view&&f.maxDays&&f.maxDays>1)return f.maxDays}return V.value.length}),te=computed(()=>{if(P.value)return parseInt(getComputedStyle(P.value).getPropertyValue("--calendar-resources-width"),10);return 0}),ae=computed(()=>{const e=parseInt(f.resourceHeight,10);if(0===e)return"auto";return e}),ne=computed(()=>{return parseInt(f.resourceMinHeight,10)}),re=computed(()=>{if(P.value){const e=c.width||P.value.getBoundingClientRect().width;if(e&&te.value&&ee.value)return(e-Y.value-te.value)/ee.value+"px"}return 100/ee.value+"%"});function oe(){_.value=today()}function ue(e=1){$(e)}function ie(e=1){$(-e)}function se({width:e,height:t}){c.width=e,c.height=t}function de(e){return e.date===_.value}function le(){return h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===S.value},style:{marginRight:Y.value+"px"}},[ce(),ve()])}function ce(){const e=g["head-resources"],t={days:V.value,timestamps:V.value,date:f.modelValue,resources:f.modelResources};return h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===S.value},...Z("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ve(){return h("div",{ref:n,class:{"q-calendar-scheduler__head--days__column":!0}},[me(),pe()])}function me(){return h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...ye()])}function pe(){const e=g["head-days-events"];return nextTick(()=>{if(u.value&&0===parseInt(f.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:V.value,days:V.value,ref:u}})]),...he()])}function ye(){return 1===V.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>fe(V.value[0],e)):V.value.map(e=>fe(e))}function he(){return 1===V.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>we(V.value[0],e)):V.value.map(e=>we(e))}function fe(t,e){const a=g["head-day"],n=g["head-date"],r=!0!==f.noActiveDate&&de(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date};void 0!==e&&(o.columnIndex=e);const u=!0===S.value?convertToUnit(K.value):re.value,i=f.weekdayStyle||R,s={width:u,maxWidth:u,minWidth:u,...i({scope:o})};!0===S.value&&(s.minWidth=u);const d="function"===typeof f.weekdayClass?f.weekdayClass({scope:o}):{},l=!0===f.focusable&&f.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{p.value[c]=e},tabindex:!0===l?0:-1,class:{"q-calendar-scheduler__head--day":!0,...d,...W(t),"q-active-date":r,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===l},style:s,onFocus:e=>{!0===l&&(m.value=c)},onKeydown:e=>{!0!==t.disabled&&G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&G(e,[13,32])&&(_.value=t.date)},...Z("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&Te(t,e),void 0===a&&ge(t),void 0===a&&n&&n({scope:o}),void 0===a&&Ie(t,e),useFocusHelper()])}function ge(e){return"stacked"===f.dateHeader?[!0!==f.noDefaultHeaderText&&_e(e),!0!==f.noDefaultHeaderBtn&&ke(e)]:"inline"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderText&&_e(e),!0!==f.noDefaultHeaderBtn&&ke(e)])):"inverted"===f.dateHeader?("left"===f.weekdayAlign&&"right"===f.dateAlign||"right"===f.weekdayAlign&&f.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==f.noDefaultHeaderBtn&&ke(e),!0!==f.noDefaultHeaderText&&_e(e)])):void 0}function we(e,t){const a=g["head-day-event"],n=!0!==f.noActiveDate&&de(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date};void 0!==t&&(r.columnIndex=t);const o=!0===S.value?convertToUnit(K.value):re.value,u={width:o,maxWidth:o,minWidth:o};return!0===S.value&&(u.minWidth=o),h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...W(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function _e(e){const t=g["head-weekday-label"],a=!0===f.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+f.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",r,t&&t({scope:n})||De(e,a))}function De(e,t){const a=q.value(e,t||f.weekdayBreakpoints[0]>0&&K.value<=f.weekdayBreakpoints[0]);return h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},f.weekdayBreakpoints[1]>0&&K.value<=f.weekdayBreakpoints[1]?minCharWidth(a,f.minWeekdayLabel):a)}function ke(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+f.dateAlign]:!0}};return h("div",t,be(e))}function be(a){const e=!0!==f.noActiveDate&&de(a),t=H.value(a,!1),n=g["head-day-label"],r=g["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===f.dateType,"q-calendar__button--rounded":"rounded"===f.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&G(e,[13,32])&&(_.value=a.date,void 0!==M.value.onClickDate&&w("click-date",{scope:o}))},...Z("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(_.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==f.noAria&&(u.ariaLabel=O.value(a)),r?r({scope:o}):useButton(f,u,n?n({scope:o}):t)}function Te(e,t){const a=g["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function Ie(e,t){const a=g["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function Me(){return h("div",{class:"q-calendar-scheduler__body"},[Se()])}function Se(){return!0===S.value?h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==S.value&&Ae(),Ee()]):!0===f.noScroll?Ne():h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Ne()])}function Ne(){return h("div",{ref:a,class:"q-calendar-scheduler__pane"},[Ee()])}function Ee(){return h("div",{class:"q-calendar-scheduler__day--container"},[!0===S.value&&!0!==f.noHeader&&le(),Ce()])}function Ce(e=void 0,a=0,n=!0){return void 0===e&&(e=f.modelResources),e.map((e,t)=>{return xe(e,t,a,void 0!==e.children?e.expanded:n)})}function xe(e,t,a=0,n=!0){const r={};r.height=void 0!==e.height?convertToUnit(parseInt(e.height,10)):ae.value?convertToUnit(ae.value):"auto",ne.value>0&&(r.minHeight=convertToUnit(ne.value));const o=h("div",{key:e[f.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Fe(e,t,a,n),Ae(e,t,a,n)]);return void 0!==e.children?[o,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ce(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Fe(t,e,a=0,n=!0){const r=g["resource-label"],o={};o.height=void 0!==t.height?convertToUnit(parseInt(t.height,10)):ae.value?convertToUnit(ae.value):"auto",parseInt(f.resourceMinHeight,10)>0&&(o.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10)));const u=f.resourceStyle||X,i=t[f.resourceLabel],s=!0===f.focusable&&f.focusType.includes("resource")&&!0===n,d={resource:t,timestamps:V.value,days:V.value,resourceIndex:e,indentLevel:a,label:i},l=t[f.resourceKey];d.droppable=D.value===l;const c="function"===typeof f.resourceClass?f.resourceClass({scope:d}):{};return h("div",{key:t[f.resourceKey]+"-"+e,ref:e=>{v.value[t[f.resourceKey]]=e},tabindex:!0===s?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===S.value,"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===s},style:{...o,...u({scope:d})},onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"resource",d)?D.value=l:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"resource",d)?D.value=l:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"resource",d)?D.value=l:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"resource",d)?D.value=l:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&void 0!==M.value.onClickResource&&w("click-resource",{scope:d,event:e})},...Z("-resource",e=>{return{scope:d,event:e}})},[[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;w("resource-expanded",{expanded:t.expanded,scope:d})}}),h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:d}):i]),useFocusHelper()]])}function Ae(e,t,a=0,n=!0){const r=g["resource-days"],o=!0===S.value?convertToUnit(K.value):re.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:V.value,days:V.value},i={};i.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(i.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10)));const s={class:"q-calendar-scheduler__resource--days",style:i};return h("div",s,[...He(e,t,a,n),r&&r({scope:u})])}function He(t,a,n=0,r=!0){return 1===V.value.length&&parseInt(f.columnCount,10)>0?Array.apply(null,new Array(parseInt(f.columnCount,10))).map((e,t)=>t+parseInt(f.columnIndexStart,10)).map(e=>qe(V.value[0],e,t,a,n,r)):V.value.map(e=>qe(e,void 0,t,a,n,r))}function qe(e,t,a,n,r=0,o=!0){const u=g.day,i=f.dayStyle||R,s=!0!==f.noActiveDate&&L.value.date===e.date,d=e.date+":"+a[f.resourceKey]+(void 0!==t?":"+t:""),l=D.value===d,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:s,droppable:l},v=!0===S.value?convertToUnit(K.value):re.value,m={width:v,maxWidth:v,...i({scope:c})};m.height=parseInt(f.resourceHeight,10)>0?convertToUnit(parseInt(f.resourceHeight,10)):"auto",parseInt(f.resourceMinHeight,10)>0&&(m.minHeight=convertToUnit(parseInt(f.resourceMinHeight,10)));const p="function"===typeof f.dayClass?f.dayClass({scope:c}):{},y=!0===f.focusable&&f.focusType.includes("day")&&!0===o;return h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...p,...W(e),"q-calendar__hoverable":!0===f.hoverable,"q-calendar__focusable":!0===y},style:m,onDragenter:e=>{void 0!==f.dragEnterFunc&&"function"===typeof f.dragEnterFunc&&(!0===f.dragEnterFunc(e,"day",c)?D.value=d:D.value="")},onDragover:e=>{void 0!==f.dragOverFunc&&"function"===typeof f.dragOverFunc&&(!0===f.dragOverFunc(e,"day",c)?D.value=d:D.value="")},onDragleave:e=>{void 0!==f.dragLeaveFunc&&"function"===typeof f.dragLeaveFunc&&(!0===f.dragLeaveFunc(e,"day",c)?D.value=d:D.value="")},onDrop:e=>{void 0!==f.dropFunc&&"function"===typeof f.dropFunc&&(!0===f.dropFunc(e,"day",c)?D.value=d:D.value="")},onKeydown:e=>{G(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{G(e,[13,32])&&(_.value=c.timestamp.date,void 0!==M.value.onClickResource&&w("click-resource",{scope:c,event:e}))},...Z("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),useFocusHelper()])}function Oe(){return h("div",{},"No resources have been defined")}function Re(){if(U.value){const{start:n,end:r,maxDays:o}=z.value;s.value=n.date,d.value=r.date,l.value=o}const e=c.width>0,t=f.modelResources&&f.modelResources.length>0,a=withDirectives(h("div",{key:s.value,class:"q-calendar-scheduler"},[!0===e&&!0===t&&!0!==S.value&&!0!==f.noHeader&&le(),!0===e&&!0===t&&Me(),!1===t&&Oe()]),[[ResizeObserver$1,se]]);if(!0!==f.animated)return a;{const u="q-calendar--"+("prev"===i.value?f.transitionPrev:f.transitionNext);return h(Transition,{name:u,appear:!0},()=>a)}}return watch([V],Q,{deep:!0,immediate:!0}),watch(()=>f.modelValue,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}_.value=e}m.value=e}),watch(_,(e,t)=>{if(_.value!==f.modelValue){if(!0===f.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));i.value=a>=n?"next":"prev"}w("update:model-value",e)}}),watch(m,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{p.value[m.value]?p.value[m.value].focus():J()}),watch(()=>f.maxDays,e=>{l.value=e}),onBeforeUpdate(()=>{p.value={};o.value={};u.value={};v.value={}}),onMounted(()=>{B()}),e({prev:ie,next:ue,move:$,moveToToday:oe,updateCurrent:C}),()=>j()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarScheduler:QCalendarScheduler,install(e){e.component(QCalendarScheduler.name,QCalendarScheduler)}};export default Plugin;export{QCalendarScheduler,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarScheduler={},e.Vue))})(this,function(e,Re){"use strict";const 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?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,p=31,l=12,u=1,m=1,d=7,s=60,i=24,c=6048e5;function We(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,S(t,2),S(a,2)].join("-")}function P(e,t,a){let n=Q(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=A(n);return n=j(n,t[0],H),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function K(e,t,a){let n=Q(e);const r=F(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=H(n);return n=j(n,t[t.length-1],A),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function x(e){const t=Q(e);return t.day=m,k(t),t}function C(e){const t=Q(e);return t.day=F(t.year,t.month),k(t),t}function Y(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=n.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!a.exec(e)}function Oe(e){const t=a.exec(e);return t?{date:e,time:S(parseInt(t[6],10)||0,2)+":"+S(parseInt(t[8],10)||0,2),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 Be(e,t){let a=Oe(e);return null===a?null:(a=k(a),t&&X(a,t,a.hasTime),a)}function h(e){return k({date:S(e.getFullYear(),4)+"-"+S(e.getMonth()+1,2)+"-"+S(e.getDate(),2),time:S(e.getHours()||0,2)+":"+S(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Ve(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function f(e){return 100*e.hour+e.minute}function $(e){return Ve(e)+f(e)}function X(e,t,a=!1){let n=Ve(t),r=Ve(e),o=n===r;return e.hasTime&&a&&o&&(n=f(t),r=f(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function Z(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/s),e.minute=t%s,e.time=T(e),a&&X(e,a,!0),e}function g(e){return e.weekday=D(e),e}function w(e){return e.doy=y(e),e}function b(e,t,a,n,r){const o=Ve(e);if(void 0!==t){const u=Ve(Oe(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ve(Oe(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const i=Oe(r[s][0]),c=Oe(r[s][1]);if(Ne(e,i,c)){e.disabled=!0;break}}else{const v=Ve(Be(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=T(e),e.date=I(e),e.weekday=D(e),e.doy=y(e),e.workweek=_(e),e}function y(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 _(e){let t;if(t=0===e.year?Date.UTC(new Date):R(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/c;return 1+Math.floor(o)}function D(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function q(e){return 1===(e%4===0^e%100===0^e%400===0)}function F(e,t){return(q(e)?o:r)[t]}function Q(e){return{...e}}function S(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function I(e){let t=`${S(e.year,4)}-${S(e.month,2)}`;return e.hasDay&&(t+=`-${S(e.day,2)}`),t}function T(e){return e.hasTime?`${S(e.hour,2)}:${S(e.minute,2)}`:""}function G(e){return I(e)+" "+(e.hasTime?T(e):"00:00")}function A(e){return++e.day,e.weekday=(e.weekday+1)%d,e.day>t&&e.day>F(e.year,e.month)&&(e.day=m,++e.month,e.month>l&&(e.month=u,++e.year)),e}function H(e){return e.day--,e.weekday=(e.weekday+6)%d,e.day<m&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=F(e.year,e.month)),e}function M(e,t=A,a=1,n=[0,1,2,3,4,5,6]){return E(e,t,a,n)}function E(e,t=A,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==A||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function j(e,t,a=A,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function L(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<d;++a){let t=1;for(let e=1;e<d;++e){const r=(a+e)%d;if(n[r])break;++t}e[a]=n[a]*t}return e}function J(e,t,a,n,r,o,u=[],l=[],d=42,s=0){const i=Ve(t),c=[];let v=Q(e),h=0,f=h===i;if(i<Ve(e))return c;while((!f||c.length<s)&&c.length<d){if(h=Ve(v),f=f||h>i&&c.length>=s,f)break;if(0!==n[v.weekday]){const y=Q(v);k(y),X(y,a),b(y,r,o,u,l),c.push(y),v=E(v,A)}else v=E(v,A)}return c}function ee(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,d=Q(t);u.push(Z(d,l,o))}return u}function te(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(W(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${G(t)}`),""}}}function R(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function W(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function O(e){return isFinite(parseInt(e,10))}function Ne(e,t,a,n){const r=Ve(e)+(!0===n?f(e):0),o=Ve(t)+(!0===n?f(t):0),u=Ve(a)+(!0===n?f(a):0);return r>=o&&r<=u}function ae(e,t){const n=Q(e);let r;return V(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=B.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&re(n,B[r]),k(n),n}const B=["minute","hour","day","month"];function V(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function N(e){if(e.minute>=s||e.minute<0){const t=Math.floor(e.minute/s);e.minute-=t*s,e.hour+=t,z(e)}return e}function z(e){if(e.hour>=i||e.hour<0){const t=Math.floor(e.hour/i);e.hour-=t*i,e.day+=t,U(e)}return e}function U(t){ne(t);let a=F(t.year,t.month);if(t.day>a){++t.month,t.month>l&&ne(t);let e=t.day-a;a=F(t.year,t.month);do{e>a&&(++t.month,t.month>l&&ne(t),e-=a,a=F(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&ne(t),a=F(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&ne(t),a=F(t.year,t.month))}while(e>a);t.day=a-e}return t}function ne(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function re(e,t){switch(t){case"minute":return N(e);case"hour":return z(e);case"day":return U(e);case"month":return ne(e)}}function ze(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function Ue(e,t){return 0===t?e:e.slice(0,t)}var Pe={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ke(t,a,{scrollArea:e,pane:n}){if(!a){const i="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(i),new Error(i)}const r=Re.reactive({width:0,height:0}),o=Re.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Re.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Re.withDirectives(Re.h("div",e,[a()]),[[Pe,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:d,__renderCalendar:s}}const oe={modelValue:{type:String,default:We(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function Ye(r,{startDate:e,endDate:t,times:a}){const n=Re.computed(()=>L(r.weekdays)),o=Re.computed(()=>Be(e.value)),u=Re.computed(()=>{if("0000-00-00"===t.value)return f(o.value);return Be(t.value)}),l=Re.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return te(r.locale,(e,t)=>a)}),d=Re.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return te(r.locale,(e,t)=>t?n:a)}),s=Re.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return te(r.locale,e=>t)});function i(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ve(t),r=Ve(Oe(e[0])),o=Ve(Oe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=i(a,e),{firstDay:u,lastDay:l,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===d),"q-disabled-day disabled":!0===e.disabled}}function h(e){return P(e,r.weekdays,a.today)}function f(e){return K(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:i,checkDays:c,getRelativeClasses:v,startOfWeek:h,endOfWeek:f,dayStyleDefault:y}}function ue(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function le(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function de(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function se(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function ie(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=de(n);o<=0?l!==r&&ue(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;ue(n,a);a!==r&&ie(n,r,o-t,e)})}function ce(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=se(n);o<=0?l!==r&&le(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&ce(n,r,o-t,e)})}const ve={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:O},resourceMinHeight:{type:[Number,String],default:70,validator:O},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function $e(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:l,headerColumnRef:d}){const s=Re.computed(()=>parseInt(o.intervalStart,10)),f=Re.computed(()=>parseInt(o.intervalMinutes,10)),i=Re.computed(()=>parseInt(o.intervalCount,10)),y=Re.computed(()=>parseFloat(o.intervalHeight)),h=Re.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&d.value&&(e=d.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),p=Re.computed(()=>s.value*f.value),c=Re.computed(()=>i.value*y.value),v=Re.computed(()=>i.value*h.value),m=Re.computed(()=>k(a.value)),g=Re.computed(()=>_(r.value)),w=Re.computed(()=>{return J(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=Re.computed(()=>{return w.value.map(e=>ee(e,s.value,f.value,i.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function _(e){return K(e,o.weekdays,t.today)}function D(e,t){return e&&e.length>0&&e.includes(G(t))}function q(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=$(t),r=$(Oe(e[0])),o=$(Oe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function x(e,t=[],a=[]){const n=D(t,e),{firstDay:r,lastDay:o,betweenDays:u}=q(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function C(e,t=0,a){return[]}const F=Re.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return te(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),S=Re.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return te(o.locale,e=>t)});function I(e){const t=b.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function T(e){}function A(e){}function H(e,t,a=!1,n=void 0){let r=Q(t);const o=e.currentTarget.getBoundingClientRect(),u=p.value,l=e,d=e,s=l.changedTouches||l.touches,i=(s&&s[0]?s[0]:d).clientY,c=(i-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*f.value),h=u+v;return 0!==h&&(r=ae(r,{minute:h})),n&&X(r,n,!0),r}function M(e,t,a=!1,n=void 0){const r=Q(t),o=e.currentTarget.getBoundingClientRect(),u=p.value,l=e,d=e,s=l.changedTouches||l.touches,i=(s&&s[0]?s[0]:d).clientY,c=(i-o.top)/y.value,v=Math.floor((a?Math.floor(c):c)*f.value),h=u+v;return Z(r,h,n)}function E(e,t,a=!1,n=void 0){const r=Q(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:l).clientX,i=(s-o.left)/h.value,c=Math.floor((a?Math.floor(i):i)*f.value),v=c+(60*t.hour+t.minute);return Z(r,v,n)}function j(e,t){const a={timestamp:e};return a.timeStartPos=z,a.timeDurationHeight=O,void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:Q(e)};return a.timeStartPosX=U,a.timeDurationWidth=B,void 0!==t&&(a.index=t),a}function R(e,t=0){const a=z(e);return!(!1===a||!n.value)&&(ie(n.value,a,t),!0)}function W(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(ce(n.value,a,t),!0)}function O(e){return e/f.value*y.value}function B(e){return e/f.value*h.value}function V(e){return parseInt(e,10)*f.value/y.value}function N(e){return parseInt(e,10)*f.value/h.value}function z(e,t=!0){const a=Y(e);if(!1===a)return!1;const n=p.value,r=i.value*f.value,o=(a-n)/r;let u=o*c.value;return t&&(u<0&&(u=0),u>c.value&&(u=c.value)),u}function U(e,t=!0){const a=Y(e);if(!1===a)return!1;const n=p.value,r=i.value*f.value,o=(a-n)/r;let u=o*v.value;return t&&(u<0&&(u=0),u>v.value&&(u=v.value)),u}return{parsedIntervalStart:s,parsedIntervalMinutes:f,parsedIntervalCount:i,parsedIntervalHeight:y,parsedCellWidth:h,parsedStartMinute:p,bodyHeight:c,bodyWidth:v,parsedWeekStart:m,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:F,ariaDateTimeFormatter:S,arrayHasDateTime:D,checkIntervals:q,getIntervalClasses:x,getResourceClasses:C,showIntervalLabelDefault:I,showResourceLabelDefault:T,styleDefault:A,getTimestampAtEventInterval:H,getTimestampAtEvent:M,getTimestampAtEventX:E,getScopeForSlot:j,getScopeForSlotX:L,scrollToTime:R,scrollToTimeX:W,timeDurationHeight:O,timeDurationWidth:B,heightToMinutes:V,widthToMinutes:N,timeStartPos:z,timeStartPosX:U}}const he={columnCount:{type:[Number,String],default:0,validator:O},columnIndexStart:{type:[Number,String],default:0,validator:O}},fe={maxDays:{type:Number,default:1}},ye={now:{type:String,validator:e=>""===e||v(e),default:""}};function Xe(e){const t=Re.reactive({now:Be("0000-00-00 00:00"),today:Be("0000-00-00")}),a=Re.computed(()=>e.now?Be(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return h(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Re.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function Ze(r,{parsedView:o,times:u,parsedValue:l}){const e=Re.computed(()=>{const e=l.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=x(e),n=C(e),t=F(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,u.today),n=K(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=M(Q(n),A,t>1?t-1:t,r.weekdays),k(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=x(e),n=C(e),k(n),t=F(a.year,a.month);break;case"resource":t=1,n=M(Q(n),A,t,r.weekdays),k(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const pe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let me,ge;function we(e,a){const t={};for(const n in e){const r=e[n],o=pe("on-"+n);if(void 0===me)return void console.warn("$listeners has not been set up");if(void 0!==me.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ge(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function be(e,t){return we(ke(e),t)}function ke(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function _e(e){return Object.keys(ke(e))}function Qe(e,t){return ge=e,me=t,{getMouseEventHandlers:we,getDefaultMouseEventHandlers:be,getMouseEventName:ke,getRawMouseEvents:_e}}const De=["moved"];function Ge(l,{parsedView:d,parsedValue:s,weekdaySkips:i,direction:c,maxDays:v,times:h,emittedValue:f,emit:y}){function e(a=1){if(0!==a){let e=Q(s.value);const n=a>0,r=n?A:H,o=n?p:m;let t=n?a:-a;c.value=n?"next":"prev";const u=i.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),g(e);while(0===i.value[e.weekday])e=ae(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":E(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":E(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":E(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),X(e,h.now),f.value=e.date,y("moved",e)}else f.value=We()}return{move:e}}const qe=/^on[A-Z]/;function Je(e=Re.getCurrentInstance()){return{emitListeners:Re.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===qe.test(e)&&(t[e]=!0)});return t})}}function et(){return[Re.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function tt(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Re.h("button",t,[a,!0===n&&et()])}const xe={cellWidth:[Number,String]};function at(e){const t=Re.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const Ce=["change"];function nt(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function rt(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Fe}=rt(),Se={useNavigation:Boolean};function ot(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:d,weekdaySkips:s,direction:i,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",p),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",p),document.removeEventListener("keydown",y),e=!1)}function h(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function f(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){h(e)&&Fe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function p(e){if(h(e)&&Fe(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:_();break;case 35:q();break;case 36:D();break;case 37:w();break;case 38:m();break;case 39:b();break;case 40:g();break}}function m(e){let t=Q(o.value);if("month"===l.value){if(t=ae(t,{day:-7}),o.value.month!==t.month)return i.value="prev",void(d.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ae(t,{minute:parseInt(a.intervalMinutes)}));i.value="prev",r.value=t.date}function g(e){let t=Q(o.value);if("month"===l.value){if(t=ae(t,{day:7}),o.value.month!==t.month)return i.value="next",void(d.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=ae(t,{minute:parseInt(a.intervalMinutes)}));i.value="next",r.value=t.date}function w(e){let t=Q(o.value);i.value="prev";do{t=ae(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(d.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(d.value=t.date)}else if("day"===l.value)return void(d.value=t.date);r.value=t.date}function b(e){let t=Q(o.value);i.value="next";do{t=ae(t,{day:1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(d.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(d.value=t.date)}else if("day"===l.value)return void(d.value=t.date);r.value=t.date}function k(e){let t=Q(o.value);if("month"===l.value||"month-interval"===l.value){t=ae(t,{month:-1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=ae(t,{day:a})}else"day"===l.value?t=ae(t,{day:-1}):"week"===l.value&&(t=ae(t,{day:-7}));i.value="prev",r.value=t.date}function _(e){let t=Q(o.value);if("month"===l.value||"month-interval"===l.value){t=ae(t,{month:1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=ae(t,{day:a})}else"day"===l.value?t=ae(t,{day:1}):"week"===l.value&&(t=ae(t,{day:7}));i.value="next",r.value=t.date}function D(e){let t=Q(o.value);"month"===l.value||"month-interval"===l.value?t=x(t):"week"===l.value&&(t=P(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=ae(t,{day:-1});r.value=t.date}function q(e){let t=Q(o.value);"month"===l.value||"month-interval"===l.value?t=C(t):"week"===l.value&&(t=K(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=ae(t,{day:-1});r.value=t.date}return Re.onBeforeUnmount(()=>{v()}),Re.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:f}}var Ie=Re.defineComponent({name:"QCalendarScheduler",directives:[Pe],props:{...oe,...ve,...he,...fe,...ye,...xe,...Se},emits:["update:model-value","update:model-resources","resource-expanded",...Ce,...De,..._e("-date"),..._e("-day-resource"),..._e("-head-resources"),..._e("-head-day"),..._e("-resource")],setup(p,{slots:m,emit:g,expose:e}){const t=Re.ref(null),a=Re.ref(null),n=Re.ref(null),h=Re.ref(null),r=Re.ref(null),f=Re.ref({}),v=Re.ref({}),o=Re.ref({}),u=Re.ref({}),l=Re.ref("next"),d=Re.ref(p.modelValue||We()),s=Re.ref("0000-00-00"),i=Re.ref(0),w=Re.ref(p.modelValue),c=Re.reactive({width:0,height:0}),y=Re.ref(!1),b=Re.ref(!1),k=Re.ref(null),_=Re.ref(null),D=Re.computed(()=>{if("month"===p.view)return"month-interval";return p.view}),q=Re.getCurrentInstance();if(null===q)throw new Error("current instance is null");const{emitListeners:x}=Je(q),{isSticky:C}=at(p),{times:F,setCurrent:S,updateCurrent:I}=Xe(p);I(),S();const{weekdaySkips:T,parsedStart:A,parsedEnd:H,dayFormatter:M,weekdayFormatter:E,ariaDateFormatter:j,dayStyleDefault:L,getRelativeClasses:R}=Ye(p,{startDate:d,endDate:s,times:F}),W=Re.computed(()=>{return Be(p.modelValue,F.now)||A.value||F.today});r.value=W.value,h.value=W.value.date;const O=Re.computed(()=>{if(0===i.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===P.value||0===P.value.length)return!0;const e=P.value[0];const t=P.value[P.value.length-1];return!0!==Ne(W.value,e,t)}),{renderValues:B}=Ze(p,{parsedView:D,times:F,parsedValue:W}),{rootRef:V,scrollWidth:N,__initCalendar:z,__renderCalendar:U}=Ke(p,Le,{scrollArea:t,pane:a}),{days:P,parsedCellWidth:K,styleDefault:Y}=$e(p,{weekdaySkips:T,times:F,scrollArea:t,parsedStart:A,parsedEnd:H,maxDays:i,size:c,headerColumnRef:n}),{move:$}=Ge(p,{parsedView:D,parsedValue:W,weekdaySkips:T,direction:l,maxDays:i,times:F,emittedValue:w,emit:g}),{getDefaultMouseEventHandlers:X}=Qe(g,x),{checkChange:Z}=nt(g,{days:P,lastStart:k,lastEnd:_}),{isKeyCode:Q}=rt(),{tryFocus:G}=ot(p,{rootRef:V,focusRef:h,focusValue:r,datesRef:f,days:P,parsedView:D,parsedValue:W,emittedValue:w,weekdaySkips:T,direction:l,times:F}),J=Re.computed(()=>{{if("day"===p.view&&parseInt(p.columnCount,10)>1)return parseInt(p.columnCount,10);if("day"===p.view&&p.maxDays&&p.maxDays>1)return p.maxDays}return P.value.length}),ee=Re.computed(()=>{if(V.value)return parseInt(getComputedStyle(V.value).getPropertyValue("--calendar-resources-width"),10);return 0}),te=Re.computed(()=>{const e=parseInt(p.resourceHeight,10);if(0===e)return"auto";return e}),ae=Re.computed(()=>{return parseInt(p.resourceMinHeight,10)}),ne=Re.computed(()=>{if(V.value){const e=c.width||V.value.getBoundingClientRect().width;if(e&&ee.value&&J.value)return(e-N.value-ee.value)/J.value+"px"}return 100/J.value+"%"});function re(){w.value=We()}function oe(e=1){$(e)}function ue(e=1){$(-e)}function le({width:e,height:t}){c.width=e,c.height=t}function de(e){return e.date===w.value}function se(){return Re.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===C.value},style:{marginRight:N.value+"px"}},[ie(),ce()])}function ie(){const e=m["head-resources"],t={days:P.value,timestamps:P.value,date:p.modelValue,resources:p.modelResources};return Re.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===C.value},...X("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ce(){return Re.h("div",{ref:n,class:{"q-calendar-scheduler__head--days__column":!0}},[ve(),he()])}function ve(){return Re.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...fe()])}function he(){const e=m["head-days-events"];return Re.nextTick(()=>{if(u.value&&0===parseInt(p.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),Re.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&Re.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:P.value,days:P.value,ref:u}})]),...ye()])}function fe(){return 1===P.value.length&&parseInt(p.columnCount,10)>0?Array.apply(null,new Array(parseInt(p.columnCount,10))).map((e,t)=>t+parseInt(p.columnIndexStart,10)).map(e=>pe(P.value[0],e)):P.value.map(e=>pe(e))}function ye(){return 1===P.value.length&&parseInt(p.columnCount,10)>0?Array.apply(null,new Array(parseInt(p.columnCount,10))).map((e,t)=>t+parseInt(p.columnIndexStart,10)).map(e=>ge(P.value[0],e)):P.value.map(e=>ge(e))}function pe(t,e){const a=m["head-day"],n=m["head-date"],r=!0!==p.noActiveDate&&de(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date};void 0!==e&&(o.columnIndex=e);const u=!0===C.value?ze(K.value):ne.value,l=p.weekdayStyle||L,d={width:u,maxWidth:u,minWidth:u,...l({scope:o})};!0===C.value&&(d.minWidth=u);const s="function"===typeof p.weekdayClass?p.weekdayClass({scope:o}):{},i=!0===p.focusable&&p.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===i?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...R(t),"q-active-date":r,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===i},style:d,onFocus:e=>{!0===i&&(h.value=c)},onKeydown:e=>{!0!==t.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&Q(e,[13,32])&&(w.value=t.date)},...X("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return Re.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&me(t),void 0===a&&n&&n({scope:o}),void 0===a&&qe(t,e),et()])}function me(e){return"stacked"===p.dateHeader?[!0!==p.noDefaultHeaderText&&we(e),!0!==p.noDefaultHeaderBtn&&ke(e)]:"inline"===p.dateHeader?("left"===p.weekdayAlign&&"right"===p.dateAlign||"right"===p.weekdayAlign&&p.dateAlign,Re.h("div",{class:"q-calendar__header--inline"},[!0!==p.noDefaultHeaderText&&we(e),!0!==p.noDefaultHeaderBtn&&ke(e)])):"inverted"===p.dateHeader?("left"===p.weekdayAlign&&"right"===p.dateAlign||"right"===p.weekdayAlign&&p.dateAlign,Re.h("div",{class:"q-calendar__header--inline"},[!0!==p.noDefaultHeaderBtn&&ke(e),!0!==p.noDefaultHeaderText&&we(e)])):void 0}function ge(e,t){const a=m["head-day-event"],n=!0!==p.noActiveDate&&de(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date};void 0!==t&&(r.columnIndex=t);const o=!0===C.value?ze(K.value):ne.value,u={width:o,maxWidth:o,minWidth:o};return!0===C.value&&(u.minWidth=o),Re.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...R(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function we(e){const t=m["head-weekday-label"],a=!0===p.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+p.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Re.h("div",r,t&&t({scope:n})||be(e,a))}function be(e,t){const a=E.value(e,t||p.weekdayBreakpoints[0]>0&&K.value<=p.weekdayBreakpoints[0]);return Re.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},p.weekdayBreakpoints[1]>0&&K.value<=p.weekdayBreakpoints[1]?Ue(a,p.minWeekdayLabel):a)}function ke(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+p.dateAlign]:!0}};return Re.h("div",t,_e(e))}function _e(a){const e=!0!==p.noActiveDate&&de(a),t=M.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===p.dateType,"q-calendar__button--rounded":"rounded"===p.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Q(e,[13,32])&&(w.value=a.date,void 0!==x.value.onClickDate&&g("click-date",{scope:o}))},...X("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==p.noAria&&(u.ariaLabel=j.value(a)),r?r({scope:o}):tt(p,u,n?n({scope:o}):t)}function De(e,t){const a=m["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Re.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function qe(e,t){const a=m["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Re.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function xe(){return Re.h("div",{class:"q-calendar-scheduler__body"},[Ce()])}function Ce(){return!0===C.value?Re.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==C.value&&He(),Se()]):!0===p.noScroll?Fe():Re.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return Re.h("div",{ref:a,class:"q-calendar-scheduler__pane"},[Se()])}function Se(){return Re.h("div",{class:"q-calendar-scheduler__day--container"},[!0===C.value&&!0!==p.noHeader&&se(),Ie()])}function Ie(e=void 0,a=0,n=!0){return void 0===e&&(e=p.modelResources),e.map((e,t)=>{return Te(e,t,a,void 0!==e.children?e.expanded:n)})}function Te(e,t,a=0,n=!0){const r={};r.height=void 0!==e.height?ze(parseInt(e.height,10)):te.value?ze(te.value):"auto",ae.value>0&&(r.minHeight=ze(ae.value));const o=Re.h("div",{key:e[p.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Ae(e,t,a,n),He(e,t,a,n)]);return void 0!==e.children?[o,Re.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ie(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Ae(t,e,a=0,n=!0){const r=m["resource-label"],o={};o.height=void 0!==t.height?ze(parseInt(t.height,10)):te.value?ze(te.value):"auto",parseInt(p.resourceMinHeight,10)>0&&(o.minHeight=ze(parseInt(p.resourceMinHeight,10)));const u=p.resourceStyle||Y,l=t[p.resourceLabel],d=!0===p.focusable&&p.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:P.value,days:P.value,resourceIndex:e,indentLevel:a,label:l},i=t[p.resourceKey];s.droppable=b.value===i;const c="function"===typeof p.resourceClass?p.resourceClass({scope:s}):{};return Re.h("div",{key:t[p.resourceKey]+"-"+e,ref:e=>{v.value[t[p.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===C.value,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===d},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"resource",s)?b.value=i:b.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"resource",s)?b.value=i:b.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"resource",s)?b.value=i:b.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"resource",s)?b.value=i:b.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==x.value.onClickResource&&g("click-resource",{scope:s,event:e})},...X("-resource",e=>{return{scope:s,event:e}})},[[Re.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;g("resource-expanded",{expanded:t.expanded,scope:s})}}),Re.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):l]),et()]])}function He(e,t,a=0,n=!0){const r=m["resource-days"],o=!0===C.value?ze(K.value):ne.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:P.value,days:P.value},l={};l.height=parseInt(p.resourceHeight,10)>0?ze(parseInt(p.resourceHeight,10)):"auto",parseInt(p.resourceMinHeight,10)>0&&(l.minHeight=ze(parseInt(p.resourceMinHeight,10)));const d={class:"q-calendar-scheduler__resource--days",style:l};return Re.h("div",d,[...Me(e,t,a,n),r&&r({scope:u})])}function Me(t,a,n=0,r=!0){return 1===P.value.length&&parseInt(p.columnCount,10)>0?Array.apply(null,new Array(parseInt(p.columnCount,10))).map((e,t)=>t+parseInt(p.columnIndexStart,10)).map(e=>Ee(P.value[0],e,t,a,n,r)):P.value.map(e=>Ee(e,void 0,t,a,n,r))}function Ee(e,t,a,n,r=0,o=!0){const u=m.day,l=p.dayStyle||L,d=!0!==p.noActiveDate&&W.value.date===e.date,s=e.date+":"+a[p.resourceKey]+(void 0!==t?":"+t:""),i=b.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:i},v=!0===C.value?ze(K.value):ne.value,h={width:v,maxWidth:v,...l({scope:c})};h.height=parseInt(p.resourceHeight,10)>0?ze(parseInt(p.resourceHeight,10)):"auto",parseInt(p.resourceMinHeight,10)>0&&(h.minHeight=ze(parseInt(p.resourceMinHeight,10)));const f="function"===typeof p.dayClass?p.dayClass({scope:c}):{},y=!0===p.focusable&&p.focusType.includes("day")&&!0===o;return Re.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...f,...R(e),"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===y},style:h,onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"day",c)?b.value=s:b.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"day",c)?b.value=s:b.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"day",c)?b.value=s:b.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"day",c)?b.value=s:b.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&(w.value=c.timestamp.date,void 0!==x.value.onClickResource&&g("click-resource",{scope:c,event:e}))},...X("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),et()])}function je(){return Re.h("div",{},"No resources have been defined")}function Le(){if(O.value){const{start:n,end:r,maxDays:o}=B.value;d.value=n.date,s.value=r.date,i.value=o}const e=c.width>0,t=p.modelResources&&p.modelResources.length>0,a=Re.withDirectives(Re.h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===e&&!0===t&&!0!==C.value&&!0!==p.noHeader&&se(),!0===e&&!0===t&&xe(),!1===t&&je()]),[[Pe,le]]);if(!0!==p.animated)return a;{const u="q-calendar--"+("prev"===l.value?p.transitionPrev:p.transitionNext);return Re.h(Re.Transition,{name:u,appear:!0},()=>a)}}return Re.watch([P],Z,{deep:!0,immediate:!0}),Re.watch(()=>p.modelValue,(e,t)=>{if(w.value!==p.modelValue){if(!0===p.animated){const a=Ve(Oe(e)),n=Ve(Oe(t));l.value=a>=n?"next":"prev"}w.value=e}h.value=e}),Re.watch(w,(e,t)=>{if(w.value!==p.modelValue){if(!0===p.animated){const a=Ve(Oe(e)),n=Ve(Oe(t));l.value=a>=n?"next":"prev"}g("update:model-value",e)}}),Re.watch(h,e=>{e&&(r.value=Be(e))}),Re.watch(r,e=>{f.value[h.value]?f.value[h.value].focus():G()}),Re.watch(()=>p.maxDays,e=>{i.value=e}),Re.onBeforeUpdate(()=>{f.value={};o.value={};u.value={};v.value={}}),Re.onMounted(()=>{z()}),e({prev:ue,next:oe,move:$,moveToToday:re,updateCurrent:I}),()=>U()}}),Te="@quasar/quasar-ui-qcalendar",Ae="4.0.0-beta.2",He="Jeff Galbraith <jeff@quasar.dev>",Me="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",Ee="MIT",je="dist/index.esm.js",Le="dist/index.common.js",ut="dist/types/index.d.ts",lt={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},dt={type:"github",url:"https://github.com/sponsors/hawkeye64"},st={access:"public"},it={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},ct="https://github.com/quasarframework/quasar-ui-qcalendar/issues",vt="https://github.com/quasarframework/quasar-ui-qcalendar",ht=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ft={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},yt={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},pt=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pt={name:Te,version:Ae,author:He,description:Me,license:Ee,module:je,main:Le,typings:ut,scripts:lt,funding:dt,publishConfig:st,repository:it,bugs:ct,homepage:vt,keywords:ht,vetur:ft,devDependencies:yt,browserslist:pt};const{version:mt}=pt;e.QCalendarScheduler=Ie,e.version=mt,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarScheduler={},e.Vue))})(this,function(e,Re){"use strict";const 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?)|)/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,p=31,l=12,u=1,m=1,d=7,s=60,i=24,c=6048e5;function We(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,I(t,2),I(a,2)].join("-")}function P(e,t,a){let n=Z(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=H(n);return n=L(n,t[0],M),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function K(e,t,a){let n=Z(e);const r=S(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=M(n);return n=L(n,t[t.length-1],H),n=k(n),a&&(n=X(n,a,n.hasTime)),n}function x(e){const t=Z(e);return t.day=m,k(t),t}function C(e){const t=Z(e);return t.day=S(t.year,t.month),k(t),t}function Y(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=n.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function v(e){return!!a.exec(e)}function Oe(e){const t=a.exec(e);return t?{date:e,time:I(parseInt(t[6],10)||0,2)+":"+I(parseInt(t[8],10)||0,2),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 Be(e,t){let a=Oe(e);return null===a?null:(a=k(a),t&&X(a,t,a.hasTime),a)}function h(e){return k({date:I(e.getFullYear(),4)+"-"+I(e.getMonth()+1,2)+"-"+I(e.getDate(),2),time:I(e.getHours()||0,2)+":"+I(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Ve(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function f(e){return 100*e.hour+e.minute}function $(e){return Ve(e)+f(e)}function X(e,t,a=!1){let n=Ve(t),r=Ve(e),o=n===r;return e.hasTime&&a&&o&&(n=f(t),r=f(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function y(e,t,a){return e.hasTime=!0,e.hour=Math.floor(t/s),e.minute=t%s,e.time=A(e),a&&X(e,a,!0),e}function g(e){return e.weekday=q(e),e}function w(e){return e.doy=_(e),e}function b(e,t,a,n,r){const o=Ve(e);if(void 0!==t){const u=Ve(Oe(t));o<=u&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const l=Ve(Oe(a));o>=l&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const s in r)if(Array.isArray(r[s])&&2===r[s].length){const i=Oe(r[s][0]),c=Oe(r[s][1]);if(Ne(e,i,c)){e.disabled=!0;break}}else{const v=Ve(Be(r[s]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function k(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=A(e),e.date=T(e),e.weekday=q(e),e.doy=_(e),e.workweek=D(e),e}function _(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 D(e){let t;if(t=0===e.year?Date.UTC(new Date):W(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/c;return 1+Math.floor(o)}function q(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%l+1,o=a(e.year/100),u=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+u+a(u/4)+a(o/4))%7+7)%7}return t}function F(e){return 1===(e%4===0^e%100===0^e%400===0)}function S(e,t){return(F(e)?o:r)[t]}function Z(e){return{...e}}function I(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function T(e){let t=`${I(e.year,4)}-${I(e.month,2)}`;return e.hasDay&&(t+=`-${I(e.day,2)}`),t}function A(e){return e.hasTime?`${I(e.hour,2)}:${I(e.minute,2)}`:""}function Q(e){return T(e)+" "+(e.hasTime?A(e):"00:00")}function H(e){return++e.day,e.weekday=(e.weekday+1)%d,e.day>t&&e.day>S(e.year,e.month)&&(e.day=m,++e.month,e.month>l&&(e.month=u,++e.year)),e}function M(e){return e.day--,e.weekday=(e.weekday+6)%d,e.day<m&&(e.month--,e.month<u&&(e.year--,e.month=l),e.day=S(e.year,e.month)),e}function E(e,t=H,a=1,n=[0,1,2,3,4,5,6]){return j(e,t,a,n)}function j(e,t=H,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==H||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function L(e,t,a=H,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function R(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<d;++a){let t=1;for(let e=1;e<d;++e){const r=(a+e)%d;if(n[r])break;++t}e[a]=n[a]*t}return e}function G(e,t,a,n,r,o,u=[],l=[],d=42,s=0){const i=Ve(t),c=[];let v=Z(e),h=0,f=h===i;if(i<Ve(e))return c;while((!f||c.length<s)&&c.length<d){if(h=Ve(v),f=f||h>i&&c.length>=s,f)break;if(0!==n[v.weekday]){const y=Z(v);k(y),X(y,a),b(y,r,o,u,l),c.push(y),v=j(v,H)}else v=j(v,H)}return c}function J(t,a,n,r,o){const u=[];for(let e=0;e<r;++e){const l=(a+e)*n,d=Z(t);u.push(y(d,l,o))}return u}function ee(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(O(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${Q(t)}`),""}}}function W(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function O(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function B(e){return isFinite(parseInt(e,10))}function Ne(e,t,a,n){const r=Ve(e)+(!0===n?f(e):0),o=Ve(t)+(!0===n?f(t):0),u=Ve(a)+(!0===n?f(a):0);return r>=o&&r<=u}function te(e,t){const n=Z(e);let r;return N(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=V.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&re(n,V[r]),k(n),n}const V=["minute","hour","day","month"];function N(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function z(e){if(e.minute>=s||e.minute<0){const t=Math.floor(e.minute/s);e.minute-=t*s,e.hour+=t,U(e)}return e}function U(e){if(e.hour>=i||e.hour<0){const t=Math.floor(e.hour/i);e.hour-=t*i,e.day+=t,ae(e)}return e}function ae(t){ne(t);let a=S(t.year,t.month);if(t.day>a){++t.month,t.month>l&&ne(t);let e=t.day-a;a=S(t.year,t.month);do{e>a&&(++t.month,t.month>l&&ne(t),e-=a,a=S(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&ne(t),a=S(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&ne(t),a=S(t.year,t.month))}while(e>a);t.day=a-e}return t}function ne(e){if(e.month>l){const t=Math.floor(e.month/l);e.month=e.month%l,e.year+=t}else e.month<u&&(e.month+=l,--e.year);return e}function re(e,t){switch(t){case"minute":return z(e);case"hour":return U(e);case"day":return ae(e);case"month":return ne(e)}}function ze(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function Ue(e,t){return 0===t?e:e.slice(0,t)}var Pe={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ke(t,a,{scrollArea:e,pane:n}){if(!a){const i="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(i),new Error(i)}const r=Re.reactive({width:0,height:0}),o=Re.ref(null);function u({width:e,height:t}){r.width=e,r.height=t}const l=Re.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function d(){}function s(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return Re.withDirectives(Re.h("div",e,[a()]),[[Pe,u]])}return{rootRef:o,scrollWidth:l,__initCalendar:d,__renderCalendar:s}}const oe={modelValue:{type:String,default:We(),validator:e=>""===e||v(e)},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},bordered:Boolean,dark:Boolean,noAria:Boolean,noActiveDate:Boolean,noHeader:Boolean,noScroll:Boolean,shortWeekdayLabel:Boolean,noDefaultHeaderText:Boolean,noDefaultHeaderBtn:Boolean,minWeekdayLabel:{type:[Number,String],default:1},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},selectedDates:{type:Array,default:()=>[]},selectedStartEndDates:{type:Array,default:()=>[]},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","time","resource","task"].includes(e)&&(t=!1)});return t}}};function Ye(r,{startDate:e,endDate:t,times:a}){const n=Re.computed(()=>R(r.weekdays)),o=Re.computed(()=>Be(e.value)),u=Re.computed(()=>{if("0000-00-00"===t.value)return f(o.value);return Be(t.value)}),l=Re.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return ee(r.locale,(e,t)=>a)}),d=Re.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return ee(r.locale,(e,t)=>t?n:a)}),s=Re.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return ee(r.locale,e=>t)});function i(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=Ve(t),r=Ve(Oe(e[0])),o=Ve(Oe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=i(a,e),{firstDay:u,lastDay:l,betweenDays:d}=c(n,e);return{"q-past-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==u&&!0!==d&&!0!==l&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===u,"q-range":!0===d,"q-range-last":!0===l,"q-range-hover":!0===r&&(!0===u||!0===l||!0===d),"q-disabled-day disabled":!0===e.disabled}}function h(e){return P(e,r.weekdays,a.today)}function f(e){return K(e,r.weekdays,a.today)}function y(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:u,dayFormatter:l,weekdayFormatter:d,ariaDateFormatter:s,arrayHasDate:i,checkDays:c,getRelativeClasses:v,startOfWeek:h,endOfWeek:f,dayStyleDefault:y}}function ue(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function le(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function de(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function se(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function ie(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=de(n);o<=0?l!==r&&ue(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;ue(n,a);a!==r&&ie(n,r,o-t,e)})}function ce(n,r,o=0){const u=void 0===arguments[3]?performance.now():arguments[3],l=se(n);o<=0?l!==r&&le(n,r):requestAnimationFrame(e=>{const t=e-u;const a=l+(r-l)/Math.max(t,o)*t;setHorizontalScroll(n,a);a!==r&&ce(n,r,o-t,e)})}const ve={view:{type:String,validator:e=>["day","week","month","month-interval"].includes(e),default:"day"},modelResources:{type:Array},resourceKey:{type:[String,Number],default:"id"},resourceLabel:{type:[String,Number],default:"label"},resourceHeight:{type:[Number,String],default:0,validator:B},resourceMinHeight:{type:[Number,String],default:70,validator:B},resourceStyle:{type:Function,default:null},resourceClass:{type:Function,default:null},weekdayStyle:{type:Function,default:null},weekdayClass:{type:Function,default:null},dayStyle:{type:Function,default:null},dayClass:{type:Function,default:null},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)}};function $e(o,{weekdaySkips:e,times:t,scrollArea:n,parsedStart:a,parsedEnd:r,maxDays:u,size:l,headerColumnRef:d}){const s=Re.computed(()=>parseInt(o.intervalStart,10)),v=Re.computed(()=>parseInt(o.intervalMinutes,10)),i=Re.computed(()=>parseInt(o.intervalCount,10)),h=Re.computed(()=>parseFloat(o.intervalHeight)),f=Re.computed(()=>{let e=0;o.cellWidth?e=o.cellWidth:l.width>0&&d.value&&(e=d.value.offsetWidth/(o.columnCount>1?o.columnCount:u.value));return e}),c=Re.computed(()=>s.value*v.value),y=Re.computed(()=>i.value*h.value),p=Re.computed(()=>i.value*f.value),m=Re.computed(()=>k(a.value)),g=Re.computed(()=>_(r.value)),w=Re.computed(()=>{return G(a.value,r.value,t.today,e.value,o.disabledBefore,o.disabledAfter,o.disabledWeekdays,o.disabledDays,u.value)}),b=Re.computed(()=>{return w.value.map(e=>J(e,s.value,v.value,i.value,t.now))});function k(e){return P(e,o.weekdays,t.today)}function _(e){return K(e,o.weekdays,t.today)}function D(e,t){return e&&e.length>0&&e.includes(Q(t))}function q(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=$(t),r=$(Oe(e[0])),o=$(Oe(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function x(e,t=[],a=[]){const n=D(t,e),{firstDay:r,lastDay:o,betweenDays:u}=q(a,e);return{"q-selected":n,"q-range-first":!0===r,"q-range":!0===u,"q-range-last":!0===o,"q-disabled-interval disabled":!0===e.disabled}}function C(e,t=0,a){return[]}const F=Re.computed(()=>{const a={timeZone:"UTC",hour12:!o.hour24Format,hour:"2-digit",minute:"2-digit"};const n={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric",minute:"2-digit"};const r={timeZone:"UTC",hour12:!o.hour24Format,hour:"numeric"};return ee(o.locale,(e,t)=>t?0===e.minute?r:n:a)}),S=Re.computed(()=>{const t={timeZone:"UTC",dateStyle:"full",timeStyle:"short"};return ee(o.locale,e=>t)});function I(e){const t=b.value[0][0],a=t.hour===e.hour&&t.minute===e.minute;return!a&&0===e.minute}function T(e){}function A(e){}function H(e,t,a=!1,n=void 0){let r=Z(t);const o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:l).clientY,i=(s-o.top)/h.value,c=Math.floor((a?Math.floor(i):i)*v.value);return 0!==c&&(r=te(r,{minute:c})),n&&X(r,n,!0),r}function M(e,t,a=!1,n=void 0){const r=Z(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:l).clientY,i=(s-o.top)/h.value,c=Math.floor((a?Math.floor(i):i)*v.value);return 0!==c&&(r=te(r,{minute:c})),n&&X(r,n,!0),r}function E(e,t,a=!1,n=void 0){const r=Z(t),o=e.currentTarget.getBoundingClientRect(),u=e,l=e,d=u.changedTouches||u.touches,s=(d&&d[0]?d[0]:l).clientX,i=(s-o.left)/f.value,c=Math.floor((a?Math.floor(i):i)*v.value);return 0!==c&&(r=te(r,{minute:c})),n&&X(r,n,!0),r}function j(e,t){const a={timestamp:e};return a.timeStartPos=z,a.timeDurationHeight=O,void 0!==t&&(a.columnIndex=t),a}function L(e,t){const a={timestamp:Z(e)};return a.timeStartPosX=U,a.timeDurationWidth=B,void 0!==t&&(a.index=t),a}function R(e,t=0){const a=z(e);return!(!1===a||!n.value)&&(ie(n.value,a,t),!0)}function W(e,t=0){const a=U(e);return!(!1===a||!n.value)&&(ce(n.value,a,t),!0)}function O(e){return e/v.value*h.value}function B(e){return e/v.value*f.value}function V(e){return parseInt(e,10)*v.value/h.value}function N(e){return parseInt(e,10)*v.value/f.value}function z(e,t=!0){const a=Y(e);if(!1===a)return!1;const n=c.value,r=i.value*v.value,o=(a-n)/r;let u=o*y.value;return t&&(u<0&&(u=0),u>y.value&&(u=y.value)),u}function U(e,t=!0){const a=Y(e);if(!1===a)return!1;const n=c.value,r=i.value*v.value,o=(a-n)/r;let u=o*p.value;return t&&(u<0&&(u=0),u>p.value&&(u=p.value)),u}return{parsedIntervalStart:s,parsedIntervalMinutes:v,parsedIntervalCount:i,parsedIntervalHeight:h,parsedCellWidth:f,parsedStartMinute:c,bodyHeight:y,bodyWidth:p,parsedWeekStart:m,parsedWeekEnd:g,days:w,intervals:b,intervalFormatter:F,ariaDateTimeFormatter:S,arrayHasDateTime:D,checkIntervals:q,getIntervalClasses:x,getResourceClasses:C,showIntervalLabelDefault:I,showResourceLabelDefault:T,styleDefault:A,getTimestampAtEventInterval:H,getTimestampAtEvent:M,getTimestampAtEventX:E,getScopeForSlot:j,getScopeForSlotX:L,scrollToTime:R,scrollToTimeX:W,timeDurationHeight:O,timeDurationWidth:B,heightToMinutes:V,widthToMinutes:N,timeStartPos:z,timeStartPosX:U}}const he={columnCount:{type:[Number,String],default:0,validator:B},columnIndexStart:{type:[Number,String],default:0,validator:B}},fe={maxDays:{type:Number,default:1}},ye={now:{type:String,validator:e=>""===e||v(e),default:""}};function Xe(e){const t=Re.reactive({now:Be("0000-00-00 00:00"),today:Be("0000-00-00")}),a=Re.computed(()=>e.now?Be(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();u(e,t.now),l(e,t.now),u(e,t.today)}function o(){return h(new Date)}function u(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)}function l(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return Re.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:u,updateTime:l}}function Ze(r,{parsedView:o,times:u,parsedValue:l}){const e=Re.computed(()=>{const e=l.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=x(e),n=C(e),t=S(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=P(e,r.weekdays,u.today),n=K(a,r.weekdays,u.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=E(Z(n),H,t>1?t-1:t,r.weekdays),k(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=x(e),n=C(e),k(n),t=S(a.year,a.month);break;case"resource":t=1,n=E(Z(n),H,t,r.weekdays),k(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const pe=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let me,ge;function we(e,a){const t={};for(const n in e){const r=e[n],o=pe("on-"+n);if(void 0===me)return void console.warn("$listeners has not been set up");if(void 0!==me.value[o]){const u="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),l=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ge(n,a(t,n)));return r.result};u in t?Array.isArray(t[u])?t[u].push(l):t[u]=[t[u],l]:t[u]=l}}return t}function be(e,t){return we(ke(e),t)}function ke(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function _e(e){return Object.keys(ke(e))}function Qe(e,t){return ge=e,me=t,{getMouseEventHandlers:we,getDefaultMouseEventHandlers:be,getMouseEventName:ke,getRawMouseEvents:_e}}const De=["moved"];function Ge(l,{parsedView:d,parsedValue:s,weekdaySkips:i,direction:c,maxDays:v,times:h,emittedValue:f,emit:y}){function e(a=1){if(0!==a){let e=Z(s.value);const n=a>0,r=n?H:M,o=n?p:m;let t=n?a:-a;c.value=n?"next":"prev";const u=i.value.filter(e=>0!==e).length;while(--t>=0)switch(d.value){case"month":e.day=o,r(e),g(e);while(0===i.value[e.weekday])e=te(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":j(e,r,u,l.weekdays);break;case"day":case"scheduler":case"agenda":j(e,r,v.value,l.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":j(e,r,v.value,l.weekdays);break}g(e),k(e),w(e),X(e,h.now),f.value=e.date,y("moved",e)}else f.value=We()}return{move:e}}const qe=/^on[A-Z]/;function Je(e=Re.getCurrentInstance()){return{emitListeners:Re.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===qe.test(e)&&(t[e]=!0)});return t})}}function et(){return[Re.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function tt(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,Re.h("button",t,[a,!0===n&&et()])}const xe={cellWidth:[Number,String]};function at(e){const t=Re.computed(()=>void 0!==e.cellWidth);return{isSticky:t}}const Ce=["change"];function nt(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function rt(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:Fe}=rt(),Se={useNavigation:Boolean};function ot(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:u,parsedView:l,emittedValue:d,weekdaySkips:s,direction:i,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",p),document.addEventListener("keydown",y))}function v(){document&&(document.removeEventListener("keyup",p),document.removeEventListener("keydown",y),e=!1)}function h(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function f(){let e=0;const t=setInterval(()=>{u.value[r.value]?(u.value[r.value].focus(),50!==++e&&document.activeElement!==u.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function y(e){h(e)&&Fe(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function p(e){if(h(e)&&Fe(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:k();break;case 34:_();break;case 35:q();break;case 36:D();break;case 37:w();break;case 38:m();break;case 39:b();break;case 40:g();break}}function m(e){let t=Z(o.value);if("month"===l.value){if(t=te(t,{day:-7}),o.value.month!==t.month)return i.value="prev",void(d.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=te(t,{minute:parseInt(a.intervalMinutes)}));i.value="prev",r.value=t.date}function g(e){let t=Z(o.value);if("month"===l.value){if(t=te(t,{day:7}),o.value.month!==t.month)return i.value="next",void(d.value=t.date)}else"day"!==l.value&&"week"!==l.value&&"month-interval"!==l.value||(t=te(t,{minute:parseInt(a.intervalMinutes)}));i.value="next",r.value=t.date}function w(e){let t=Z(o.value);i.value="prev";do{t=te(t,{day:-1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(d.value=t.date)}else if("week"===l.value){if(t.weekday>o.value.weekday)return void(d.value=t.date)}else if("day"===l.value)return void(d.value=t.date);r.value=t.date}function b(e){let t=Z(o.value);i.value="next";do{t=te(t,{day:1})}while(0===s.value[t.weekday]);if("month"===l.value||"month-interval"===l.value){if(o.value.month!==t.month)return void(d.value=t.date)}else if("week"===l.value){if(t.weekday<o.value.weekday)return void(d.value=t.date)}else if("day"===l.value)return void(d.value=t.date);r.value=t.date}function k(e){let t=Z(o.value);if("month"===l.value||"month-interval"===l.value){t=te(t,{month:-1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=te(t,{day:a})}else"day"===l.value?t=te(t,{day:-1}):"week"===l.value&&(t=te(t,{day:-7}));i.value="prev",r.value=t.date}function _(e){let t=Z(o.value);if("month"===l.value||"month-interval"===l.value){t=te(t,{month:1});const a=t.day<=15?1:-1;while(0===s.value[t.weekday])t=te(t,{day:a})}else"day"===l.value?t=te(t,{day:1}):"week"===l.value&&(t=te(t,{day:7}));i.value="next",r.value=t.date}function D(e){let t=Z(o.value);"month"===l.value||"month-interval"===l.value?t=x(t):"week"===l.value&&(t=P(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=te(t,{day:-1});r.value=t.date}function q(e){let t=Z(o.value);"month"===l.value||"month-interval"===l.value?t=C(t):"week"===l.value&&(t=K(t,a.weekdays,c.today));while(0===s.value[t.weekday])t=te(t,{day:-1});r.value=t.date}return Re.onBeforeUnmount(()=>{v()}),Re.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:f}}var Ie=Re.defineComponent({name:"QCalendarScheduler",directives:[Pe],props:{...oe,...ve,...he,...fe,...ye,...xe,...Se},emits:["update:model-value","update:model-resources","resource-expanded",...Ce,...De,..._e("-date"),..._e("-day-resource"),..._e("-head-resources"),..._e("-head-day"),..._e("-resource")],setup(p,{slots:m,emit:g,expose:e}){const t=Re.ref(null),a=Re.ref(null),n=Re.ref(null),h=Re.ref(null),r=Re.ref(null),f=Re.ref({}),v=Re.ref({}),o=Re.ref({}),u=Re.ref({}),l=Re.ref("next"),d=Re.ref(p.modelValue||We()),s=Re.ref("0000-00-00"),i=Re.ref(0),w=Re.ref(p.modelValue),c=Re.reactive({width:0,height:0}),y=Re.ref(!1),b=Re.ref(!1),k=Re.ref(null),_=Re.ref(null),D=Re.computed(()=>{if("month"===p.view)return"month-interval";return p.view}),q=Re.getCurrentInstance();if(null===q)throw new Error("current instance is null");const{emitListeners:x}=Je(q),{isSticky:C}=at(p),{times:F,setCurrent:S,updateCurrent:I}=Xe(p);I(),S();const{weekdaySkips:T,parsedStart:A,parsedEnd:H,dayFormatter:M,weekdayFormatter:E,ariaDateFormatter:j,dayStyleDefault:L,getRelativeClasses:R}=Ye(p,{startDate:d,endDate:s,times:F}),W=Re.computed(()=>{return Be(p.modelValue,F.now)||A.value||F.today});r.value=W.value,h.value=W.value.date;const O=Re.computed(()=>{if(0===i.value)return!0;if("0000-00-00"===s.value)return!0;if(void 0===P.value||0===P.value.length)return!0;const e=P.value[0];const t=P.value[P.value.length-1];return!0!==Ne(W.value,e,t)}),{renderValues:B}=Ze(p,{parsedView:D,times:F,parsedValue:W}),{rootRef:V,scrollWidth:N,__initCalendar:z,__renderCalendar:U}=Ke(p,Le,{scrollArea:t,pane:a}),{days:P,parsedCellWidth:K,styleDefault:Y}=$e(p,{weekdaySkips:T,times:F,scrollArea:t,parsedStart:A,parsedEnd:H,maxDays:i,size:c,headerColumnRef:n}),{move:$}=Ge(p,{parsedView:D,parsedValue:W,weekdaySkips:T,direction:l,maxDays:i,times:F,emittedValue:w,emit:g}),{getDefaultMouseEventHandlers:X}=Qe(g,x),{checkChange:Z}=nt(g,{days:P,lastStart:k,lastEnd:_}),{isKeyCode:Q}=rt(),{tryFocus:G}=ot(p,{rootRef:V,focusRef:h,focusValue:r,datesRef:f,days:P,parsedView:D,parsedValue:W,emittedValue:w,weekdaySkips:T,direction:l,times:F}),J=Re.computed(()=>{{if("day"===p.view&&parseInt(p.columnCount,10)>1)return parseInt(p.columnCount,10);if("day"===p.view&&p.maxDays&&p.maxDays>1)return p.maxDays}return P.value.length}),ee=Re.computed(()=>{if(V.value)return parseInt(getComputedStyle(V.value).getPropertyValue("--calendar-resources-width"),10);return 0}),te=Re.computed(()=>{const e=parseInt(p.resourceHeight,10);if(0===e)return"auto";return e}),ae=Re.computed(()=>{return parseInt(p.resourceMinHeight,10)}),ne=Re.computed(()=>{if(V.value){const e=c.width||V.value.getBoundingClientRect().width;if(e&&ee.value&&J.value)return(e-N.value-ee.value)/J.value+"px"}return 100/J.value+"%"});function re(){w.value=We()}function oe(e=1){$(e)}function ue(e=1){$(-e)}function le({width:e,height:t}){c.width=e,c.height=t}function de(e){return e.date===w.value}function se(){return Re.h("div",{roll:"presentation",class:{"q-calendar-scheduler__head":!0,"q-calendar__sticky":!0===C.value},style:{marginRight:N.value+"px"}},[ie(),ce()])}function ie(){const e=m["head-resources"],t={days:P.value,timestamps:P.value,date:p.modelValue,resources:p.modelResources};return Re.h("div",{class:{"q-calendar-scheduler__head--resources":!0,"q-calendar__sticky":!0===C.value},...X("-head-resources",e=>{return{scope:t,event:e}})},[e&&e({scope:t})])}function ce(){return Re.h("div",{ref:n,class:{"q-calendar-scheduler__head--days__column":!0}},[ve(),he()])}function ve(){return Re.h("div",{class:{"q-calendar-scheduler__head--days__weekdays":!0}},[...fe()])}function he(){const e=m["head-days-events"];return Re.nextTick(()=>{if(u.value&&0===parseInt(p.columnCount,10)&&window)try{const e=window.getComputedStyle(u.value);o.value.parentElement.style.height=e.height,o.value.style.height=e.height}catch(e){}}),Re.h("div",{class:{"q-calendar-scheduler__head--days__event":!0}},[e&&Re.h("div",{ref:o,style:{position:"absolute",left:0,top:0,right:0,overflow:"hidden",zIndex:1}},[e({scope:{timestamps:P.value,days:P.value,ref:u}})]),...ye()])}function fe(){return 1===P.value.length&&parseInt(p.columnCount,10)>0?Array.apply(null,new Array(parseInt(p.columnCount,10))).map((e,t)=>t+parseInt(p.columnIndexStart,10)).map(e=>pe(P.value[0],e)):P.value.map(e=>pe(e))}function ye(){return 1===P.value.length&&parseInt(p.columnCount,10)>0?Array.apply(null,new Array(parseInt(p.columnCount,10))).map((e,t)=>t+parseInt(p.columnIndexStart,10)).map(e=>ge(P.value[0],e)):P.value.map(e=>ge(e))}function pe(t,e){const a=m["head-day"],n=m["head-date"],r=!0!==p.noActiveDate&&de(t),o={timestamp:t,activeDate:r,droppable:y.value===t.date};void 0!==e&&(o.columnIndex=e);const u=!0===C.value?ze(K.value):ne.value,l=p.weekdayStyle||L,d={width:u,maxWidth:u,minWidth:u,...l({scope:o})};!0===C.value&&(d.minWidth=u);const s="function"===typeof p.weekdayClass?p.weekdayClass({scope:o}):{},i=!0===p.focusable&&p.focusType.includes("weekday"),c=t.date+(void 0!==e?"-"+e:""),v={key:c,ref:e=>{f.value[c]=e},tabindex:!0===i?0:-1,class:{"q-calendar-scheduler__head--day":!0,...s,...R(t),"q-active-date":r,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===i},style:d,onFocus:e=>{!0===i&&(h.value=c)},onKeydown:e=>{!0!==t.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&Q(e,[13,32])&&(w.value=t.date)},...X("-head-day",e=>{return{scope:o,event:e}}),onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"head-day",o)?y.value=t.date:y.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"head-day",o)?y.value=t.date:y.value="")}};return Re.h("div",v,[void 0!==a&&a({scope:o}),void 0===a&&De(t,e),void 0===a&&me(t),void 0===a&&n&&n({scope:o}),void 0===a&&qe(t,e),et()])}function me(e){return"stacked"===p.dateHeader?[!0!==p.noDefaultHeaderText&&we(e),!0!==p.noDefaultHeaderBtn&&ke(e)]:"inline"===p.dateHeader?("left"===p.weekdayAlign&&"right"===p.dateAlign||"right"===p.weekdayAlign&&p.dateAlign,Re.h("div",{class:"q-calendar__header--inline"},[!0!==p.noDefaultHeaderText&&we(e),!0!==p.noDefaultHeaderBtn&&ke(e)])):"inverted"===p.dateHeader?("left"===p.weekdayAlign&&"right"===p.dateAlign||"right"===p.weekdayAlign&&p.dateAlign,Re.h("div",{class:"q-calendar__header--inline"},[!0!==p.noDefaultHeaderBtn&&ke(e),!0!==p.noDefaultHeaderText&&we(e)])):void 0}function ge(e,t){const a=m["head-day-event"],n=!0!==p.noActiveDate&&de(e),r={timestamp:e,activeDate:n,droppable:y.value===e.date};void 0!==t&&(r.columnIndex=t);const o=!0===C.value?ze(K.value):ne.value,u={width:o,maxWidth:o,minWidth:o};return!0===C.value&&(u.minWidth=o),Re.h("div",{key:"event-"+e.date+(void 0!==t?"-"+t:""),class:{"q-calendar-scheduler__head--day__event":!0,...R(e),"q-active-date":n},style:u},[a&&a({scope:r})])}function we(e){const t=m["head-weekday-label"],a=!0===p.shortWeekdayLabel,n={timestamp:e,shortWeekdayLabel:a},r={class:{"q-calendar-scheduler__head--weekday":!0,["q-calendar__"+p.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return Re.h("div",r,t&&t({scope:n})||be(e,a))}function be(e,t){const a=E.value(e,t||p.weekdayBreakpoints[0]>0&&K.value<=p.weekdayBreakpoints[0]);return Re.h("span",{class:"q-calendar-scheduler__head--weekday-label q-calendar__ellipsis"},p.weekdayBreakpoints[1]>0&&K.value<=p.weekdayBreakpoints[1]?Ue(a,p.minWeekdayLabel):a)}function ke(e){const t={class:{"q-calendar-scheduler__head--date":!0,["q-calendar__"+p.dateAlign]:!0}};return Re.h("div",t,_e(e))}function _e(a){const e=!0!==p.noActiveDate&&de(a),t=M.value(a,!1),n=m["head-day-label"],r=m["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},u={class:{"q-calendar-scheduler__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===p.dateType,"q-calendar__button--rounded":"rounded"===p.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__focusable":!0},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&Q(e,[13,32])&&(w.value=a.date,void 0!==x.value.onClickDate&&g("click-date",{scope:o}))},...X("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(w.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==p.noAria&&(u.ariaLabel=j.value(a)),r?r({scope:o}):tt(p,u,n?n({scope:o}):t)}function De(e,t){const a=m["column-header-before"];if(a){const n={timestamp:e,columnIndex:t};return Re.h("div",{class:"q-calendar-scheduler__column-header--before"},[a({scope:n})])}}function qe(e,t){const a=m["column-header-after"];if(a){const n={timestamp:e,columnIndex:t};return Re.h("div",{class:"q-calendar-scheduler__column-header--after"},[a({scope:n})])}}function xe(){return Re.h("div",{class:"q-calendar-scheduler__body"},[Ce()])}function Ce(){return!0===C.value?Re.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[!0!==C.value&&He(),Se()]):!0===p.noScroll?Fe():Re.h("div",{ref:t,class:{"q-calendar-scheduler__scroll-area":!0,"q-calendar__scroll":!0}},[Fe()])}function Fe(){return Re.h("div",{ref:a,class:"q-calendar-scheduler__pane"},[Se()])}function Se(){return Re.h("div",{class:"q-calendar-scheduler__day--container"},[!0===C.value&&!0!==p.noHeader&&se(),Ie()])}function Ie(e=void 0,a=0,n=!0){return void 0===e&&(e=p.modelResources),e.map((e,t)=>{return Te(e,t,a,void 0!==e.children?e.expanded:n)})}function Te(e,t,a=0,n=!0){const r={};r.height=void 0!==e.height?ze(parseInt(e.height,10)):te.value?ze(te.value):"auto",ae.value>0&&(r.minHeight=ze(ae.value));const o=Re.h("div",{key:e[p.resourceKey]+"-"+t,class:{"q-calendar-scheduler__resource--row":!0},style:r},[Ae(e,t,a,n),He(e,t,a,n)]);return void 0!==e.children?[o,Re.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[Ie(e.children,a+1,!1===n?n:e.expanded)])]:[o]}function Ae(t,e,a=0,n=!0){const r=m["resource-label"],o={};o.height=void 0!==t.height?ze(parseInt(t.height,10)):te.value?ze(te.value):"auto",parseInt(p.resourceMinHeight,10)>0&&(o.minHeight=ze(parseInt(p.resourceMinHeight,10)));const u=p.resourceStyle||Y,l=t[p.resourceLabel],d=!0===p.focusable&&p.focusType.includes("resource")&&!0===n,s={resource:t,timestamps:P.value,days:P.value,resourceIndex:e,indentLevel:a,label:l},i=t[p.resourceKey];s.droppable=b.value===i;const c="function"===typeof p.resourceClass?p.resourceClass({scope:s}):{};return Re.h("div",{key:t[p.resourceKey]+"-"+e,ref:e=>{v.value[t[p.resourceKey]]=e},tabindex:!0===d?0:-1,class:{"q-calendar-scheduler__resource":0===a,"q-calendar-scheduler__resource--section":0!==a,...c,"q-calendar__sticky":!0===C.value,"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===d},style:{...o,...u({scope:s})},onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"resource",s)?b.value=i:b.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"resource",s)?b.value=i:b.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"resource",s)?b.value=i:b.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"resource",s)?b.value=i:b.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&void 0!==x.value.onClickResource&&g("click-resource",{scope:s,event:e})},...X("-resource",e=>{return{scope:s,event:e}})},[[Re.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;g("resource-expanded",{expanded:t.expanded,scope:s})}}),Re.h("div",{class:{"q-calendar-scheduler__resource--text":!0,"q-calendar__ellipsis":!0},style:{paddingLeft:10*a+2+"px"}},[r?r({scope:s}):l]),et()]])}function He(e,t,a=0,n=!0){const r=m["resource-days"],o=!0===C.value?ze(K.value):ne.value,u={resource:e,resourceIndex:t,indentLevel:a,expanded:n,cellWidth:o,timestamps:P.value,days:P.value},l={};l.height=parseInt(p.resourceHeight,10)>0?ze(parseInt(p.resourceHeight,10)):"auto",parseInt(p.resourceMinHeight,10)>0&&(l.minHeight=ze(parseInt(p.resourceMinHeight,10)));const d={class:"q-calendar-scheduler__resource--days",style:l};return Re.h("div",d,[...Me(e,t,a,n),r&&r({scope:u})])}function Me(t,a,n=0,r=!0){return 1===P.value.length&&parseInt(p.columnCount,10)>0?Array.apply(null,new Array(parseInt(p.columnCount,10))).map((e,t)=>t+parseInt(p.columnIndexStart,10)).map(e=>Ee(P.value[0],e,t,a,n,r)):P.value.map(e=>Ee(e,void 0,t,a,n,r))}function Ee(e,t,a,n,r=0,o=!0){const u=m.day,l=p.dayStyle||L,d=!0!==p.noActiveDate&&W.value.date===e.date,s=e.date+":"+a[p.resourceKey]+(void 0!==t?":"+t:""),i=b.value===s,c={timestamp:e,columnIndex:t,resource:a,resourceIndex:n,indentLevel:r,activeDate:d,droppable:i},v=!0===C.value?ze(K.value):ne.value,h={width:v,maxWidth:v,...l({scope:c})};h.height=parseInt(p.resourceHeight,10)>0?ze(parseInt(p.resourceHeight,10)):"auto",parseInt(p.resourceMinHeight,10)>0&&(h.minHeight=ze(parseInt(p.resourceMinHeight,10)));const f="function"===typeof p.dayClass?p.dayClass({scope:c}):{},y=!0===p.focusable&&p.focusType.includes("day")&&!0===o;return Re.h("div",{key:e.date+(void 0!==t?":"+t:""),tabindex:!0===y?0:-1,class:{"q-calendar-scheduler__day":0===r,"q-calendar-scheduler__day--section":0!==r,...f,...R(e),"q-calendar__hoverable":!0===p.hoverable,"q-calendar__focusable":!0===y},style:h,onDragenter:e=>{void 0!==p.dragEnterFunc&&"function"===typeof p.dragEnterFunc&&(!0===p.dragEnterFunc(e,"day",c)?b.value=s:b.value="")},onDragover:e=>{void 0!==p.dragOverFunc&&"function"===typeof p.dragOverFunc&&(!0===p.dragOverFunc(e,"day",c)?b.value=s:b.value="")},onDragleave:e=>{void 0!==p.dragLeaveFunc&&"function"===typeof p.dragLeaveFunc&&(!0===p.dragLeaveFunc(e,"day",c)?b.value=s:b.value="")},onDrop:e=>{void 0!==p.dropFunc&&"function"===typeof p.dropFunc&&(!0===p.dropFunc(e,"day",c)?b.value=s:b.value="")},onKeydown:e=>{Q(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{Q(e,[13,32])&&(w.value=c.timestamp.date,void 0!==x.value.onClickResource&&g("click-resource",{scope:c,event:e}))},...X("-day-resource",e=>{return{scope:c,event:e}})},[u&&u({scope:c}),et()])}function je(){return Re.h("div",{},"No resources have been defined")}function Le(){if(O.value){const{start:n,end:r,maxDays:o}=B.value;d.value=n.date,s.value=r.date,i.value=o}const e=c.width>0,t=p.modelResources&&p.modelResources.length>0,a=Re.withDirectives(Re.h("div",{key:d.value,class:"q-calendar-scheduler"},[!0===e&&!0===t&&!0!==C.value&&!0!==p.noHeader&&se(),!0===e&&!0===t&&xe(),!1===t&&je()]),[[Pe,le]]);if(!0!==p.animated)return a;{const u="q-calendar--"+("prev"===l.value?p.transitionPrev:p.transitionNext);return Re.h(Re.Transition,{name:u,appear:!0},()=>a)}}return Re.watch([P],Z,{deep:!0,immediate:!0}),Re.watch(()=>p.modelValue,(e,t)=>{if(w.value!==p.modelValue){if(!0===p.animated){const a=Ve(Oe(e)),n=Ve(Oe(t));l.value=a>=n?"next":"prev"}w.value=e}h.value=e}),Re.watch(w,(e,t)=>{if(w.value!==p.modelValue){if(!0===p.animated){const a=Ve(Oe(e)),n=Ve(Oe(t));l.value=a>=n?"next":"prev"}g("update:model-value",e)}}),Re.watch(h,e=>{e&&(r.value=Be(e))}),Re.watch(r,e=>{f.value[h.value]?f.value[h.value].focus():G()}),Re.watch(()=>p.maxDays,e=>{i.value=e}),Re.onBeforeUpdate(()=>{f.value={};o.value={};u.value={};v.value={}}),Re.onMounted(()=>{z()}),e({prev:ue,next:oe,move:$,moveToToday:re,updateCurrent:I}),()=>U()}}),Te="@quasar/quasar-ui-qcalendar",Ae="4.0.0-beta.3",He="Jeff Galbraith <jeff@quasar.dev>",Me="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",Ee="MIT",je="dist/index.esm.js",Le="dist/index.common.js",ut="dist/types/index.d.ts",lt={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},dt={type:"github",url:"https://github.com/sponsors/hawkeye64"},st={access:"public"},it={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},ct="https://github.com/quasarframework/quasar-ui-qcalendar/issues",vt="https://github.com/quasarframework/quasar-ui-qcalendar",ht=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],ft={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},yt={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},pt=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pt={name:Te,version:Ae,author:He,description:Me,license:Ee,module:je,main:Le,typings:ut,scripts:lt,funding:dt,publishConfig:st,repository:it,bugs:ct,homepage:vt,keywords:ht,vetur:ft,devDependencies:yt,browserslist:pt};const{version:mt}=pt;e.QCalendarScheduler=Ie,e.version=mt,Object.defineProperty(e,"__esModule",{value:!0})});
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var vue=require("vue");const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],u=[],s=42,i=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),y=0,m=y===l;if(l<getDayIdentifier(e))return c;while((!m||c.length<i)&&c.length<s){if(y=getDayIdentifier(v),m=m||y>l&&c.length>=i,m)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,u),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:s,__renderCalendar:i}}function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),d=vue.computed(()=>{if("0000-00-00"===t.value)return m(o.value);return parseTimestamp(t.value)}),u=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),i=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:u,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===s,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===s),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,r.weekdays,a.today)}function m(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:s,ariaDateFormatter:i,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:m,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},noHeader:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)});return t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=vue.computed(()=>{{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}}),o=vue.computed(()=>{{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}}),d=vue.computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function useRenderValues(r,{parsedView:o,times:d,parsedValue:u}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:i,weekdaySkips:l,direction:c,maxDays:v,times:y,emittedValue:m,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(i.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),m.value=e.date,p("moved",e)}else m.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:s,weekdaySkips:i,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function m(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:w();break;case 34:b();break;case 35:T();break;case 36:D();break;case 37:k();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===u.value)return void(s.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===u.value)return void(s.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:-1}):"week"===u.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:1}):"week"===u.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function D(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getStartOfMonth(t):"week"===u.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getEndOfMonth(t):"week"===u.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:m}}var QCalendarTask=vue.defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:v,emit:i,expose:e}){const t=vue.ref(null),a=vue.ref(null),o=vue.ref("next"),d=vue.ref(c.modelValue||today()),u=vue.ref("0000-00-00"),n=vue.ref(0),y=vue.ref(c.modelValue),m=vue.ref(null),r=vue.ref(null),p=vue.ref({}),s=vue.reactive({width:0,height:0}),f=vue.ref(!1),l=vue.ref(null),h=vue.ref(null),g=vue.computed(()=>{return c.view}),k=vue.getCurrentInstance();if(null===k)throw new Error("current instance is null");const{emitListeners:_}=useEmitListeners(k),{times:w,setCurrent:b,updateCurrent:D}=useTimes(c);D(),b();const{weekdaySkips:T,parsedStart:M,dayFormatter:E,weekdayFormatter:I,ariaDateFormatter:N,dayStyleDefault:q,getRelativeClasses:O}=useCommon(c,{startDate:d,endDate:u,times:w}),A=vue.computed(()=>{return parseTimestamp(c.modelValue,w.now)||M.value||w.today});r.value=A.value,m.value=A.value.date;const{renderValues:S}=useRenderValues(c,{parsedView:g,times:w,parsedValue:A}),{rootRef:C,__initCalendar:x,__renderCalendar:F}=useCalendar(c,Ae,{scrollArea:t,pane:a}),{days:W,parsedStartDate:H,parsedEndDate:R}=useTask(c,i,{weekdaySkips:T,times:w}),{move:U}=useMove(c,{parsedView:g,parsedValue:A,weekdaySkips:T,direction:o,maxDays:n,times:w,emittedValue:y,emit:i}),{getDefaultMouseEventHandlers:Y}=useMouse(i,_),{checkChange:z}=useCheckChange(i,{days:W,lastStart:l,lastEnd:h}),{isKeyCode:B}=useEvents(),{tryFocus:L}=useKeyboard(c,{rootRef:C,focusRef:m,focusValue:r,datesRef:p,days:W,parsedView:g,parsedValue:A,emittedValue:y,weekdaySkips:T,direction:o,times:w}),V=vue.ref(!0),j=vue.computed(()=>{if(void 0!==c.cellWidth)return parseInt(c.cellWidth,10);return 150}),$=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")&&!0!==isMiniMode.value}),P=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==$.value}),K=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),X=vue.computed(()=>{return parseInt(c.dayHeight,10)}),Q=vue.computed(()=>{return parseInt(c.dayMinHeight,10)});function Z(){y.value=today()}function G(e=1){U(e)}function J(e=1){U(-e)}function ee({width:e,height:t}){s.width=e,s.height=t}function te(e){return e.date===y.value}function ae(e,t,a){const n=v.day,r=c.dayStyle||q,o=!0!==c.noActiveDate&&A.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},u=convertToUnit(j.value),s={width:u,minWidth:u,maxWidth:u,...r({scope:d})},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return vue.h("div",{tabindex:!0===$.value?0:-1,class:{"q-calendar-task__task--day":!0,...i,...O(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:s,onFocus:e=>{$.value},...Y("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function ne(t,a){return W.value.map(e=>ae(e,t,a))}function re(e,t){const a=v.days,n={timestamps:W.value,days:W.value,task:e,taskIndex:t,cellWidth:j.value};return vue.h("div",{class:"q-calendar-task__task--days-row"},[ne(e,t),a&&a({scope:n})])}function oe(t,e,a=0,n=!0){const r=v.task,o={start:H.value,end:R.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},s=!0===c.focusable&&c.focusType.includes("task");return vue.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===V.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:u},[vue.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;i("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function de(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):X.value>0?convertToUnit(X.value):"auto",o=Q.value>0?convertToUnit(Q.value):void 0,d={height:r};void 0!==o&&(d.minHeight=o);const u=vue.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[oe(e,t,a,n),re(e,t)]);return void 0!==e.children?[u,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return de(e,t,a,void 0!==e.children?e.expanded:n)})}function se(){return vue.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===V.value}},[ue()])}function ie(e,t){const a=v["footer-task"],n={start:H.value,end:R.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return vue.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===V.value},style:o},[a&&a({scope:n})])}function le(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(j.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return vue.h("div",{class:{"q-calendar-task__footer--day":!0,...u,...O(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:d},[n&&n({scope:r})])}function ce(t,a){return vue.h("div",{class:"q-calendar-task__footer--day-wrapper"},[W.value.map(e=>le(e,t,a))])}function ve(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return vue.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ie(e,t),ce(e,t)]})})}function ye(){return vue.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===V.value}},ve())}function me(){return vue.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ne(),se(),ye()])}function pe(){const e=v["head-tasks"],t={start:H.value,end:R.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return vue.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===V.value},style:n},[e&&e({scope:t})])}function fe(e,t){const a=v["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:H.value,end:R.value,cellWidth:n,title:e,index:t};return vue.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===V.value},style:r},[a&&a({scope:o})])}function he(e){const t=v["head-weekday-label"],a={timestamp:e},n={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",n,t&&t({scope:a})||ge(e,c.shortWeekdayLabel))}function ge(e,t){const a=I.value(e,t||c.weekdayBreakpoints[0]>0&&j.value<=c.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&j.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function ke(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return vue.h("div",t,_e(e))}function _e(a){const e=!0!==c.noActiveDate&&te(a),t=E.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===P.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===P.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&B(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&B(e,[13,32])&&(y.value=a.date,void 0!==_.value.onClickDate&&i("click-date",{scope:o}))},...Y("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=N.value(a)),r?r({scope:o}):useButton(c,u,n?n({scope:o}):t)}function we(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&he(e),!0!==c.noDefaultHeaderBtn&&ke(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&he(e),!0!==c.noDefaultHeaderBtn&&ke(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&ke(e),!0!==c.noDefaultHeaderText&&he(e)])):void 0}function be(e,t,a){const n=v["title-day"],r=convertToUnit(j.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:j.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},s=!0===c.focusable&&c.focusType.includes("day");return vue.h("div",{class:{"q-calendar-task__title--day":!0,...u,...O(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:o},[n&&n({scope:d}),useFocusHelper()])}function De(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&te(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date},o=c.weekdayStyle||q,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=convertToUnit(j.value),s={width:u,minWidth:u,maxWidth:u,...o({scope:r})},i=t.date,l={key:i,ref:e=>{p.value[i]=e},tabindex:!0===K.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...O(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===K.value},style:s,onFocus:e=>{!0===K.value&&(m.value=i)},onKeydown:e=>{!0!==t.disabled&&B(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&B(e,[13,32])&&(y.value=t.date)},...Y("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return vue.h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&we(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Te(){return W.value.map(e=>De(e))}function Me(t,a){return W.value.map(e=>be(e,t,a))}function Ee(){return vue.h("div",{class:{"q-calendar-task__head--days":!0}},[...Te()])}function Ie(e,t){return vue.h("div",{class:{"q-calendar-task__title--days":!0}},[...Me(e,t)])}function Ne(){return vue.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===V.value},style:{}},[vue.h("div",{style:{position:"relative",display:"flex"}},[pe(),Ee()]),c.modelTitle.map((e,t)=>vue.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[fe(e,t),Ie(e,t)]))])}function qe(){return vue.h("div",{class:"q-calendar-task__body"},[Oe()])}function Oe(){return vue.h("div",{ref:t,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function Ae(){const{start:e,end:t}=S.value;d.value=e.date,u.value=t.date;const a=s.width>0,n=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&qe()]),[[ResizeObserver$1,ee]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([W],z,{deep:!0,immediate:!0}),vue.watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}y.value=e}m.value=e}),vue.watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}i("update:model-value",e)}}),vue.watch(m,e=>{e&&(r.value=parseTimestamp(e))}),vue.watch(r,e=>{p.value[m.value]?p.value[m.value].focus():L()}),vue.onBeforeUpdate(()=>{p.value={}}),vue.onMounted(()=>{x()}),e({prev:J,next:G,move:U,moveToToday:Z,updateCurrent:D}),()=>F()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarTask:QCalendarTask,install(e){e.component(QCalendarTask.name,QCalendarTask)}};module.exports=Plugin;
"use strict";var vue=require("vue");const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=getDayIdentifier(parsed(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const s in n)if(n[s]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const i in r)if(Array.isArray(r[i])&&2===r[i].length){const l=parsed(r[i][0]),c=parsed(r[i][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[i]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],u=[],s=42,i=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),y=0,m=y===l;if(l<getDayIdentifier(e))return c;while((!m||c.length<i)&&c.length<s){if(y=getDayIdentifier(v),m=m||y>l&&c.length>=i,m)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,u),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=vue.reactive({width:0,height:0}),o=vue.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=vue.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function s(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return vue.withDirectives(vue.h("div",e,[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:s,__renderCalendar:i}}function useCommon(r,{startDate:e,endDate:t,times:a}){const n=vue.computed(()=>getWeekdaySkips(r.weekdays)),o=vue.computed(()=>parseTimestamp(e.value)),d=vue.computed(()=>{if("0000-00-00"===t.value)return m(o.value);return parseTimestamp(t.value)}),u=vue.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),s=vue.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),i=vue.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:u,betweenDays:s}=c(n,e);return{"q-past-day":!0!==d&&!0!==s&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==s&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===s,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===s),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,r.weekdays,a.today)}function m(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:s,ariaDateFormatter:i,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:m,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},noHeader:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)});return t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=vue.computed(()=>{{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}}),o=vue.computed(()=>{{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}}),d=vue.computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=vue.reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=vue.computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return vue.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function useRenderValues(r,{parsedView:o,times:d,parsedValue:u}){const e=vue.computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(u,{parsedView:s,parsedValue:i,weekdaySkips:l,direction:c,maxDays:v,times:y,emittedValue:m,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(i.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(s.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,u.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),m.value=e.date,p("moved",e)}else m.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=vue.getCurrentInstance()){return{emitListeners:vue.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[vue.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,vue.h("button",t,[a,!0===n&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:s,weekdaySkips:i,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function m(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:w();break;case 34:b();break;case 35:T();break;case 36:D();break;case 37:k();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(s.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===u.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(s.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(s.value=t.date)}else if("day"===u.value)return void(s.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(s.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(s.value=t.date)}else if("day"===u.value)return void(s.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:-1}):"week"===u.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===u.value||"month-interval"===u.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=addToDate(t,{day:a})}else"day"===u.value?t=addToDate(t,{day:1}):"week"===u.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function D(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getStartOfMonth(t):"week"===u.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===u.value||"month-interval"===u.value?t=getEndOfMonth(t):"week"===u.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return vue.onBeforeUnmount(()=>{v()}),vue.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:m}}var QCalendarTask=vue.defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:v,emit:i,expose:e}){const t=vue.ref(null),a=vue.ref(null),o=vue.ref("next"),d=vue.ref(c.modelValue||today()),u=vue.ref("0000-00-00"),n=vue.ref(0),y=vue.ref(c.modelValue),m=vue.ref(null),r=vue.ref(null),p=vue.ref({}),s=vue.reactive({width:0,height:0}),f=vue.ref(!1),l=vue.ref(null),h=vue.ref(null),g=vue.computed(()=>{return c.view}),k=vue.getCurrentInstance();if(null===k)throw new Error("current instance is null");const{emitListeners:_}=useEmitListeners(k),{times:w,setCurrent:b,updateCurrent:D}=useTimes(c);D(),b();const{weekdaySkips:T,parsedStart:M,dayFormatter:E,weekdayFormatter:I,ariaDateFormatter:N,dayStyleDefault:q,getRelativeClasses:O}=useCommon(c,{startDate:d,endDate:u,times:w}),A=vue.computed(()=>{return parseTimestamp(c.modelValue,w.now)||M.value||w.today});r.value=A.value,m.value=A.value.date;const{renderValues:S}=useRenderValues(c,{parsedView:g,times:w,parsedValue:A}),{rootRef:C,__initCalendar:x,__renderCalendar:F}=useCalendar(c,Ae,{scrollArea:t,pane:a}),{days:W,parsedStartDate:H,parsedEndDate:R}=useTask(c,i,{weekdaySkips:T,times:w}),{move:U}=useMove(c,{parsedView:g,parsedValue:A,weekdaySkips:T,direction:o,maxDays:n,times:w,emittedValue:y,emit:i}),{getDefaultMouseEventHandlers:Y}=useMouse(i,_),{checkChange:z}=useCheckChange(i,{days:W,lastStart:l,lastEnd:h}),{isKeyCode:B}=useEvents(),{tryFocus:L}=useKeyboard(c,{rootRef:C,focusRef:m,focusValue:r,datesRef:p,days:W,parsedView:g,parsedValue:A,emittedValue:y,weekdaySkips:T,direction:o,times:w}),V=vue.ref(!0),j=vue.computed(()=>{if(void 0!==c.cellWidth)return parseInt(c.cellWidth,10);return 150}),$=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")&&!0!==isMiniMode.value}),P=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==$.value}),K=vue.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),X=vue.computed(()=>{return parseInt(c.dayHeight,10)}),Q=vue.computed(()=>{return parseInt(c.dayMinHeight,10)});function Z(){y.value=today()}function G(e=1){U(e)}function J(e=1){U(-e)}function ee({width:e,height:t}){s.width=e,s.height=t}function te(e){return e.date===y.value}function ae(e,t,a){const n=v.day,r=c.dayStyle||q,o=!0!==c.noActiveDate&&A.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},u=convertToUnit(j.value),s={width:u,minWidth:u,maxWidth:u,...r({scope:d})},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return vue.h("div",{tabindex:!0===$.value?0:-1,class:{"q-calendar-task__task--day":!0,...i,...O(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:s,onFocus:e=>{$.value},...Y("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function ne(t,a){return W.value.map(e=>ae(e,t,a))}function re(e,t){const a=v.days,n={timestamps:W.value,days:W.value,task:e,taskIndex:t,cellWidth:j.value};return vue.h("div",{class:"q-calendar-task__task--days-row"},[ne(e,t),a&&a({scope:n})])}function oe(t,e,a=0,n=!0){const r=v.task,o={start:H.value,end:R.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},s=!0===c.focusable&&c.focusType.includes("task");return vue.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===V.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:u},[vue.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[vue.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;i("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function de(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):X.value>0?convertToUnit(X.value):"auto",o=Q.value>0?convertToUnit(Q.value):void 0,d={height:r};void 0!==o&&(d.minHeight=o);const u=vue.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[oe(e,t,a,n),re(e,t)]);return void 0!==e.children?[u,vue.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return de(e,t,a,void 0!==e.children?e.expanded:n)})}function se(){return vue.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===V.value}},[ue()])}function ie(e,t){const a=v["footer-task"],n={start:H.value,end:R.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return vue.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===V.value},style:o},[a&&a({scope:n})])}function le(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(j.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return vue.h("div",{class:{"q-calendar-task__footer--day":!0,...u,...O(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:d},[n&&n({scope:r})])}function ce(t,a){return vue.h("div",{class:"q-calendar-task__footer--day-wrapper"},[W.value.map(e=>le(e,t,a))])}function ve(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return vue.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ie(e,t),ce(e,t)]})})}function ye(){return vue.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===V.value}},ve())}function me(){return vue.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Ne(),se(),ye()])}function pe(){const e=v["head-tasks"],t={start:H.value,end:R.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return vue.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===V.value},style:n},[e&&e({scope:t})])}function fe(e,t){const a=v["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:H.value,end:R.value,cellWidth:n,title:e,index:t};return vue.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===V.value},style:r},[a&&a({scope:o})])}function he(e){const t=v["head-weekday-label"],a={timestamp:e},n={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return vue.h("div",n,t&&t({scope:a})||ge(e,c.shortWeekdayLabel))}function ge(e,t){const a=I.value(e,t||c.weekdayBreakpoints[0]>0&&j.value<=c.weekdayBreakpoints[0]);return vue.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&j.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function ke(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return vue.h("div",t,_e(e))}function _e(a){const e=!0!==c.noActiveDate&&te(a),t=E.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===P.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===P.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&B(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&B(e,[13,32])&&(y.value=a.date,void 0!==_.value.onClickDate&&i("click-date",{scope:o}))},...Y("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=N.value(a)),r?r({scope:o}):useButton(c,u,n?n({scope:o}):t)}function we(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&he(e),!0!==c.noDefaultHeaderBtn&&ke(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&he(e),!0!==c.noDefaultHeaderBtn&&ke(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,vue.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&ke(e),!0!==c.noDefaultHeaderText&&he(e)])):void 0}function be(e,t,a){const n=v["title-day"],r=convertToUnit(j.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:j.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},s=!0===c.focusable&&c.focusType.includes("day");return vue.h("div",{class:{"q-calendar-task__title--day":!0,...u,...O(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===s},style:o},[n&&n({scope:d}),useFocusHelper()])}function De(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&te(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date},o=c.weekdayStyle||q,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=convertToUnit(j.value),s={width:u,minWidth:u,maxWidth:u,...o({scope:r})},i=t.date,l={key:i,ref:e=>{p.value[i]=e},tabindex:!0===K.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...O(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===K.value},style:s,onFocus:e=>{!0===K.value&&(m.value=i)},onKeydown:e=>{!0!==t.disabled&&B(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&B(e,[13,32])&&(y.value=t.date)},...Y("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return vue.h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&we(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Te(){return W.value.map(e=>De(e))}function Me(t,a){return W.value.map(e=>be(e,t,a))}function Ee(){return vue.h("div",{class:{"q-calendar-task__head--days":!0}},[...Te()])}function Ie(e,t){return vue.h("div",{class:{"q-calendar-task__title--days":!0}},[...Me(e,t)])}function Ne(){return vue.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===V.value},style:{}},[vue.h("div",{style:{position:"relative",display:"flex"}},[pe(),Ee()]),c.modelTitle.map((e,t)=>vue.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[fe(e,t),Ie(e,t)]))])}function qe(){return vue.h("div",{class:"q-calendar-task__body"},[Oe()])}function Oe(){return vue.h("div",{ref:t,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[me()])}function Ae(){const{start:e,end:t}=S.value;d.value=e.date,u.value=t.date;const a=s.width>0,n=vue.withDirectives(vue.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&qe()]),[[ResizeObserver$1,ee]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return vue.h(vue.Transition,{name:r,appear:!0},()=>n)}}return vue.watch([W],z,{deep:!0,immediate:!0}),vue.watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}y.value=e}m.value=e}),vue.watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}i("update:model-value",e)}}),vue.watch(m,e=>{e&&(r.value=parseTimestamp(e))}),vue.watch(r,e=>{p.value[m.value]?p.value[m.value].focus():L()}),vue.onBeforeUpdate(()=>{p.value={}}),vue.onMounted(()=>{x()}),e({prev:J,next:G,move:U,moveToToday:Z,updateCurrent:D}),()=>F()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarTask:QCalendarTask,install(e){e.component(QCalendarTask.name,QCalendarTask)}};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],s=[],i=42,u=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),y=0,m=y===l;if(l<getDayIdentifier(e))return c;while((!m||c.length<u)&&c.length<i){if(y=getDayIdentifier(v),m=m||y>l&&c.length>=u,m)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,s),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),s=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(s):t[d]=[t[d],s]:t[d]=s}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const s=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:s,__initCalendar:i,__renderCalendar:u}}function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{if("0000-00-00"===t.value)return m(o.value);return parseTimestamp(t.value)}),s=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),i=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),u=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:s,betweenDays:i}=c(n,e);return{"q-past-day":!0!==d&&!0!==i&&!0!==s&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==i&&!0!==s&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===i,"q-range-last":!0===s,"q-range-hover":!0===r&&(!0===d||!0===s||!0===i),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,r.weekdays,a.today)}function m(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:s,weekdayFormatter:i,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:m,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},noHeader:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)});return t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=computed(()=>{{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}}),o=computed(()=>{{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}}),d=computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),s(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function s(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:s}}function useRenderValues(r,{parsedView:o,times:d,parsedValue:s}){const e=computed(()=>{const e=s.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(s,{parsedView:i,parsedValue:u,weekdaySkips:l,direction:c,maxDays:v,times:y,emittedValue:m,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,s.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,s.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),m.value=e.date,p("moved",e)}else m.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:s,emittedValue:i,weekdaySkips:u,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function m(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:w();break;case 34:b();break;case 35:T();break;case 36:D();break;case 37:k();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===s.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(i.value=t.date)}else"day"!==s.value&&"week"!==s.value&&"month-interval"!==s.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===s.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(i.value=t.date)}else"day"!==s.value&&"week"!==s.value&&"month-interval"!==s.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===u.value[t.weekday]);if("month"===s.value||"month-interval"===s.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===s.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===s.value)return void(i.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===u.value[t.weekday]);if("month"===s.value||"month-interval"===s.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===s.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===s.value)return void(i.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);if("month"===s.value||"month-interval"===s.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===s.value?t=addToDate(t,{day:-1}):"week"===s.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===s.value||"month-interval"===s.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===s.value?t=addToDate(t,{day:1}):"week"===s.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function D(e){let t=copyTimestamp(o.value);"month"===s.value||"month-interval"===s.value?t=getStartOfMonth(t):"week"===s.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===s.value||"month-interval"===s.value?t=getEndOfMonth(t):"week"===s.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:m}}var QCalendarTask=defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:v,emit:u,expose:e}){const t=ref(null),a=ref(null),o=ref("next"),d=ref(c.modelValue||today()),s=ref("0000-00-00"),n=ref(0),y=ref(c.modelValue),m=ref(null),r=ref(null),p=ref({}),i=reactive({width:0,height:0}),f=ref(!1),l=ref(null),g=ref(null),k=computed(()=>{return c.view}),_=getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:w}=useEmitListeners(_),{times:b,setCurrent:D,updateCurrent:T}=useTimes(c);T(),D();const{weekdaySkips:M,parsedStart:E,dayFormatter:I,weekdayFormatter:N,ariaDateFormatter:q,dayStyleDefault:O,getRelativeClasses:A}=useCommon(c,{startDate:d,endDate:s,times:b}),S=computed(()=>{return parseTimestamp(c.modelValue,b.now)||E.value||b.today});r.value=S.value,m.value=S.value.date;const{renderValues:C}=useRenderValues(c,{parsedView:k,times:b,parsedValue:S}),{rootRef:x,__initCalendar:F,__renderCalendar:W}=useCalendar(c,Se,{scrollArea:t,pane:a}),{days:H,parsedStartDate:R,parsedEndDate:U}=useTask(c,u,{weekdaySkips:M,times:b}),{move:B}=useMove(c,{parsedView:k,parsedValue:S,weekdaySkips:M,direction:o,maxDays:n,times:b,emittedValue:y,emit:u}),{getDefaultMouseEventHandlers:Y}=useMouse(u,w),{checkChange:z}=useCheckChange(u,{days:H,lastStart:l,lastEnd:g}),{isKeyCode:L}=useEvents(),{tryFocus:V}=useKeyboard(c,{rootRef:x,focusRef:m,focusValue:r,datesRef:p,days:H,parsedView:k,parsedValue:S,emittedValue:y,weekdaySkips:M,direction:o,times:b}),j=ref(!0),P=computed(()=>{if(void 0!==c.cellWidth)return parseInt(c.cellWidth,10);return 150}),$=computed(()=>{return!0===c.focusable&&c.focusType.includes("day")&&!0!==isMiniMode.value}),K=computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==$.value}),X=computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),Q=computed(()=>{return parseInt(c.dayHeight,10)}),Z=computed(()=>{return parseInt(c.dayMinHeight,10)});function G(){y.value=today()}function J(e=1){B(e)}function ee(e=1){B(-e)}function te({width:e,height:t}){i.width=e,i.height=t}function ae(e){return e.date===y.value}function ne(e,t,a){const n=v.day,r=c.dayStyle||O,o=!0!==c.noActiveDate&&S.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},s=convertToUnit(P.value),i={width:s,minWidth:s,maxWidth:s,...r({scope:d})},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return h("div",{tabindex:!0===$.value?0:-1,class:{"q-calendar-task__task--day":!0,...u,...A(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:i,onFocus:e=>{$.value},...Y("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function re(t,a){return H.value.map(e=>ne(e,t,a))}function oe(e,t){const a=v.days,n={timestamps:H.value,days:H.value,task:e,taskIndex:t,cellWidth:P.value};return h("div",{class:"q-calendar-task__task--days-row"},[re(e,t),a&&a({scope:n})])}function de(t,e,a=0,n=!0){const r=v.task,o={start:R.value,end:U.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),s={width:d,minWidth:d,maxWidth:d},i=!0===c.focusable&&c.focusType.includes("task");return h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===j.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:s},[h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;u("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function se(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):Q.value>0?convertToUnit(Q.value):"auto",o=Z.value>0?convertToUnit(Z.value):void 0,d={height:r};void 0!==o&&(d.minHeight=o);const s=h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[de(e,t,a,n),oe(e,t)]);return void 0!==e.children?[s,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ie(e.children,a+1,!1===n?n:e.expanded)])]:[s]}function ie(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return se(e,t,a,void 0!==e.children?e.expanded:n)})}function ue(){return h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===j.value}},[ie()])}function le(e,t){const a=v["footer-task"],n={start:R.value,end:U.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===j.value},style:o},[a&&a({scope:n})])}function ce(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(P.value),d={width:o,minWidth:o,maxWidth:o},s="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return h("div",{class:{"q-calendar-task__footer--day":!0,...s,...A(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:d},[n&&n({scope:r})])}function ve(t,a){return h("div",{class:"q-calendar-task__footer--day-wrapper"},[H.value.map(e=>ce(e,t,a))])}function ye(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[le(e,t),ve(e,t)]})})}function me(){return h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===j.value}},ye())}function pe(){return h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&qe(),ue(),me()])}function fe(){const e=v["head-tasks"],t={start:R.value,end:U.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===j.value},style:n},[e&&e({scope:t})])}function he(e,t){const a=v["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:R.value,end:U.value,cellWidth:n,title:e,index:t};return h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===j.value},style:r},[a&&a({scope:o})])}function ge(e){const t=v["head-weekday-label"],a={timestamp:e},n={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",n,t&&t({scope:a})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=N.value(e,t||c.weekdayBreakpoints[0]>0&&P.value<=c.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&P.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function _e(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return h("div",t,we(e))}function we(a){const e=!0!==c.noActiveDate&&ae(a),t=I.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,s={key:d,tabindex:!0===K.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===K.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&L(e,[13,32])&&(y.value=a.date,void 0!==w.value.onClickDate&&u("click-date",{scope:o}))},...Y("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==c.noAria&&(s.ariaLabel=q.value(a)),r?r({scope:o}):useButton(c,s,n?n({scope:o}):t)}function be(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&ge(e),!0!==c.noDefaultHeaderBtn&&_e(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&ge(e),!0!==c.noDefaultHeaderBtn&&_e(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&_e(e),!0!==c.noDefaultHeaderText&&ge(e)])):void 0}function De(e,t,a){const n=v["title-day"],r=convertToUnit(P.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:P.value},s="function"===typeof c.dayClass?c.dayClass({scope:d}):{},i=!0===c.focusable&&c.focusType.includes("day");return h("div",{class:{"q-calendar-task__title--day":!0,...s,...A(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:o},[n&&n({scope:d}),useFocusHelper()])}function Te(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&ae(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date},o=c.weekdayStyle||O,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},s=convertToUnit(P.value),i={width:s,minWidth:s,maxWidth:s,...o({scope:r})},u=t.date,l={key:u,ref:e=>{p.value[u]=e},tabindex:!0===X.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...A(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===X.value},style:i,onFocus:e=>{!0===X.value&&(m.value=u)},onKeydown:e=>{!0!==t.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&L(e,[13,32])&&(y.value=t.date)},...Y("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&be(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Me(){return H.value.map(e=>Te(e))}function Ee(t,a){return H.value.map(e=>De(e,t,a))}function Ie(){return h("div",{class:{"q-calendar-task__head--days":!0}},[...Me()])}function Ne(e,t){return h("div",{class:{"q-calendar-task__title--days":!0}},[...Ee(e,t)])}function qe(){return h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===j.value},style:{}},[h("div",{style:{position:"relative",display:"flex"}},[fe(),Ie()]),c.modelTitle.map((e,t)=>h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[he(e,t),Ne(e,t)]))])}function Oe(){return h("div",{class:"q-calendar-task__body"},[Ae()])}function Ae(){return h("div",{ref:t,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[pe()])}function Se(){const{start:e,end:t}=C.value;d.value=e.date,s.value=t.date;const a=i.width>0,n=withDirectives(h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Oe()]),[[ResizeObserver$1,te]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([H],z,{deep:!0,immediate:!0}),watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}y.value=e}m.value=e}),watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}u("update:model-value",e)}}),watch(m,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{p.value[m.value]?p.value[m.value].focus():V()}),onBeforeUpdate(()=>{p.value={}}),onMounted(()=>{F()}),e({prev:ee,next:J,move:B,moveToToday:G,updateCurrent:T}),()=>W()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarTask:QCalendarTask,install(e){e.component(QCalendarTask.name,QCalendarTask)}};export default Plugin;export{QCalendarTask,version};
import{reactive,ref,computed,withDirectives,h,watch,getCurrentInstance,onBeforeUnmount,defineComponent,onBeforeUpdate,onMounted,Transition}from"vue";const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,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,MILLISECONDS_IN_WEEK=6048e5;function today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),o=n===r;return e.hasTime&&a&&o&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function updateWeekday(e){return e.weekday=getWeekday(e),e}function updateDayOfYear(e){return e.doy=getDayOfYear(e),e}function updateDisabled(e,t,a,n,r){const o=getDayIdentifier(e);if(void 0!==t){const d=getDayIdentifier(parsed(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));o>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const i in n)if(n[i]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const l=parsed(r[u][0]),c=parsed(r[u][1]);if(isBetweenDates(e,l,c)){e.disabled=!0;break}}else{const v=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(o)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,o,d=[],s=[],i=42,u=0){const l=getDayIdentifier(t),c=[];let v=copyTimestamp(e),y=0,m=y===l;if(l<getDayIdentifier(e))return c;while((!m||c.length<u)&&c.length<i){if(y=getDayIdentifier(v),m=m||y>l&&c.length>=u,m)break;if(0!==n[v.weekday]){const p=copyTimestamp(v);updateFormatted(p),updateRelative(p,a),updateDisabled(p,r,o,d,s),c.push(p),v=relativeDays(v,nextDay)}else v=relativeDays(v,nextDay)}return c}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),o=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),d=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=o&&r<=d}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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 convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function minCharWidth(e,t){return 0===t?e:e.slice(0,t)}const toCamelCase=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let $listeners,$emit;function getMouseEventHandlers(e,a){const t={};for(const n in e){const r=e[n],o=toCamelCase("on-"+n);if(void 0===$listeners)return void console.warn("$listeners has not been set up");if(void 0!==$listeners.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),s=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),$emit(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(s):t[d]=[t[d],s]:t[d]=s}}return t}function getDefaultMouseEventHandlers(e,t){return getMouseEventHandlers(getMouseEventName(e),t)}function getMouseEventName(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function getRawMouseEvents(e){return Object.keys(getMouseEventName(e))}function useMouse(e,t){return $emit=e,$listeners=t,{getMouseEventHandlers:getMouseEventHandlers,getDefaultMouseEventHandlers:getDefaultMouseEventHandlers,getMouseEventName:getMouseEventName,getRawMouseEvents:getRawMouseEvents}}var ResizeObserver$1={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function useCalendar(t,a,{scrollArea:e,pane:n}){if(!a){const l="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(l),new Error(l)}const r=reactive({width:0,height:0}),o=ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const s=computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function i(){}function u(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return withDirectives(h("div",e,[a()]),[[ResizeObserver$1,d]])}return{rootRef:o,scrollWidth:s,__initCalendar:i,__renderCalendar:u}}function useCommon(r,{startDate:e,endDate:t,times:a}){const n=computed(()=>getWeekdaySkips(r.weekdays)),o=computed(()=>parseTimestamp(e.value)),d=computed(()=>{if("0000-00-00"===t.value)return m(o.value);return parseTimestamp(t.value)}),s=computed(()=>{const a={timeZone:"UTC",day:"numeric"};return createNativeLocaleFormatter(r.locale,(e,t)=>a)}),i=computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return createNativeLocaleFormatter(r.locale,(e,t)=>t?n:a)}),u=computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return createNativeLocaleFormatter(r.locale,e=>t)});function l(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=getDayIdentifier(t),r=getDayIdentifier(parsed(e[0])),o=getDayIdentifier(parsed(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=l(a,e),{firstDay:d,lastDay:s,betweenDays:i}=c(n,e);return{"q-past-day":!0!==d&&!0!==i&&!0!==s&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==i&&!0!==s&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===i,"q-range-last":!0===s,"q-range-hover":!0===r&&(!0===d||!0===s||!0===i),"q-disabled-day disabled":!0===e.disabled}}function y(e){return getStartOfWeek(e,r.weekdays,a.today)}function m(e){return getEndOfWeek(e,r.weekdays,a.today)}function p(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:s,weekdayFormatter:i,ariaDateFormatter:u,arrayHasDate:l,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:m,dayStyleDefault:p}}String,today(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const useTaskProps={modelValue:{type:String,default:today(),validator:e=>""===e||validateTimestamp(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>validateNumber(e)&&e>0},bordered:Boolean,dark:Boolean,noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},noHeader:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)});return t}},taskWidth:{type:Number,default:200,validator:e=>validateNumber(e)&&e>0}};function useTask(t,e,{weekdaySkips:a,times:n}){const r=computed(()=>{{if("day"===t.view)return parseTimestamp(t.modelValue);if("week"===t.view)return getStartOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);if("month"===t.view)return getStartOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}}),o=computed(()=>{{if("day"===t.view){if(1===t.viewCount)return r.value;let e=copyTimestamp(r.value);return e=addToDate(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return getEndOfWeek(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{day:(t.viewCount-1)*DAYS_IN_WEEK}),getEndOfWeek(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return getEndOfMonth(parseTimestamp(t.modelValue),t.weekdays,n.today);{let e=copyTimestamp(r.value);return e=addToDate(e,{month:t.viewCount}),getEndOfMonth(e,t.weekdays,n.today)}}}),d=computed(()=>{return createDayList(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const useTimesProps={now:{type:String,validator:e=>""===e||validateTimestamp(e),default:""}};function useTimes(e){const t=reactive({now:parseTimestamp("0000-00-00 00:00"),today:parseTimestamp("0000-00-00")}),a=computed(()=>e.now?parseTimestamp(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),s(e,t.now),d(e,t.today)}function o(){return parseDate(new Date)}function d(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)}function s(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:s}}function useRenderValues(r,{parsedView:o,times:d,parsedValue:s}){const e=computed(()=>{const e=s.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=getStartOfMonth(e),n=getEndOfMonth(e),t=daysInMonth(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=getStartOfWeek(e,r.weekdays,d.today),n=getEndOfWeek(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=moveRelativeDays(copyTimestamp(n),nextDay,t>1?t-1:t,r.weekdays),updateFormatted(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=getStartOfMonth(e),n=getEndOfMonth(e),updateFormatted(n),t=daysInMonth(a.year,a.month);break;case"resource":t=1,n=moveRelativeDays(copyTimestamp(n),nextDay,t,r.weekdays),updateFormatted(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const useMoveEmits=["moved"];function useMove(s,{parsedView:i,parsedValue:u,weekdaySkips:l,direction:c,maxDays:v,times:y,emittedValue:m,emit:p}){function e(a=1){if(0!==a){let e=copyTimestamp(u.value);const n=a>0,r=n?nextDay:prevDay,o=n?DAYS_IN_MONTH_MAX:DAY_MIN;let t=n?a:-a;c.value=n?"next":"prev";const d=l.value.filter(e=>0!==e).length;while(--t>=0)switch(i.value){case"month":e.day=o,r(e),updateWeekday(e);while(0===l.value[e.weekday])e=addToDate(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":relativeDays(e,r,d,s.weekdays);break;case"day":case"scheduler":case"agenda":relativeDays(e,r,v.value,s.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":relativeDays(e,r,v.value,s.weekdays);break}updateWeekday(e),updateFormatted(e),updateDayOfYear(e),updateRelative(e,y.now),m.value=e.date,p("moved",e)}else m.value=today()}return{move:e}}const listenerRE=/^on[A-Z]/;function useEmitListeners(e=getCurrentInstance()){return{emitListeners:computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===listenerRE.test(e)&&(t[e]=!0)});return t})}}function useFocusHelper(){return[h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function useButton(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,h("button",t,[a,!0===n&&useFocusHelper()])}const useCheckChangeEmits=["change"];function useCheckChange(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function useEvents(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode}=useEvents(),useNavigationProps={useNavigation:Boolean};function useKeyboard(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:s,emittedValue:i,weekdaySkips:u,direction:l,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",f),document.addEventListener("keydown",p))}function v(){document&&(document.removeEventListener("keyup",f),document.removeEventListener("keydown",p),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function m(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function p(e){y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function f(e){if(y(e)&&isKeyCode(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:w();break;case 34:b();break;case 35:T();break;case 36:D();break;case 37:k();break;case 38:h();break;case 39:_();break;case 40:g();break}}function h(e){let t=copyTimestamp(o.value);if("month"===s.value){if(t=addToDate(t,{day:-7}),o.value.month!==t.month)return l.value="prev",void(i.value=t.date)}else"day"!==s.value&&"week"!==s.value&&"month-interval"!==s.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="prev",r.value=t.date}function g(e){let t=copyTimestamp(o.value);if("month"===s.value){if(t=addToDate(t,{day:7}),o.value.month!==t.month)return l.value="next",void(i.value=t.date)}else"day"!==s.value&&"week"!==s.value&&"month-interval"!==s.value||(t=addToDate(t,{minute:parseInt(a.intervalMinutes)}));l.value="next",r.value=t.date}function k(e){let t=copyTimestamp(o.value);l.value="prev";do{t=addToDate(t,{day:-1})}while(0===u.value[t.weekday]);if("month"===s.value||"month-interval"===s.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===s.value){if(t.weekday>o.value.weekday)return void(i.value=t.date)}else if("day"===s.value)return void(i.value=t.date);r.value=t.date}function _(e){let t=copyTimestamp(o.value);l.value="next";do{t=addToDate(t,{day:1})}while(0===u.value[t.weekday]);if("month"===s.value||"month-interval"===s.value){if(o.value.month!==t.month)return void(i.value=t.date)}else if("week"===s.value){if(t.weekday<o.value.weekday)return void(i.value=t.date)}else if("day"===s.value)return void(i.value=t.date);r.value=t.date}function w(e){let t=copyTimestamp(o.value);if("month"===s.value||"month-interval"===s.value){t=addToDate(t,{month:-1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===s.value?t=addToDate(t,{day:-1}):"week"===s.value&&(t=addToDate(t,{day:-7}));l.value="prev",r.value=t.date}function b(e){let t=copyTimestamp(o.value);if("month"===s.value||"month-interval"===s.value){t=addToDate(t,{month:1});const a=t.day<=15?1:-1;while(0===u.value[t.weekday])t=addToDate(t,{day:a})}else"day"===s.value?t=addToDate(t,{day:1}):"week"===s.value&&(t=addToDate(t,{day:7}));l.value="next",r.value=t.date}function D(e){let t=copyTimestamp(o.value);"month"===s.value||"month-interval"===s.value?t=getStartOfMonth(t):"week"===s.value&&(t=getStartOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}function T(e){let t=copyTimestamp(o.value);"month"===s.value||"month-interval"===s.value?t=getEndOfMonth(t):"week"===s.value&&(t=getEndOfWeek(t,a.weekdays,c.today));while(0===u.value[t.weekday])t=addToDate(t,{day:-1});r.value=t.date}return onBeforeUnmount(()=>{v()}),watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:m}}var QCalendarTask=defineComponent({name:"QCalendarTask",directives:[ResizeObserver$1],props:{...useTimesProps,...useNavigationProps,...useTaskProps},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...useCheckChangeEmits,...useMoveEmits,...getRawMouseEvents("-date"),...getRawMouseEvents("-day"),...getRawMouseEvents("-head-day")],setup(c,{slots:v,emit:u,expose:e}){const t=ref(null),a=ref(null),o=ref("next"),d=ref(c.modelValue||today()),s=ref("0000-00-00"),n=ref(0),y=ref(c.modelValue),m=ref(null),r=ref(null),p=ref({}),i=reactive({width:0,height:0}),f=ref(!1),l=ref(null),g=ref(null),k=computed(()=>{return c.view}),_=getCurrentInstance();if(null===_)throw new Error("current instance is null");const{emitListeners:w}=useEmitListeners(_),{times:b,setCurrent:D,updateCurrent:T}=useTimes(c);T(),D();const{weekdaySkips:M,parsedStart:E,dayFormatter:I,weekdayFormatter:N,ariaDateFormatter:q,dayStyleDefault:O,getRelativeClasses:A}=useCommon(c,{startDate:d,endDate:s,times:b}),S=computed(()=>{return parseTimestamp(c.modelValue,b.now)||E.value||b.today});r.value=S.value,m.value=S.value.date;const{renderValues:C}=useRenderValues(c,{parsedView:k,times:b,parsedValue:S}),{rootRef:x,__initCalendar:F,__renderCalendar:W}=useCalendar(c,Se,{scrollArea:t,pane:a}),{days:H,parsedStartDate:R,parsedEndDate:U}=useTask(c,u,{weekdaySkips:M,times:b}),{move:B}=useMove(c,{parsedView:k,parsedValue:S,weekdaySkips:M,direction:o,maxDays:n,times:b,emittedValue:y,emit:u}),{getDefaultMouseEventHandlers:Y}=useMouse(u,w),{checkChange:z}=useCheckChange(u,{days:H,lastStart:l,lastEnd:g}),{isKeyCode:L}=useEvents(),{tryFocus:V}=useKeyboard(c,{rootRef:x,focusRef:m,focusValue:r,datesRef:p,days:H,parsedView:k,parsedValue:S,emittedValue:y,weekdaySkips:M,direction:o,times:b}),j=ref(!0),P=computed(()=>{if(void 0!==c.cellWidth)return parseInt(c.cellWidth,10);return 150}),$=computed(()=>{return!0===c.focusable&&c.focusType.includes("day")&&!0!==isMiniMode.value}),K=computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==$.value}),X=computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),Q=computed(()=>{return parseInt(c.dayHeight,10)}),Z=computed(()=>{return parseInt(c.dayMinHeight,10)});function G(){y.value=today()}function J(e=1){B(e)}function ee(e=1){B(-e)}function te({width:e,height:t}){i.width=e,i.height=t}function ae(e){return e.date===y.value}function ne(e,t,a){const n=v.day,r=c.dayStyle||O,o=!0!==c.noActiveDate&&S.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},s=convertToUnit(P.value),i={width:s,minWidth:s,maxWidth:s,...r({scope:d})},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return h("div",{tabindex:!0===$.value?0:-1,class:{"q-calendar-task__task--day":!0,...u,...A(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:i,onFocus:e=>{$.value},...Y("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),useFocusHelper()])}function re(t,a){return H.value.map(e=>ne(e,t,a))}function oe(e,t){const a=v.days,n={timestamps:H.value,days:H.value,task:e,taskIndex:t,cellWidth:P.value};return h("div",{class:"q-calendar-task__task--days-row"},[re(e,t),a&&a({scope:n})])}function de(t,e,a=0,n=!0){const r=v.task,o={start:R.value,end:U.value,task:t,taskIndex:e,expanded:n},d=convertToUnit(c.taskWidth),s={width:d,minWidth:d,maxWidth:d},i=!0===c.focusable&&c.focusType.includes("task");return h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===j.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:s},[h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;u("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),useFocusHelper()])}function se(e,t,a=0,n=!0){const r=void 0!==e.height?convertToUnit(parseInt(e.height,10)):Q.value>0?convertToUnit(Q.value):"auto",o=Z.value>0?convertToUnit(Z.value):void 0,d={height:r};void 0!==o&&(d.minHeight=o);const s=h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[de(e,t,a,n),oe(e,t)]);return void 0!==e.children?[s,h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ie(e.children,a+1,!1===n?n:e.expanded)])]:[s]}function ie(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return se(e,t,a,void 0!==e.children?e.expanded:n)})}function ue(){return h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===j.value}},[ie()])}function le(e,t){const a=v["footer-task"],n={start:R.value,end:U.value,footer:e,index:t},r=convertToUnit(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===j.value},style:o},[a&&a({scope:n})])}function ce(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=convertToUnit(P.value),d={width:o,minWidth:o,maxWidth:o},s="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return h("div",{class:{"q-calendar-task__footer--day":!0,...s,...A(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===$.value},style:d},[n&&n({scope:r})])}function ve(t,a){return h("div",{class:"q-calendar-task__footer--day-wrapper"},[H.value.map(e=>ce(e,t,a))])}function ye(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[le(e,t),ve(e,t)]})})}function me(){return h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===j.value}},ye())}function pe(){return h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&qe(),ue(),me()])}function fe(){const e=v["head-tasks"],t={start:R.value,end:U.value},a=convertToUnit(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===j.value},style:n},[e&&e({scope:t})])}function he(e,t){const a=v["title-task"],n=convertToUnit(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:R.value,end:U.value,cellWidth:n,title:e,index:t};return h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===j.value},style:r},[a&&a({scope:o})])}function ge(e){const t=v["head-weekday-label"],a={timestamp:e},n={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return h("div",n,t&&t({scope:a})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=N.value(e,t||c.weekdayBreakpoints[0]>0&&P.value<=c.weekdayBreakpoints[0]);return h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&P.value<=c.weekdayBreakpoints[1]?minCharWidth(a,c.minWeekdayLabel):a)}function _e(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return h("div",t,we(e))}function we(a){const e=!0!==c.noActiveDate&&ae(a),t=I.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,s={key:d,tabindex:!0===K.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===K.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&L(e,[13,32])&&(y.value=a.date,void 0!==w.value.onClickDate&&u("click-date",{scope:o}))},...Y("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==c.noAria&&(s.ariaLabel=q.value(a)),r?r({scope:o}):useButton(c,s,n?n({scope:o}):t)}function be(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&ge(e),!0!==c.noDefaultHeaderBtn&&_e(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&ge(e),!0!==c.noDefaultHeaderBtn&&_e(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&_e(e),!0!==c.noDefaultHeaderText&&ge(e)])):void 0}function De(e,t,a){const n=v["title-day"],r=convertToUnit(P.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:P.value},s="function"===typeof c.dayClass?c.dayClass({scope:d}):{},i=!0===c.focusable&&c.focusType.includes("day");return h("div",{class:{"q-calendar-task__title--day":!0,...s,...A(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===i},style:o},[n&&n({scope:d}),useFocusHelper()])}function Te(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&ae(t),r={timestamp:t,activeDate:n,droppable:f.value=t.date},o=c.weekdayStyle||O,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},s=convertToUnit(P.value),i={width:s,minWidth:s,maxWidth:s,...o({scope:r})},u=t.date,l={key:u,ref:e=>{p.value[u]=e},tabindex:!0===X.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...A(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===X.value},style:i,onFocus:e=>{!0===X.value&&(m.value=u)},onKeydown:e=>{!0!==t.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&L(e,[13,32])&&(y.value=t.date)},...Y("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?f.value=t.date:f.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?f.value=t.date:f.value="")}};return h("div",l,[void 0!==e&&e({scope:r}),void 0===e&&be(t),void 0===e&&a&&a({scope:r}),useFocusHelper()])}function Me(){return H.value.map(e=>Te(e))}function Ee(t,a){return H.value.map(e=>De(e,t,a))}function Ie(){return h("div",{class:{"q-calendar-task__head--days":!0}},[...Me()])}function Ne(e,t){return h("div",{class:{"q-calendar-task__title--days":!0}},[...Ee(e,t)])}function qe(){return h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===j.value},style:{}},[h("div",{style:{position:"relative",display:"flex"}},[fe(),Ie()]),c.modelTitle.map((e,t)=>h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[he(e,t),Ne(e,t)]))])}function Oe(){return h("div",{class:"q-calendar-task__body"},[Ae()])}function Ae(){return h("div",{ref:t,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[pe()])}function Se(){const{start:e,end:t}=C.value;d.value=e.date,s.value=t.date;const a=i.width>0,n=withDirectives(h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Oe()]),[[ResizeObserver$1,te]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return h(Transition,{name:r,appear:!0},()=>n)}}return watch([H],z,{deep:!0,immediate:!0}),watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}y.value=e}m.value=e}),watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=getDayIdentifier(parsed(e)),n=getDayIdentifier(parsed(t));o.value=a>=n?"next":"prev"}u("update:model-value",e)}}),watch(m,e=>{e&&(r.value=parseTimestamp(e))}),watch(r,e=>{p.value[m.value]?p.value[m.value].focus():V()}),onBeforeUpdate(()=>{p.value={}}),onMounted(()=>{F()}),e({prev:ee,next:J,move:B,moveToToday:G,updateCurrent:T}),()=>W()}}),name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const{version}=pkg;var Plugin={version:version,QCalendarTask:QCalendarTask,install(e){e.component(QCalendarTask.name,QCalendarTask)}};export default Plugin;export{QCalendarTask,version};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarTask={},e.Vue))})(this,function(e,We){"use strict";const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],r=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,p=31,u=12,o=1,m=1,l=7,d=60,i=24,s=6048e5;function Ve(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,E(t,2),E(a,2)].join("-")}function x(e,t,a){let n=S(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=I(n);return n=R(n,t[0],j),n=_(n),a&&(n=k(n,a,n.hasTime)),n}function C(e,t,a){let n=S(e);const r=A(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=j(n);return n=R(n,t[t.length-1],I),n=_(n),a&&(n=k(n,a,n.hasTime)),n}function F(e){const t=S(e);return t.day=m,_(t),t}function T(e){const t=S(e);return t.day=A(t.year,t.month),_(t),t}function c(e){return!!a.exec(e)}function Be(e){const t=a.exec(e);return t?{date:e,time:E(parseInt(t[6],10)||0,2)+":"+E(parseInt(t[8],10)||0,2),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 Ie(e,t){let a=Be(e);return null===a?null:(a=_(a),t&&k(a,t,a.hasTime),a)}function v(e){return _({date:E(e.getFullYear(),4)+"-"+E(e.getMonth()+1,2)+"-"+E(e.getDate(),2),time:E(e.getHours()||0,2)+":"+E(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function je(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function y(e){return 100*e.hour+e.minute}function k(e,t,a=!1){let n=je(t),r=je(e),o=n===r;return e.hasTime&&a&&o&&(n=y(t),r=y(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function w(e){return e.weekday=q(e),e}function g(e){return e.doy=f(e),e}function b(e,t,a,n,r){const o=je(e);if(void 0!==t){const d=je(Be(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=je(Be(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=Be(r[i][0]),c=Be(r[i][1]);if(P(e,s,c)){e.disabled=!0;break}}else{const v=je(Ie(r[i]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function _(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=V(e),e.date=W(e),e.weekday=q(e),e.doy=f(e),e.workweek=h(e),e}function f(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 h(e){let t;if(t=0===e.year?Date.UTC(new Date):z(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/s;return 1+Math.floor(o)}function q(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%u+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}function D(e){return 1===(e%4===0^e%100===0^e%400===0)}function A(e,t){return(D(e)?r:n)[t]}function S(e){return{...e}}function E(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function W(e){let t=`${E(e.year,4)}-${E(e.month,2)}`;return e.hasDay&&(t+=`-${E(e.day,2)}`),t}function V(e){return e.hasTime?`${E(e.hour,2)}:${E(e.minute,2)}`:""}function B(e){return W(e)+" "+(e.hasTime?V(e):"00:00")}function I(e){return++e.day,e.weekday=(e.weekday+1)%l,e.day>t&&e.day>A(e.year,e.month)&&(e.day=m,++e.month,e.month>u&&(e.month=o,++e.year)),e}function j(e){return e.day--,e.weekday=(e.weekday+6)%l,e.day<m&&(e.month--,e.month<o&&(e.year--,e.month=u),e.day=A(e.year,e.month)),e}function O(e,t=I,a=1,n=[0,1,2,3,4,5,6]){return M(e,t,a,n)}function M(e,t=I,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==I||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function R(e,t,a=I,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function H(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<l;++a){let t=1;for(let e=1;e<l;++e){const r=(a+e)%l;if(n[r])break;++t}e[a]=n[a]*t}return e}function N(e,t,a,n,r,o,d=[],u=[],l=42,i=0){const s=je(t),c=[];let v=S(e),y=0,f=y===s;if(s<je(e))return c;while((!f||c.length<i)&&c.length<l){if(y=je(v),f=f||y>s&&c.length>=i,f)break;if(0!==n[v.weekday]){const h=S(v);_(h),k(h,a),b(h,r,o,d,u),c.push(h),v=M(v,I)}else v=M(v,I)}return c}function L(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(U(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${B(t)}`),""}}}function z(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function U(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function $(e){return isFinite(parseInt(e,10))}function P(e,t,a,n){const r=je(e)+(!0===n?y(e):0),o=je(t)+(!0===n?y(t):0),d=je(a)+(!0===n?y(a):0);return r>=o&&r<=d}function K(e,t){const n=S(e);let r;return Y(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=Q.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&ee(n,Q[r]),_(n),n}const Q=["minute","hour","day","month"];function Y(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function Z(e){if(e.minute>=d||e.minute<0){const t=Math.floor(e.minute/d);e.minute-=t*d,e.hour+=t,G(e)}return e}function G(e){if(e.hour>=i||e.hour<0){const t=Math.floor(e.hour/i);e.hour-=t*i,e.day+=t,J(e)}return e}function J(t){X(t);let a=A(t.year,t.month);if(t.day>a){++t.month,t.month>u&&X(t);let e=t.day-a;a=A(t.year,t.month);do{e>a&&(++t.month,t.month>u&&X(t),e-=a,a=A(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&X(t),a=A(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&X(t),a=A(t.year,t.month))}while(e>a);t.day=a-e}return t}function X(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<o&&(e.month+=u,--e.year);return e}function ee(e,t){switch(t){case"minute":return Z(e);case"hour":return G(e);case"day":return J(e);case"month":return X(e)}}function Oe(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function Me(e,t){return 0===t?e:e.slice(0,t)}const te=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let ae,ne;function re(e,a){const t={};for(const n in e){const r=e[n],o=te("on-"+n);if(void 0===ae)return void console.warn("$listeners has not been set up");if(void 0!==ae.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ne(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function oe(e,t){return re(de(e),t)}function de(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function ue(e){return Object.keys(de(e))}function Re(e,t){return ne=e,ae=t,{getMouseEventHandlers:re,getDefaultMouseEventHandlers:oe,getMouseEventName:de,getRawMouseEvents:ue}}var He={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ne(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=We.reactive({width:0,height:0}),o=We.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=We.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return We.withDirectives(We.h("div",e,[a()]),[[He,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:l,__renderCalendar:i}}function Le(r,{startDate:e,endDate:t,times:a}){const n=We.computed(()=>H(r.weekdays)),o=We.computed(()=>Ie(e.value)),d=We.computed(()=>{if("0000-00-00"===t.value)return f(o.value);return Ie(t.value)}),u=We.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return L(r.locale,(e,t)=>a)}),l=We.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return L(r.locale,(e,t)=>t?n:a)}),i=We.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return L(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=je(t),r=je(Be(e[0])),o=je(Be(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:l}=c(n,e);return{"q-past-day":!0!==d&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===l,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===l),"q-disabled-day disabled":!0===e.disabled}}function y(e){return x(e,r.weekdays,a.today)}function f(e){return C(e,r.weekdays,a.today)}function h(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:l,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:f,dayStyleDefault:h}}String,Ve(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const le={modelValue:{type:String,default:Ve(),validator:e=>""===e||c(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>$(e)&&e>0},bordered:Boolean,dark:Boolean,noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},noHeader:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)});return t}},taskWidth:{type:Number,default:200,validator:e=>$(e)&&e>0}};function ze(t,e,{weekdaySkips:a,times:n}){const r=We.computed(()=>{{if("day"===t.view)return Ie(t.modelValue);if("week"===t.view)return x(Ie(t.modelValue),t.weekdays,n.today);if("month"===t.view)return F(Ie(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}}),o=We.computed(()=>{{if("day"===t.view){if(1===t.viewCount)return r.value;let e=S(r.value);return e=K(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return C(Ie(t.modelValue),t.weekdays,n.today);{let e=S(r.value);return e=K(e,{day:(t.viewCount-1)*l}),C(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return T(Ie(t.modelValue),t.weekdays,n.today);{let e=S(r.value);return e=K(e,{month:t.viewCount}),T(e,t.weekdays,n.today)}}}),d=We.computed(()=>{return N(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const ie={now:{type:String,validator:e=>""===e||c(e),default:""}};function Ue(e){const t=We.reactive({now:Ie("0000-00-00 00:00"),today:Ie("0000-00-00")}),a=We.computed(()=>e.now?Ie(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return v(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return We.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function $e(r,{parsedView:o,times:d,parsedValue:u}){const e=We.computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=F(e),n=T(e),t=A(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=x(e,r.weekdays,d.today),n=C(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=O(S(n),I,t>1?t-1:t,r.weekdays),_(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=F(e),n=T(e),_(n),t=A(a.year,a.month);break;case"resource":t=1,n=O(S(n),I,t,r.weekdays),_(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const se=["moved"];function Pe(u,{parsedView:l,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:f,emit:h}){function e(a=1){if(0!==a){let e=S(i.value);const n=a>0,r=n?I:j,o=n?p:m;let t=n?a:-a;c.value=n?"next":"prev";const d=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),w(e);while(0===s.value[e.weekday])e=K(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":M(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":M(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":M(e,r,v.value,u.weekdays);break}w(e),_(e),g(e),k(e,y.now),f.value=e.date,h("moved",e)}else f.value=Ve()}return{move:e}}const ce=/^on[A-Z]/;function Ke(e=We.getCurrentInstance()){return{emitListeners:We.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===ce.test(e)&&(t[e]=!0)});return t})}}function Qe(){return[We.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function Ye(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,We.h("button",t,[a,!0===n&&Qe()])}const ve=["change"];function Ze(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function Ge(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:ye}=Ge(),fe={useNavigation:Boolean};function Je(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:l,weekdaySkips:i,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",p),document.addEventListener("keydown",h))}function v(){document&&(document.removeEventListener("keyup",p),document.removeEventListener("keydown",h),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function f(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function h(e){y(e)&&ye(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function p(e){if(y(e)&&ye(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:_();break;case 35:D();break;case 36:q();break;case 37:w();break;case 38:m();break;case 39:g();break;case 40:k();break}}function m(e){let t=S(o.value);if("month"===u.value){if(t=K(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function k(e){let t=S(o.value);if("month"===u.value){if(t=K(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=S(o.value);s.value="prev";do{t=K(t,{day:-1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function g(e){let t=S(o.value);s.value="next";do{t=K(t,{day:1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function b(e){let t=S(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:-1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:-1}):"week"===u.value&&(t=K(t,{day:-7}));s.value="prev",r.value=t.date}function _(e){let t=S(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:1}):"week"===u.value&&(t=K(t,{day:7}));s.value="next",r.value=t.date}function q(e){let t=S(o.value);"month"===u.value||"month-interval"===u.value?t=F(t):"week"===u.value&&(t=x(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=K(t,{day:-1});r.value=t.date}function D(e){let t=S(o.value);"month"===u.value||"month-interval"===u.value?t=T(t):"week"===u.value&&(t=C(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=K(t,{day:-1});r.value=t.date}return We.onBeforeUnmount(()=>{v()}),We.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:f}}var he=We.defineComponent({name:"QCalendarTask",directives:[He],props:{...ie,...fe,...le},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...ve,...se,...ue("-date"),...ue("-day"),...ue("-head-day")],setup(c,{slots:v,emit:i,expose:e}){const t=We.ref(null),a=We.ref(null),o=We.ref("next"),d=We.ref(c.modelValue||Ve()),u=We.ref("0000-00-00"),n=We.ref(0),y=We.ref(c.modelValue),f=We.ref(null),r=We.ref(null),h=We.ref({}),l=We.reactive({width:0,height:0}),p=We.ref(!1),s=We.ref(null),m=We.ref(null),k=We.computed(()=>{return c.view}),w=We.getCurrentInstance();if(null===w)throw new Error("current instance is null");const{emitListeners:g}=Ke(w),{times:b,setCurrent:_,updateCurrent:q}=Ue(c);q(),_();const{weekdaySkips:D,parsedStart:x,dayFormatter:C,weekdayFormatter:F,ariaDateFormatter:T,dayStyleDefault:A,getRelativeClasses:S}=Le(c,{startDate:d,endDate:u,times:b}),E=We.computed(()=>{return Ie(c.modelValue,b.now)||x.value||b.today});r.value=E.value,f.value=E.value.date;const{renderValues:W}=$e(c,{parsedView:k,times:b,parsedValue:E}),{rootRef:V,__initCalendar:B,__renderCalendar:I}=Ne(c,Ee,{scrollArea:t,pane:a}),{days:j,parsedStartDate:O,parsedEndDate:M}=ze(c,i,{weekdaySkips:D,times:b}),{move:R}=Pe(c,{parsedView:k,parsedValue:E,weekdaySkips:D,direction:o,maxDays:n,times:b,emittedValue:y,emit:i}),{getDefaultMouseEventHandlers:H}=Re(i,g),{checkChange:N}=Ze(i,{days:j,lastStart:s,lastEnd:m}),{isKeyCode:L}=Ge(),{tryFocus:z}=Je(c,{rootRef:V,focusRef:f,focusValue:r,datesRef:h,days:j,parsedView:k,parsedValue:E,emittedValue:y,weekdaySkips:D,direction:o,times:b}),U=We.ref(!0),$=We.computed(()=>{if(void 0!==c.cellWidth)return parseInt(c.cellWidth,10);return 150}),P=We.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")&&!0!==isMiniMode.value}),K=We.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==P.value}),Q=We.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),Y=We.computed(()=>{return parseInt(c.dayHeight,10)}),Z=We.computed(()=>{return parseInt(c.dayMinHeight,10)});function G(){y.value=Ve()}function J(e=1){R(e)}function X(e=1){R(-e)}function ee({width:e,height:t}){l.width=e,l.height=t}function te(e){return e.date===y.value}function ae(e,t,a){const n=v.day,r=c.dayStyle||A,o=!0!==c.noActiveDate&&E.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},u=Oe($.value),l={width:u,minWidth:u,maxWidth:u,...r({scope:d})},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return We.h("div",{tabindex:!0===P.value?0:-1,class:{"q-calendar-task__task--day":!0,...i,...S(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===P.value},style:l,onFocus:e=>{P.value},...H("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),Qe()])}function ne(t,a){return j.value.map(e=>ae(e,t,a))}function re(e,t){const a=v.days,n={timestamps:j.value,days:j.value,task:e,taskIndex:t,cellWidth:$.value};return We.h("div",{class:"q-calendar-task__task--days-row"},[ne(e,t),a&&a({scope:n})])}function oe(t,e,a=0,n=!0){const r=v.task,o={start:O.value,end:M.value,task:t,taskIndex:e,expanded:n},d=Oe(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},l=!0===c.focusable&&c.focusType.includes("task");return We.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===U.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===l},style:u},[We.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[We.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;i("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),Qe()])}function de(e,t,a=0,n=!0){const r=void 0!==e.height?Oe(parseInt(e.height,10)):Y.value>0?Oe(Y.value):"auto",o=Z.value>0?Oe(Z.value):void 0,d={height:r};void 0!==o&&(d.minHeight=o);const u=We.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[oe(e,t,a,n),re(e,t)]);return void 0!==e.children?[u,We.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return de(e,t,a,void 0!==e.children?e.expanded:n)})}function le(){return We.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===U.value}},[ue()])}function ie(e,t){const a=v["footer-task"],n={start:O.value,end:M.value,footer:e,index:t},r=Oe(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return We.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===U.value},style:o},[a&&a({scope:n})])}function se(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=Oe($.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return We.h("div",{class:{"q-calendar-task__footer--day":!0,...u,...S(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===P.value},style:d},[n&&n({scope:r})])}function ce(t,a){return We.h("div",{class:"q-calendar-task__footer--day-wrapper"},[j.value.map(e=>se(e,t,a))])}function ve(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return We.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ie(e,t),ce(e,t)]})})}function ye(){return We.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===U.value}},ve())}function fe(){return We.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Te(),le(),ye()])}function he(){const e=v["head-tasks"],t={start:O.value,end:M.value},a=Oe(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return We.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===U.value},style:n},[e&&e({scope:t})])}function pe(e,t){const a=v["title-task"],n=Oe(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:O.value,end:M.value,cellWidth:n,title:e,index:t};return We.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===U.value},style:r},[a&&a({scope:o})])}function me(e){const t=v["head-weekday-label"],a={timestamp:e},n={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return We.h("div",n,t&&t({scope:a})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=F.value(e,t||c.weekdayBreakpoints[0]>0&&$.value<=c.weekdayBreakpoints[0]);return We.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&$.value<=c.weekdayBreakpoints[1]?Me(a,c.minWeekdayLabel):a)}function we(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return We.h("div",t,ge(e))}function ge(a){const e=!0!==c.noActiveDate&&te(a),t=C.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===K.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===K.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&L(e,[13,32])&&(y.value=a.date,void 0!==g.value.onClickDate&&i("click-date",{scope:o}))},...H("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=T.value(a)),r?r({scope:o}):Ye(c,u,n?n({scope:o}):t)}function be(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&me(e),!0!==c.noDefaultHeaderBtn&&we(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&me(e),!0!==c.noDefaultHeaderBtn&&we(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&we(e),!0!==c.noDefaultHeaderText&&me(e)])):void 0}function _e(e,t,a){const n=v["title-day"],r=Oe($.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:$.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},l=!0===c.focusable&&c.focusType.includes("day");return We.h("div",{class:{"q-calendar-task__title--day":!0,...u,...S(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===l},style:o},[n&&n({scope:d}),Qe()])}function qe(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&te(t),r={timestamp:t,activeDate:n,droppable:p.value=t.date},o=c.weekdayStyle||A,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=Oe($.value),l={width:u,minWidth:u,maxWidth:u,...o({scope:r})},i=t.date,s={key:i,ref:e=>{h.value[i]=e},tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...S(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},style:l,onFocus:e=>{!0===Q.value&&(f.value=i)},onKeydown:e=>{!0!==t.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&L(e,[13,32])&&(y.value=t.date)},...H("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?p.value=t.date:p.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?p.value=t.date:p.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?p.value=t.date:p.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?p.value=t.date:p.value="")}};return We.h("div",s,[void 0!==e&&e({scope:r}),void 0===e&&be(t),void 0===e&&a&&a({scope:r}),Qe()])}function De(){return j.value.map(e=>qe(e))}function xe(t,a){return j.value.map(e=>_e(e,t,a))}function Ce(){return We.h("div",{class:{"q-calendar-task__head--days":!0}},[...De()])}function Fe(e,t){return We.h("div",{class:{"q-calendar-task__title--days":!0}},[...xe(e,t)])}function Te(){return We.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===U.value},style:{}},[We.h("div",{style:{position:"relative",display:"flex"}},[he(),Ce()]),c.modelTitle.map((e,t)=>We.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[pe(e,t),Fe(e,t)]))])}function Ae(){return We.h("div",{class:"q-calendar-task__body"},[Se()])}function Se(){return We.h("div",{ref:t,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[fe()])}function Ee(){const{start:e,end:t}=W.value;d.value=e.date,u.value=t.date;const a=l.width>0,n=We.withDirectives(We.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Ae()]),[[He,ee]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return We.h(We.Transition,{name:r,appear:!0},()=>n)}}return We.watch([j],N,{deep:!0,immediate:!0}),We.watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=je(Be(e)),n=je(Be(t));o.value=a>=n?"next":"prev"}y.value=e}f.value=e}),We.watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=je(Be(e)),n=je(Be(t));o.value=a>=n?"next":"prev"}i("update:model-value",e)}}),We.watch(f,e=>{e&&(r.value=Ie(e))}),We.watch(r,e=>{h.value[f.value]?h.value[f.value].focus():z()}),We.onBeforeUpdate(()=>{h.value={}}),We.onMounted(()=>{B()}),e({prev:X,next:J,move:R,moveToToday:G,updateCurrent:q}),()=>I()}}),pe="@quasar/quasar-ui-qcalendar",me="4.0.0-beta.2",ke="Jeff Galbraith <jeff@quasar.dev>",we="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",ge="MIT",be="dist/index.esm.js",_e="dist/index.common.js",qe="dist/types/index.d.ts",De={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},xe={type:"github",url:"https://github.com/sponsors/hawkeye64"},Ce={access:"public"},Fe={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},Te="https://github.com/quasarframework/quasar-ui-qcalendar/issues",Ae="https://github.com/quasarframework/quasar-ui-qcalendar",Se=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],Ee={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},Xe={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},et=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],et={name:pe,version:me,author:ke,description:we,license:ge,module:be,main:_e,typings:qe,scripts:De,funding:xe,publishConfig:Ce,repository:Fe,bugs:Te,homepage:Ae,keywords:Se,vetur:Ee,devDependencies:Xe,browserslist:et};const{version:tt}=et;e.QCalendarTask=he,e.version=tt,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("vue")):"function"===typeof define&&define.amd?define(["exports","vue"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.QCalendarTask={},e.Vue))})(this,function(e,We){"use strict";const a=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],r=[0,31,29,31,30,31,30,31,31,30,31,30,31],t=28,p=31,u=12,o=1,m=1,l=7,d=60,i=24,s=6048e5;function Ve(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,E(t,2),E(a,2)].join("-")}function x(e,t,a){let n=S(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=I(n);return n=R(n,t[0],j),n=_(n),a&&(n=k(n,a,n.hasTime)),n}function C(e,t,a){let n=S(e);const r=A(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=j(n);return n=R(n,t[t.length-1],I),n=_(n),a&&(n=k(n,a,n.hasTime)),n}function F(e){const t=S(e);return t.day=m,_(t),t}function T(e){const t=S(e);return t.day=A(t.year,t.month),_(t),t}function c(e){return!!a.exec(e)}function Be(e){const t=a.exec(e);return t?{date:e,time:E(parseInt(t[6],10)||0,2)+":"+E(parseInt(t[8],10)||0,2),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 Ie(e,t){let a=Be(e);return null===a?null:(a=_(a),t&&k(a,t,a.hasTime),a)}function v(e){return _({date:E(e.getFullYear(),4)+"-"+E(e.getMonth()+1,2)+"-"+E(e.getDate(),2),time:E(e.getHours()||0,2)+":"+E(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function je(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function y(e){return 100*e.hour+e.minute}function k(e,t,a=!1){let n=je(t),r=je(e),o=n===r;return e.hasTime&&a&&o&&(n=y(t),r=y(e),o=n===r),e.past=r<n,e.current=o,e.future=r>n,e}function w(e){return e.weekday=q(e),e}function g(e){return e.doy=f(e),e}function b(e,t,a,n,r){const o=je(e);if(void 0!==t){const d=je(Be(t));o<=d&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const u=je(Be(a));o>=u&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const l in n)if(n[l]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const i in r)if(Array.isArray(r[i])&&2===r[i].length){const s=Be(r[i][0]),c=Be(r[i][1]);if(P(e,s,c)){e.disabled=!0;break}}else{const v=je(Ie(r[i]+" 00:00"));if(v===o){e.disabled=!0;break}}return e}function _(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=V(e),e.date=W(e),e.weekday=q(e),e.doy=f(e),e.workweek=h(e),e}function f(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 h(e){let t;if(t=0===e.year?Date.UTC(new Date):z(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const o=(a-n)/s;return 1+Math.floor(o)}function q(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%u+1,o=a(e.year/100),d=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*o+d+a(d/4)+a(o/4))%7+7)%7}return t}function D(e){return 1===(e%4===0^e%100===0^e%400===0)}function A(e,t){return(D(e)?r:n)[t]}function S(e){return{...e}}function E(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function W(e){let t=`${E(e.year,4)}-${E(e.month,2)}`;return e.hasDay&&(t+=`-${E(e.day,2)}`),t}function V(e){return e.hasTime?`${E(e.hour,2)}:${E(e.minute,2)}`:""}function B(e){return W(e)+" "+(e.hasTime?V(e):"00:00")}function I(e){return++e.day,e.weekday=(e.weekday+1)%l,e.day>t&&e.day>A(e.year,e.month)&&(e.day=m,++e.month,e.month>u&&(e.month=o,++e.year)),e}function j(e){return e.day--,e.weekday=(e.weekday+6)%l,e.day<m&&(e.month--,e.month<o&&(e.year--,e.month=u),e.day=A(e.year,e.month)),e}function O(e,t=I,a=1,n=[0,1,2,3,4,5,6]){return M(e,t,a,n)}function M(e,t=I,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==I||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function R(e,t,a=I,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function H(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<l;++a){let t=1;for(let e=1;e<l;++e){const r=(a+e)%l;if(n[r])break;++t}e[a]=n[a]*t}return e}function N(e,t,a,n,r,o,d=[],u=[],l=42,i=0){const s=je(t),c=[];let v=S(e),y=0,f=y===s;if(s<je(e))return c;while((!f||c.length<i)&&c.length<l){if(y=je(v),f=f||y>s&&c.length>=i,f)break;if(0!==n[v.weekday]){const h=S(v);_(h),k(h,a),b(h,r,o,d,u),c.push(h),v=M(v,I)}else v=M(v,I)}return c}function L(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(U(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${B(t)}`),""}}}function z(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function U(e){return new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute))}function $(e){return isFinite(parseInt(e,10))}function P(e,t,a,n){const r=je(e)+(!0===n?y(e):0),o=je(t)+(!0===n?y(t):0),d=je(a)+(!0===n?y(a):0);return r>=o&&r<=d}function K(e,t){const n=S(e);let r;return Y(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=Q.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&ee(n,Q[r]),_(n),n}const Q=["minute","hour","day","month"];function Y(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function Z(e){if(e.minute>=d||e.minute<0){const t=Math.floor(e.minute/d);e.minute-=t*d,e.hour+=t,G(e)}return e}function G(e){if(e.hour>=i||e.hour<0){const t=Math.floor(e.hour/i);e.hour-=t*i,e.day+=t,J(e)}return e}function J(t){X(t);let a=A(t.year,t.month);if(t.day>a){++t.month,t.month>u&&X(t);let e=t.day-a;a=A(t.year,t.month);do{e>a&&(++t.month,t.month>u&&X(t),e-=a,a=A(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&X(t),a=A(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&X(t),a=A(t.year,t.month))}while(e>a);t.day=a-e}return t}function X(e){if(e.month>u){const t=Math.floor(e.month/u);e.month=e.month%u,e.year+=t}else e.month<o&&(e.month+=u,--e.year);return e}function ee(e,t){switch(t){case"minute":return Z(e);case"hour":return G(e);case"day":return J(e);case"month":return X(e)}}function Oe(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function Me(e,t){return 0===t?e:e.slice(0,t)}const te=e=>e.replace(/(-\w)/g,e=>e[1].toUpperCase());let ae,ne;function re(e,a){const t={};for(const n in e){const r=e[n],o=te("on-"+n);if(void 0===ae)return void console.warn("$listeners has not been set up");if(void 0!==ae.value[o]){const d="on"+r.event.charAt(0).toUpperCase()+r.event.slice(1),u=e=>{const t=e;(void 0===r.button||t.buttons>0&&t.button===r.button)&&(r.prevent&&t.preventDefault(),r.stop&&t.stopPropagation(),ne(n,a(t,n)));return r.result};d in t?Array.isArray(t[d])?t[d].push(u):t[d]=[t[d],u]:t[d]=u}}return t}function oe(e,t){return re(de(e),t)}function de(e){return{["click"+e]:{event:"click"},["contextmenu"+e]:{event:"contextmenu",prevent:!0,result:!1},["mousedown"+e]:{event:"mousedown"},["mousemove"+e]:{event:"mousemove"},["mouseup"+e]:{event:"mouseup"},["mouseenter"+e]:{event:"mouseenter"},["mouseleave"+e]:{event:"mouseleave"},["touchstart"+e]:{event:"touchstart"},["touchmove"+e]:{event:"touchmove"},["touchend"+e]:{event:"touchend"}}}function ue(e){return Object.keys(de(e))}function Re(e,t){return ne=e,ae=t,{getMouseEventHandlers:re,getDefaultMouseEventHandlers:oe,getMouseEventName:de,getRawMouseEvents:ue}}var He={name:"ResizeObserver",mounted(e,{value:t}){if(t){const a={};a.callback=t,a.size={width:0,height:0},a.observer=new ResizeObserver(e=>{const t=e[0].contentRect;t.width===a.size.width&&t.height===a.size.height||(a.size.width=t.width,a.size.height=t.height,a.callback(a.size))}),a.observer.observe(e),e.__onResizeObserver=a}},beforeUnmount(e){if(e.__onResizeObserver){const{observer:t}=e.__onResizeObserver;t.unobserve(e),delete e.__onResizeObserver}}};function Ne(t,a,{scrollArea:e,pane:n}){if(!a){const s="[error: renderCalendar] no renderFunc has been supplied to useCalendar";throw console.error(s),new Error(s)}const r=We.reactive({width:0,height:0}),o=We.ref(null);function d({width:e,height:t}){r.width=e,r.height=t}const u=We.computed(()=>{return!0!==t.noScroll&&e.value&&n.value&&r.height?e.value.offsetWidth-n.value.offsetWidth:0});function l(){}function i(){const e={ref:o,role:"complementary",lang:t.locale,class:{"q-calendar--dark":!0===t.dark,"q-calendar":!0,"q-calendar__bordered":!0===t.bordered}};return We.withDirectives(We.h("div",e,[a()]),[[He,d]])}return{rootRef:o,scrollWidth:u,__initCalendar:l,__renderCalendar:i}}function Le(r,{startDate:e,endDate:t,times:a}){const n=We.computed(()=>H(r.weekdays)),o=We.computed(()=>Ie(e.value)),d=We.computed(()=>{if("0000-00-00"===t.value)return f(o.value);return Ie(t.value)}),u=We.computed(()=>{const a={timeZone:"UTC",day:"numeric"};return L(r.locale,(e,t)=>a)}),l=We.computed(()=>{const a={timeZone:"UTC",weekday:"long"};const n={timeZone:"UTC",weekday:"short"};return L(r.locale,(e,t)=>t?n:a)}),i=We.computed(()=>{const t={timeZone:"UTC",dateStyle:"full"};return L(r.locale,e=>t)});function s(e,t){return e&&e.length>0&&e.includes(t.date)}function c(e,t){const a={firstDay:!1,betweenDays:!1,lastDay:!1};if(e&&2===e.length){const n=je(t),r=je(Be(e[0])),o=je(Be(e[1]));a.firstDay=r===n,a.lastDay=o===n,a.betweenDays=r<n&&o>n}return a}function v(e,t=!1,a=[],n=[],r=!1){const o=s(a,e),{firstDay:d,lastDay:u,betweenDays:l}=c(n,e);return{"q-past-day":!0!==d&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.past,"q-future-day":!0!==d&&!0!==l&&!0!==u&&!0!==o&&!0!==t&&e.future,"q-outside":t,"q-current-day":e.current,"q-selected":o,"q-range-first":!0===d,"q-range":!0===l,"q-range-last":!0===u,"q-range-hover":!0===r&&(!0===d||!0===u||!0===l),"q-disabled-day disabled":!0===e.disabled}}function y(e){return x(e,r.weekdays,a.today)}function f(e){return C(e,r.weekdays,a.today)}function h(e){}return{weekdaySkips:n,parsedStart:o,parsedEnd:d,dayFormatter:u,weekdayFormatter:l,ariaDateFormatter:i,arrayHasDate:s,checkDays:c,getRelativeClasses:v,startOfWeek:y,endOfWeek:f,dayStyleDefault:h}}String,Ve(),Array,String,String,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Number,String,Array,String,Boolean,String,String,Array,String,String,Array,Function,Function,Function,Function,Array,Array,Boolean,Boolean,Array;const le={modelValue:{type:String,default:Ve(),validator:e=>""===e||c(e)},modelTasks:{type:Array,default:[]},modelTitle:{type:Array,default:[]},modelFooter:{type:Array,default:[]},taskKey:{type:[String,Number],default:"id"},weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]},dateType:{type:String,default:"round",validator:e=>["round","rounded","square"].includes(e)},dateHeader:{type:String,default:"stacked",validator:e=>["stacked","inline","inverted"].includes(e)},weekdayAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},dateAlign:{type:String,default:"center",validator:e=>["left","center","right"].includes(e)},view:{type:String,validator:e=>["day","week","month"].includes(e)},viewCount:{type:Number,default:1,validator:e=>$(e)&&e>0},bordered:Boolean,dark:Boolean,noActiveDate:Boolean,disabledDays:Array,disabledBefore:String,disabledAfter:String,disabledWeekdays:{type:Array,default:()=>[]},noHeader:Boolean,cellWidth:[Number,String],minWeekdayLabel:{type:[Number,String],default:2},weekdayBreakpoints:{type:Array,default:()=>[75,35],validator:e=>2===e.length},locale:{type:String,default:"en-US"},animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"},weekdayClass:Function,dayClass:Function,footerDayClass:Function,dragEnterFunc:{type:Function},dragOverFunc:{type:Function},dragLeaveFunc:{type:Function},dropFunc:{type:Function},hoverable:Boolean,focusable:Boolean,focusType:{type:Array,default:["date"],validator:e=>{let t=!0;e.forEach(e=>{!0!==["day","date","weekday","interval","resource","task"].includes(e)&&(t=!1)});return t}},taskWidth:{type:Number,default:200,validator:e=>$(e)&&e>0}};function ze(t,e,{weekdaySkips:a,times:n}){const r=We.computed(()=>{{if("day"===t.view)return Ie(t.modelValue);if("week"===t.view)return x(Ie(t.modelValue),t.weekdays,n.today);if("month"===t.view)return F(Ie(t.modelValue),t.weekdays,n.today);throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`)}}),o=We.computed(()=>{{if("day"===t.view){if(1===t.viewCount)return r.value;let e=S(r.value);return e=K(e,{day:t.viewCount-1}),e}if("week"===t.view){if(1===t.viewCount)return C(Ie(t.modelValue),t.weekdays,n.today);{let e=S(r.value);return e=K(e,{day:(t.viewCount-1)*l}),C(e,t.weekdays,n.today)}}if("month"!==t.view)throw new Error(`QCalendarTask: unknown 'view' type (${t.view})`);if(1===t.viewCount)return T(Ie(t.modelValue),t.weekdays,n.today);{let e=S(r.value);return e=K(e,{month:t.viewCount}),T(e,t.weekdays,n.today)}}}),d=We.computed(()=>{return N(r.value,o.value,n.today,a.value,t.disabledBefore,t.disabledAfter,t.disabledWeekdays,t.disabledDays,Number.MAX_SAFE_INTEGER)});return{days:d,parsedStartDate:r,parsedEndDate:o}}const ie={now:{type:String,validator:e=>""===e||c(e),default:""}};function Ue(e){const t=We.reactive({now:Ie("0000-00-00 00:00"),today:Ie("0000-00-00")}),a=We.computed(()=>e.now?Ie(e.now):o());function n(){t.now.current=t.today.current=!0,t.now.past=t.today.past=!1,t.now.future=t.today.future=!1}function r(){const e=a.value||o();d(e,t.now),u(e,t.now),d(e,t.today)}function o(){return v(new Date)}function d(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)}function u(e,t){e.time!==t.time&&(t.hour=e.hour,t.minute=e.minute,t.time=e.time)}return We.watch(()=>a,e=>r()),{times:t,parsedNow:a,setCurrent:n,updateCurrent:r,getNow:o,updateDay:d,updateTime:u}}function $e(r,{parsedView:o,times:d,parsedValue:u}){const e=We.computed(()=>{const e=u.value;let t=r.maxDays;let a=e;let n=e;switch(o.value){case"month":a=F(e),n=T(e),t=A(a.year,a.month);break;case"week":case"week-agenda":case"week-scheduler":a=x(e,r.weekdays,d.today),n=C(a,r.weekdays,d.today),t=r.weekdays.length;break;case"day":case"scheduler":case"agenda":n=O(S(n),I,t>1?t-1:t,r.weekdays),_(n);break;case"month-interval":case"month-scheduler":case"month-agenda":a=F(e),n=T(e),_(n),t=A(a.year,a.month);break;case"resource":t=1,n=O(S(n),I,t,r.weekdays),_(n);break}return{start:a,end:n,maxDays:t}});return{renderValues:e}}const se=["moved"];function Pe(u,{parsedView:l,parsedValue:i,weekdaySkips:s,direction:c,maxDays:v,times:y,emittedValue:f,emit:h}){function e(a=1){if(0!==a){let e=S(i.value);const n=a>0,r=n?I:j,o=n?p:m;let t=n?a:-a;c.value=n?"next":"prev";const d=s.value.filter(e=>0!==e).length;while(--t>=0)switch(l.value){case"month":e.day=o,r(e),w(e);while(0===s.value[e.weekday])e=K(e,{day:!0===n?1:-1});break;case"week":case"week-agenda":case"week-scheduler":M(e,r,d,u.weekdays);break;case"day":case"scheduler":case"agenda":M(e,r,v.value,u.weekdays);break;case"month-interval":case"month-agenda":case"month-scheduler":e.day=o,r(e);break;case"resource":M(e,r,v.value,u.weekdays);break}w(e),_(e),g(e),k(e,y.now),f.value=e.date,h("moved",e)}else f.value=Ve()}return{move:e}}const ce=/^on[A-Z]/;function Ke(e=We.getCurrentInstance()){return{emitListeners:We.computed(()=>{const t={};void 0!==e.vnode&&null!==e.vnode&&null!==e.vnode.props&&Object.keys(e.vnode.props).forEach(e=>{!0===ce.test(e)&&(t[e]=!0)});return t})}}function Qe(){return[We.h("span",{ariaHidden:"true",class:"q-calendar__focus-helper"})]}function Ye(e,t,a){const n=!0===e.focusable&&!0===e.focusType.includes("date");return t.tabindex=!0===n?0:-1,We.h("button",t,[a,!0===n&&Qe()])}const ve=["change"];function Ze(a,{days:n,lastStart:r,lastEnd:o}){function e(){if(n.value&&n.value.length>0){const e=n.value[0].date,t=n.value[n.value.length-1].date;if(null===r.value||null===o.value||e!==r.value||t!==o.value)return r.value=e,o.value=t,a("change",{start:e,end:t,days:n.value}),!0}return!1}return{checkChange:e}}function Ge(){function e(t,{bubbles:a=!1,cancelable:n=!1}={}){try{return new CustomEvent(t,{bubbles:a,cancelable:n})}catch(e){const r=document.createEvent("Event");return r.initEvent(t,a,n),r}}function t(e,t){return[].concat(t).includes(e.keyCode)}return{createEvent:e,isKeyCode:t}}const{isKeyCode:ye}=Ge(),fe={useNavigation:Boolean};function Je(a,{rootRef:n,focusRef:r,focusValue:o,datesRef:d,parsedView:u,emittedValue:l,weekdaySkips:i,direction:s,times:c}){let e=!1;function t(){!0!==e&&document&&(e=!0,document.addEventListener("keyup",p),document.addEventListener("keydown",h))}function v(){document&&(document.removeEventListener("keyup",p),document.removeEventListener("keydown",h),e=!1)}function y(e){if(void 0===e)return!1;if(document){const t=document.activeElement;if(t!==document.body&&!0===n.value.contains(t))return!0}return!1}function f(){let e=0;const t=setInterval(()=>{d.value[r.value]?(d.value[r.value].focus(),50!==++e&&document.activeElement!==d.value[r.value]||clearInterval(t)):clearInterval(t)},250)}function h(e){y(e)&&ye(e,[33,34,35,36,37,38,39,40])&&(e.stopPropagation(),e.preventDefault())}function p(e){if(y(e)&&ye(e,[33,34,35,36,37,38,39,40]))switch(e.keyCode){case 33:b();break;case 34:_();break;case 35:D();break;case 36:q();break;case 37:w();break;case 38:m();break;case 39:g();break;case 40:k();break}}function m(e){let t=S(o.value);if("month"===u.value){if(t=K(t,{day:-7}),o.value.month!==t.month)return s.value="prev",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="prev",r.value=t.date}function k(e){let t=S(o.value);if("month"===u.value){if(t=K(t,{day:7}),o.value.month!==t.month)return s.value="next",void(l.value=t.date)}else"day"!==u.value&&"week"!==u.value&&"month-interval"!==u.value||(t=K(t,{minute:parseInt(a.intervalMinutes)}));s.value="next",r.value=t.date}function w(e){let t=S(o.value);s.value="prev";do{t=K(t,{day:-1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday>o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function g(e){let t=S(o.value);s.value="next";do{t=K(t,{day:1})}while(0===i.value[t.weekday]);if("month"===u.value||"month-interval"===u.value){if(o.value.month!==t.month)return void(l.value=t.date)}else if("week"===u.value){if(t.weekday<o.value.weekday)return void(l.value=t.date)}else if("day"===u.value)return void(l.value=t.date);r.value=t.date}function b(e){let t=S(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:-1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:-1}):"week"===u.value&&(t=K(t,{day:-7}));s.value="prev",r.value=t.date}function _(e){let t=S(o.value);if("month"===u.value||"month-interval"===u.value){t=K(t,{month:1});const a=t.day<=15?1:-1;while(0===i.value[t.weekday])t=K(t,{day:a})}else"day"===u.value?t=K(t,{day:1}):"week"===u.value&&(t=K(t,{day:7}));s.value="next",r.value=t.date}function q(e){let t=S(o.value);"month"===u.value||"month-interval"===u.value?t=F(t):"week"===u.value&&(t=x(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=K(t,{day:-1});r.value=t.date}function D(e){let t=S(o.value);"month"===u.value||"month-interval"===u.value?t=T(t):"week"===u.value&&(t=C(t,a.weekdays,c.today));while(0===i.value[t.weekday])t=K(t,{day:-1});r.value=t.date}return We.onBeforeUnmount(()=>{v()}),We.watch(()=>a.useNavigation,e=>{(!0===e?t:v)()}),!0===a.useNavigation&&t(),{startNavigation:t,endNavigation:v,tryFocus:f}}var he=We.defineComponent({name:"QCalendarTask",directives:[He],props:{...ie,...fe,...le},emits:["update:model-value","update:model-tasks","update:model-title","update:model-footer","task-expanded",...ve,...se,...ue("-date"),...ue("-day"),...ue("-head-day")],setup(c,{slots:v,emit:i,expose:e}){const t=We.ref(null),a=We.ref(null),o=We.ref("next"),d=We.ref(c.modelValue||Ve()),u=We.ref("0000-00-00"),n=We.ref(0),y=We.ref(c.modelValue),f=We.ref(null),r=We.ref(null),h=We.ref({}),l=We.reactive({width:0,height:0}),p=We.ref(!1),s=We.ref(null),m=We.ref(null),k=We.computed(()=>{return c.view}),w=We.getCurrentInstance();if(null===w)throw new Error("current instance is null");const{emitListeners:g}=Ke(w),{times:b,setCurrent:_,updateCurrent:q}=Ue(c);q(),_();const{weekdaySkips:D,parsedStart:x,dayFormatter:C,weekdayFormatter:F,ariaDateFormatter:T,dayStyleDefault:A,getRelativeClasses:S}=Le(c,{startDate:d,endDate:u,times:b}),E=We.computed(()=>{return Ie(c.modelValue,b.now)||x.value||b.today});r.value=E.value,f.value=E.value.date;const{renderValues:W}=$e(c,{parsedView:k,times:b,parsedValue:E}),{rootRef:V,__initCalendar:B,__renderCalendar:I}=Ne(c,Ee,{scrollArea:t,pane:a}),{days:j,parsedStartDate:O,parsedEndDate:M}=ze(c,i,{weekdaySkips:D,times:b}),{move:R}=Pe(c,{parsedView:k,parsedValue:E,weekdaySkips:D,direction:o,maxDays:n,times:b,emittedValue:y,emit:i}),{getDefaultMouseEventHandlers:H}=Re(i,g),{checkChange:N}=Ze(i,{days:j,lastStart:s,lastEnd:m}),{isKeyCode:L}=Ge(),{tryFocus:z}=Je(c,{rootRef:V,focusRef:f,focusValue:r,datesRef:h,days:j,parsedView:k,parsedValue:E,emittedValue:y,weekdaySkips:D,direction:o,times:b}),U=We.ref(!0),$=We.computed(()=>{if(void 0!==c.cellWidth)return parseInt(c.cellWidth,10);return 150}),P=We.computed(()=>{return!0===c.focusable&&c.focusType.includes("day")&&!0!==isMiniMode.value}),K=We.computed(()=>{return!0===c.focusable&&c.focusType.includes("date")&&!0!==P.value}),Q=We.computed(()=>{return!0===c.focusable&&c.focusType.includes("weekday")}),Y=We.computed(()=>{return parseInt(c.dayHeight,10)}),Z=We.computed(()=>{return parseInt(c.dayMinHeight,10)});function G(){y.value=Ve()}function J(e=1){R(e)}function X(e=1){R(-e)}function ee({width:e,height:t}){l.width=e,l.height=t}function te(e){return e.date===y.value}function ae(e,t,a){const n=v.day,r=c.dayStyle||A,o=!0!==c.noActiveDate&&E.value.date===e.date,d={timestamp:e,task:t,taskIndex:a,activeDate:o},u=Oe($.value),l={width:u,minWidth:u,maxWidth:u,...r({scope:d})},i="function"===typeof c.dayClass?c.dayClass({scope:d}):{};return We.h("div",{tabindex:!0===P.value?0:-1,class:{"q-calendar-task__task--day":!0,...i,...S(e),"q-active-date":!0===o,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===P.value},style:l,onFocus:e=>{P.value},...H("-day",e=>{return{scope:d,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"day",d)?dragOverResource.value=dragValue:dragOverResource.value="")}},[n&&n({scope:d}),Qe()])}function ne(t,a){return j.value.map(e=>ae(e,t,a))}function re(e,t){const a=v.days,n={timestamps:j.value,days:j.value,task:e,taskIndex:t,cellWidth:$.value};return We.h("div",{class:"q-calendar-task__task--days-row"},[ne(e,t),a&&a({scope:n})])}function oe(t,e,a=0,n=!0){const r=v.task,o={start:O.value,end:M.value,task:t,taskIndex:e,expanded:n},d=Oe(c.taskWidth),u={width:d,minWidth:d,maxWidth:d},l=!0===c.focusable&&c.focusType.includes("task");return We.h("div",{class:{"q-calendar-task__task--item":!0,"q-calendar__sticky":!0===U.value,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===l},style:u},[We.h("div",{style:{flexDirection:"column",justifyContent:"center",alignItems:"center",width:10+10*a+"px"}},[We.h("div",{class:{"q-calendar__parent":void 0!==t.children,"q-calendar__parent--expanded":void 0!==t.children&&!0===t.expanded,"q-calendar__parent--collapsed":void 0!==t.children&&!0!==t.expanded},onClick:e=>{e.stopPropagation();t.expanded=!t.expanded;i("task-expanded",{expanded:t.expanded,scope:o})}})]),r&&r({scope:o}),Qe()])}function de(e,t,a=0,n=!0){const r=void 0!==e.height?Oe(parseInt(e.height,10)):Y.value>0?Oe(Y.value):"auto",o=Z.value>0?Oe(Z.value):void 0,d={height:r};void 0!==o&&(d.minHeight=o);const u=We.h("div",{key:e[c.taskKey]+"-"+t,class:{"q-calendar-task__task":0===a,"q-calendar-task__task--section":0!==a},style:d},[oe(e,t,a,n),re(e,t)]);return void 0!==e.children?[u,We.h("div",{class:{"q-calendar__child":!0,"q-calendar__child--expanded":!0===n,"q-calendar__child--collapsed":!0!==n}},[ue(e.children,a+1,!1===n?n:e.expanded)])]:[u]}function ue(e=void 0,a=0,n=!0){return void 0===e&&(e=c.modelTasks),e.map((e,t)=>{return de(e,t,a,void 0!==e.children?e.expanded:n)})}function le(){return We.h("div",{class:{"q-calendar-task__task--container":!0,"q-calendar__sticky":!0===U.value}},[ue()])}function ie(e,t){const a=v["footer-task"],n={start:O.value,end:M.value,footer:e,index:t},r=Oe(c.taskWidth),o={width:r,minWidth:r,maxWidth:r};return We.h("div",{class:{"q-calendar-task__footer--task":!0,"q-calendar__sticky":!0===U.value},style:o},[a&&a({scope:n})])}function se(e,t,a){const n=v["footer-day"],r={timestamp:e,footer:t,index:a},o=Oe($.value),d={width:o,minWidth:o,maxWidth:o},u="function"===typeof c.footerDayClass?c.footerDayClass({scope:r}):{};return We.h("div",{class:{"q-calendar-task__footer--day":!0,...u,...S(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===P.value},style:d},[n&&n({scope:r})])}function ce(t,a){return We.h("div",{class:"q-calendar-task__footer--day-wrapper"},[j.value.map(e=>se(e,t,a))])}function ve(){const a=!0===c.focusable&&c.focusType.includes("task");return c.modelFooter.map((e,t)=>{return We.h("div",{class:{"q-calendar-task__footer--wrapper":!0,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===a}},{default:()=>[ie(e,t),ce(e,t)]})})}function ye(){return We.h("div",{class:{"q-calendar-task__footer":!0,"q-calendar__sticky":!0===U.value}},ve())}function fe(){return We.h("div",{class:{"q-calendar-task__container":!0}},[!0!==c.noHeader&&Te(),le(),ye()])}function he(){const e=v["head-tasks"],t={start:O.value,end:M.value},a=Oe(parseInt(c.taskWidth,10)),n={width:a,minWidth:a,maxWidth:a};return We.h("div",{class:{"q-calendar-task__head--tasks":!0,"q-calendar__sticky":!0===U.value},style:n},[e&&e({scope:t})])}function pe(e,t){const a=v["title-task"],n=Oe(parseInt(c.taskWidth,10)),r={width:n,minWidth:n,maxWidth:n},o={start:O.value,end:M.value,cellWidth:n,title:e,index:t};return We.h("div",{class:{"q-calendar-task__title--task":!0,"q-calendar__sticky":!0===U.value},style:r},[a&&a({scope:o})])}function me(e){const t=v["head-weekday-label"],a={timestamp:e},n={class:{"q-calendar-task__head--weekday":!0,["q-calendar__"+c.weekdayAlign]:!0,"q-calendar__ellipsis":!0}};return We.h("div",n,t&&t({scope:a})||ke(e,c.shortWeekdayLabel))}function ke(e,t){const a=F.value(e,t||c.weekdayBreakpoints[0]>0&&$.value<=c.weekdayBreakpoints[0]);return We.h("span",{class:"q-calendar__ellipsis"},c.weekdayBreakpoints[1]>0&&$.value<=c.weekdayBreakpoints[1]?Me(a,c.minWeekdayLabel):a)}function we(e){const t={class:{"q-calendar-task__head--date":!0,["q-calendar__"+c.dateAlign]:!0}};return We.h("div",t,ge(e))}function ge(a){const e=!0!==c.noActiveDate&&te(a),t=C.value(a,!1),n=v["head-day-label"],r=v["head-day-button"],o={dayLabel:t,timestamp:a,activeDate:e},d=a.date,u={key:d,tabindex:!0===K.value?0:-1,class:{"q-calendar-task__head--day__label":!0,"q-calendar__button":!0,"q-calendar__button--round":"round"===c.dateType,"q-calendar__button--rounded":"rounded"===c.dateType,"q-calendar__button--bordered":!0===a.current,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===K.value},disabled:a.disabled,onKeydown:e=>{!0!==a.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==a.disabled&&L(e,[13,32])&&(y.value=a.date,void 0!==g.value.onClickDate&&i("click-date",{scope:o}))},...H("-date",(e,t)=>{"click-date"!==t&&"contextmenu-date"!==t||(y.value=a.date,"click-date"===t&&e.preventDefault());return{scope:o,event:e}})};return!0!==c.noAria&&(u.ariaLabel=T.value(a)),r?r({scope:o}):Ye(c,u,n?n({scope:o}):t)}function be(e){return"stacked"===c.dateHeader?[!0!==c.noDefaultHeaderText&&me(e),!0!==c.noDefaultHeaderBtn&&we(e)]:"inline"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderText&&me(e),!0!==c.noDefaultHeaderBtn&&we(e)])):"inverted"===c.dateHeader?("left"===c.weekdayAlign&&"right"===c.dateAlign||"right"===c.weekdayAlign&&c.dateAlign,We.h("div",{class:"q-calendar__header--inline"},[!0!==c.noDefaultHeaderBtn&&we(e),!0!==c.noDefaultHeaderText&&me(e)])):void 0}function _e(e,t,a){const n=v["title-day"],r=Oe($.value),o={width:r,minWidth:r,maxWidth:r},d={timestamp:e,title:t,index:a,cellWidth:$.value},u="function"===typeof c.dayClass?c.dayClass({scope:d}):{},l=!0===c.focusable&&c.focusType.includes("day");return We.h("div",{class:{"q-calendar-task__title--day":!0,...u,...S(e),"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===l},style:o},[n&&n({scope:d}),Qe()])}function qe(t){const e=v["head-day"],a=v["head-date"],n=!0!==c.noActiveDate&&te(t),r={timestamp:t,activeDate:n,droppable:p.value=t.date},o=c.weekdayStyle||A,d="function"===typeof c.weekdayClass?c.weekdayClass({scope:r}):{},u=Oe($.value),l={width:u,minWidth:u,maxWidth:u,...o({scope:r})},i=t.date,s={key:i,ref:e=>{h.value[i]=e},tabindex:!0===Q.value?0:-1,class:{"q-calendar-task__head--day":!0,...d,...S(t),"q-active-date":n,"q-calendar__hoverable":!0===c.hoverable,"q-calendar__focusable":!0===Q.value},style:l,onFocus:e=>{!0===Q.value&&(f.value=i)},onKeydown:e=>{!0!==t.disabled&&L(e,[13,32])&&(e.stopPropagation(),e.preventDefault())},onKeyup:e=>{!0!==t.disabled&&L(e,[13,32])&&(y.value=t.date)},...H("-head-day",e=>{return{scope:r,event:e}}),onDragenter:e=>{void 0!==c.dragEnterFunc&&"function"===typeof c.dragEnterFunc&&(!0===c.dragEnterFunc(e,"head-day",r)?p.value=t.date:p.value="")},onDragover:e=>{void 0!==c.dragOverFunc&&"function"===typeof c.dragOverFunc&&(!0===c.dragOverFunc(e,"head-day",r)?p.value=t.date:p.value="")},onDragleave:e=>{void 0!==c.dragLeaveFunc&&"function"===typeof c.dragLeaveFunc&&(!0===c.dragLeaveFunc(e,"head-day",r)?p.value=t.date:p.value="")},onDrop:e=>{void 0!==c.dropFunc&&"function"===typeof c.dropFunc&&(!0===c.dropFunc(e,"head-day",r)?p.value=t.date:p.value="")}};return We.h("div",s,[void 0!==e&&e({scope:r}),void 0===e&&be(t),void 0===e&&a&&a({scope:r}),Qe()])}function De(){return j.value.map(e=>qe(e))}function xe(t,a){return j.value.map(e=>_e(e,t,a))}function Ce(){return We.h("div",{class:{"q-calendar-task__head--days":!0}},[...De()])}function Fe(e,t){return We.h("div",{class:{"q-calendar-task__title--days":!0}},[...xe(e,t)])}function Te(){return We.h("div",{roll:"presentation",class:{"q-calendar-task__head":!0,"q-calendar__sticky":!0===U.value},style:{}},[We.h("div",{style:{position:"relative",display:"flex"}},[he(),Ce()]),c.modelTitle.map((e,t)=>We.h("div",{class:"q-calendar-task__title",style:{position:"relative",display:"flex"}},[pe(e,t),Fe(e,t)]))])}function Ae(){return We.h("div",{class:"q-calendar-task__body"},[Se()])}function Se(){return We.h("div",{ref:t,class:{"q-calendar-task__scroll-area":!0,"q-calendar__scroll":!0}},[fe()])}function Ee(){const{start:e,end:t}=W.value;d.value=e.date,u.value=t.date;const a=l.width>0,n=We.withDirectives(We.h("div",{key:d.value,class:"q-calendar-task"},[!0===a&&Ae()]),[[He,ee]]);if(!0!==c.animated)return n;{const r="q-calendar--"+("prev"===o.value?c.transitionPrev:c.transitionNext);return We.h(We.Transition,{name:r,appear:!0},()=>n)}}return We.watch([j],N,{deep:!0,immediate:!0}),We.watch(()=>c.modelValue,(e,t)=>{if(y.value!==e){if(!0===c.animated){const a=je(Be(e)),n=je(Be(t));o.value=a>=n?"next":"prev"}y.value=e}f.value=e}),We.watch(y,(e,t)=>{if(y.value!==c.modelValue){if(!0===c.animated){const a=je(Be(e)),n=je(Be(t));o.value=a>=n?"next":"prev"}i("update:model-value",e)}}),We.watch(f,e=>{e&&(r.value=Ie(e))}),We.watch(r,e=>{h.value[f.value]?h.value[f.value].focus():z()}),We.onBeforeUpdate(()=>{h.value={}}),We.onMounted(()=>{B()}),e({prev:X,next:J,move:R,moveToToday:G,updateCurrent:q}),()=>I()}}),pe="@quasar/quasar-ui-qcalendar",me="4.0.0-beta.3",ke="Jeff Galbraith <jeff@quasar.dev>",we="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",ge="MIT",be="dist/index.esm.js",_e="dist/index.common.js",qe="dist/types/index.d.ts",De={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},xe={type:"github",url:"https://github.com/sponsors/hawkeye64"},Ce={access:"public"},Fe={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},Te="https://github.com/quasarframework/quasar-ui-qcalendar/issues",Ae="https://github.com/quasarframework/quasar-ui-qcalendar",Se=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],Ee={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},Xe={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},et=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],et={name:pe,version:me,author:ke,description:we,license:ge,module:be,main:_e,typings:qe,scripts:De,funding:xe,publishConfig:Ce,repository:Fe,bugs:Te,homepage:Ae,keywords:Se,vetur:Ee,devDependencies:Xe,browserslist:et};const{version:tt}=et;e.QCalendarTask=he,e.version=tt,Object.defineProperty(e,"__esModule",{value:!0})});
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>

@@ -10,3 +10,3 @@ * Released under the MIT License.

var name = "@quasar/quasar-ui-qcalendar";
var version$1 = "4.0.0-beta.2";
var version$1 = "4.0.0-beta.3";
var author = "Jeff Galbraith <jeff@quasar.dev>";

@@ -75,17 +75,17 @@ var description = "QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps";

autoprefixer: "^10.2.6",
"babel-jest": "^27.0.5",
"babel-jest": "^27.0.6",
chalk: "^4.1.1",
cssnano: "^5.0.6",
dotenv: "^10.0.0",
eslint: "^7.29.0",
eslint: "^7.30.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^35.4.0",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-quasar": "^1.0.0",
"eslint-plugin-vue": "^7.11.1",
"eslint-plugin-vue": "^7.13.0",
"eslint-webpack-plugin": "^2.5.4",
"fs-extra": "^10.0.0",
jest: "^27.0.5",
jest: "^27.0.6",
"jest-serializer-vue": "^2.0.2",

@@ -95,11 +95,9 @@ "jest-transform-stub": "^2.0.0",

postcss: "^8.3.5",
promise: "^8.1.0",
quasar: "^2.0.0",
quasar: "^2.0.2",
"quasar-json-api": "2.0.0-alpha.3",
rimraf: "^3.0.2",
rollup: "^2.52.2",
"rollup-plugin-vue": "=6.0.0",
rtlcss: "^3.2.1",
sass: "^1.35.1",
"uglify-js": "^3.13.9",
rollup: "^2.52.8",
rtlcss: "^3.3.0",
sass: "^1.35.2",
"uglify-js": "^3.13.10",
"vue-jest": "^5.0.0-alpha.8",

@@ -106,0 +104,0 @@ zlib: "^1.0.5"

/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
"use strict";var name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,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_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,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 today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a){const n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,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,n,r){const i=getDayIdentifier(e);if(void 0!==t){const o=getDayIdentifier(parsed(t));i<=o&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const m=parsed(r[u][0]),l=parsed(r[u][1]);if(isBetweenDates(e,m,l)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const i=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],s=[],d=42,u=0){const m=getDayIdentifier(t),l=[];let y=copyTimestamp(e),p=0,c=p===m;if(m<getDayIdentifier(e))return l;while((!c||l.length<u)&&l.length<d){if(p=getDayIdentifier(y),c=c||p>m&&l.length>=u,c)break;if(0!==n[y.weekday]){const f=copyTimestamp(y);updateFormatted(f),updateRelative(f,a),updateDisabled(f,r,i,o,s),l.push(f),y=relativeDays(y,nextDay)}else y=relativeDays(y,nextDay)}return l}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const s=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,s,i))}return o}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),s=getDayIdentifier(n);return r>=o&&r<=s||i>=o&&i<=s||o>=r&&i>=s}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}const{version}=pkg;var Plugin={version:version,PARSE_REGEX:PARSE_REGEX,PARSE_DATE:PARSE_DATE,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_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,convertToUnit:convertToUnit,indexOf:indexOf};module.exports=Plugin;
"use strict";var name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module$1="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module$1,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,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_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,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 today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a){const n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,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,n,r){const i=getDayIdentifier(e);if(void 0!==t){const o=getDayIdentifier(parsed(t));i<=o&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const m=parsed(r[u][0]),l=parsed(r[u][1]);if(isBetweenDates(e,m,l)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const i=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],s=[],d=42,u=0){const m=getDayIdentifier(t),l=[];let y=copyTimestamp(e),p=0,c=p===m;if(m<getDayIdentifier(e))return l;while((!c||l.length<u)&&l.length<d){if(p=getDayIdentifier(y),c=c||p>m&&l.length>=u,c)break;if(0!==n[y.weekday]){const f=copyTimestamp(y);updateFormatted(f),updateRelative(f,a),updateDisabled(f,r,i,o,s),l.push(f),y=relativeDays(y,nextDay)}else y=relativeDays(y,nextDay)}return l}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const s=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,s,i))}return o}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),s=getDayIdentifier(n);return r>=o&&r<=s||i>=o&&i<=s||o>=r&&i>=s}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}const{version}=pkg;var Plugin={version:version,PARSE_REGEX:PARSE_REGEX,PARSE_DATE:PARSE_DATE,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_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,convertToUnit:convertToUnit,indexOf:indexOf};module.exports=Plugin;
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>

@@ -8,3 +8,3 @@ * Released under the MIT License.

var name = "@quasar/quasar-ui-qcalendar";
var version$1 = "4.0.0-beta.2";
var version$1 = "4.0.0-beta.3";
var author = "Jeff Galbraith <jeff@quasar.dev>";

@@ -73,17 +73,17 @@ var description = "QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps";

autoprefixer: "^10.2.6",
"babel-jest": "^27.0.5",
"babel-jest": "^27.0.6",
chalk: "^4.1.1",
cssnano: "^5.0.6",
dotenv: "^10.0.0",
eslint: "^7.29.0",
eslint: "^7.30.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^35.4.0",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-quasar": "^1.0.0",
"eslint-plugin-vue": "^7.11.1",
"eslint-plugin-vue": "^7.13.0",
"eslint-webpack-plugin": "^2.5.4",
"fs-extra": "^10.0.0",
jest: "^27.0.5",
jest: "^27.0.6",
"jest-serializer-vue": "^2.0.2",

@@ -93,11 +93,9 @@ "jest-transform-stub": "^2.0.0",

postcss: "^8.3.5",
promise: "^8.1.0",
quasar: "^2.0.0",
quasar: "^2.0.2",
"quasar-json-api": "2.0.0-alpha.3",
rimraf: "^3.0.2",
rollup: "^2.52.2",
"rollup-plugin-vue": "=6.0.0",
rtlcss: "^3.2.1",
sass: "^1.35.1",
"uglify-js": "^3.13.9",
rollup: "^2.52.8",
rtlcss: "^3.3.0",
sass: "^1.35.2",
"uglify-js": "^3.13.10",
"vue-jest": "^5.0.0-alpha.8",

@@ -104,0 +102,0 @@ zlib: "^1.0.5"

/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
var name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.2",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,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_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,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 today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a){const n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,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,n,r){const i=getDayIdentifier(e);if(void 0!==t){const o=getDayIdentifier(parsed(t));i<=o&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const m=parsed(r[u][0]),p=parsed(r[u][1]);if(isBetweenDates(e,m,p)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const i=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],s=[],d=42,u=0){const m=getDayIdentifier(t),p=[];let y=copyTimestamp(e),l=0,c=l===m;if(m<getDayIdentifier(e))return p;while((!c||p.length<u)&&p.length<d){if(l=getDayIdentifier(y),c=c||l>m&&p.length>=u,c)break;if(0!==n[y.weekday]){const D=copyTimestamp(y);updateFormatted(D),updateRelative(D,a),updateDisabled(D,r,i,o,s),p.push(D),y=relativeDays(y,nextDay)}else y=relativeDays(y,nextDay)}return p}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const s=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,s,i))}return o}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),s=getDayIdentifier(n);return r>=o&&r<=s||i>=o&&i<=s||o>=r&&i>=s}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}const{version}=pkg;var Plugin={version:version,PARSE_REGEX:PARSE_REGEX,PARSE_DATE:PARSE_DATE,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_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,convertToUnit:convertToUnit,indexOf:indexOf};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,MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_REGEX,PARSE_TIME,TimeObject,Timestamp,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdaySkips,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,makeDate,makeDateTime,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween};
var name="@quasar/quasar-ui-qcalendar",version$1="4.0.0-beta.3",author="Jeff Galbraith <jeff@quasar.dev>",description="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",license="MIT",module="dist/index.esm.js",main="dist/index.common.js",typings="dist/types/index.d.ts",scripts={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},funding={type:"github",url:"https://github.com/sponsors/hawkeye64"},publishConfig={access:"public"},repository={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},bugs="https://github.com/quasarframework/quasar-ui-qcalendar/issues",homepage="https://github.com/quasarframework/quasar-ui-qcalendar",keywords=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],vetur={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},devDependencies={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},browserslist=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],pkg={name:name,version:version$1,author:author,description:description,license:license,module:module,main:main,typings:typings,scripts:scripts,funding:funding,publishConfig:publishConfig,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords,vetur:vetur,devDependencies:devDependencies,browserslist:browserslist};const PARSE_REGEX=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,PARSE_DATE=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,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_MINUTE=6e4,MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_DAY=864e5,MILLISECONDS_IN_WEEK=6048e5,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 today(){const e=new Date,t=""+(e.getMonth()+1),a=""+e.getDate(),n=e.getFullYear();return[n,padNumber(t,2),padNumber(a,2)].join("-")}function getStartOfWeek(e,t,a){let n=copyTimestamp(e);if(1===n.day||0===n.weekday)while(!t.includes(n.weekday))n=nextDay(n);return n=findWeekday(n,t[0],prevDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getEndOfWeek(e,t,a){let n=copyTimestamp(e);const r=daysInMonth(n.year,n.month);if(r===n.day||6===n.weekday)while(!t.includes(n.weekday))n=prevDay(n);return n=findWeekday(n,t[t.length-1],nextDay),n=updateFormatted(n),a&&(n=updateRelative(n,a,n.hasTime)),n}function getStartOfMonth(e){const t=copyTimestamp(e);return t.day=DAY_MIN,updateFormatted(t),t}function getEndOfMonth(e){const t=copyTimestamp(e);return t.day=daysInMonth(t.year,t.month),updateFormatted(t),t}function parseTime(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const a=PARSE_TIME.exec(e);return a?60*parseInt(a[1],10)+parseInt(a[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function validateTimestamp(e){return!!PARSE_REGEX.exec(e)}function compareTimestamps(e,t){return JSON.stringify(e)===JSON.stringify(t)}function compareDate(e,t){return getDate(e)===getDate(t)}function compareTime(e,t){return getTime(e)===getTime(t)}function compareDateTime(e,t){return getDateTime(e)===getDateTime(t)}function parsed(e){const t=PARSE_REGEX.exec(e);return t?{date:e,time:padNumber(parseInt(t[6],10)||0,2)+":"+padNumber(parseInt(t[8],10)||0,2),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){let a=parsed(e);return null===a?null:(a=updateFormatted(a),t&&updateRelative(a,t,a.hasTime),a)}function parseDate(e){return updateFormatted({date:padNumber(e.getFullYear(),4)+"-"+padNumber(e.getMonth()+1,2)+"-"+padNumber(e.getDate(),2),time:padNumber(e.getHours()||0,2)+":"+padNumber(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,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 getDayTimeIdentifier(e){return getDayIdentifier(e)+getTimeIdentifier(e)}function diffTimestamp(e,t,a){const n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===a&&r<n?0:r-n}function updateRelative(e,t,a=!1){let n=getDayIdentifier(t),r=getDayIdentifier(e),i=n===r;return e.hasTime&&a&&i&&(n=getTimeIdentifier(t),r=getTimeIdentifier(e),i=n===r),e.past=r<n,e.current=i,e.future=r>n,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,n,r){const i=getDayIdentifier(e);if(void 0!==t){const o=getDayIdentifier(parsed(t));i<=o&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==a){const s=getDayIdentifier(parsed(a));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(n)&&n.length>0)for(const d in n)if(n[d]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(Array.isArray(r[u])&&2===r[u].length){const m=parsed(r[u][0]),p=parsed(r[u][1]);if(isBetweenDates(e,m,p)){e.disabled=!0;break}}else{const y=getDayIdentifier(parseTimestamp(r[u]+" 00:00"));if(y===i){e.disabled=!0;break}}return e}function updateFormatted(e){return e.hasTime=!(0===e.hour&&0===e.minute),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){let t;if(t=0===e.year?Date.UTC(new Date):makeDate(e),isNaN(t))return 0;const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=new Date(a.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=a.getTimezoneOffset()-n.getTimezoneOffset();a.setHours(a.getHours()-r);const i=(a-n)/MILLISECONDS_IN_WEEK;return 1+Math.floor(i)}function getWeekday(e){let t=e.weekday;if(e.hasDay){const a=Math.floor,n=e.day,r=(e.month+9)%MONTH_MAX+1,i=a(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((n+a(2.6*r-.2)-2*i+o+a(o/4)+a(i/4))%7+7)%7}return t}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:DAYS_IN_MONTH)[t]}function copyTimestamp(e){return{...e}}function padNumber(e,t){let a=String(e);while(a.length<t)a="0"+a;return a}function getDate(e){let 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):"00:00")}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=nextDay,a=1,n=[0,1,2,3,4,5,6]){return relativeDays(e,t,a,n)}function relativeDays(e,t=nextDay,a=1,n=[0,1,2,3,4,5,6]){n.includes(e.weekday)||0!==e.weekday||t!==nextDay||++a;while(--a>=0)e=t(e),n.length<7&&!n.includes(e.weekday)&&++a;return e}function findWeekday(e,t,a=nextDay,n=6){while(e.weekday!==t&&--n>=0)e=a(e);return e}function getWeekdaySkips(t){const e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)n[t[e]]=1;for(let a=0;a<DAYS_IN_WEEK;++a){let t=1;for(let e=1;e<DAYS_IN_WEEK;++e){const r=(a+e)%DAYS_IN_WEEK;if(n[r])break;++t}e[a]=n[a]*t}return e}function createDayList(e,t,a,n,r,i,o=[],s=[],d=42,u=0){const m=getDayIdentifier(t),p=[];let y=copyTimestamp(e),l=0,c=l===m;if(m<getDayIdentifier(e))return p;while((!c||p.length<u)&&p.length<d){if(l=getDayIdentifier(y),c=c||l>m&&p.length>=u,c)break;if(0!==n[y.weekday]){const D=copyTimestamp(y);updateFormatted(D),updateRelative(D,a),updateDisabled(D,r,i,o,s),p.push(D),y=relativeDays(y,nextDay)}else y=relativeDays(y,nextDay)}return p}function createIntervalList(t,a,n,r,i){const o=[];for(let e=0;e<r;++e){const s=(a+e)*n,d=copyTimestamp(t);o.push(updateMinutes(d,s,i))}return o}function createNativeLocaleFormatter(n,r){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const a=new Intl.DateTimeFormat(n||void 0,r(t,e));return a.format(makeDateTime(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${getDateTime(t)}`),""}}}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,n){const r=getDayIdentifier(e)+(!0===n?getTimeIdentifier(e):0),i=getDayIdentifier(t)+(!0===n?getTimeIdentifier(t):0),o=getDayIdentifier(a)+(!0===n?getTimeIdentifier(a):0);return r>=i&&r<=o}function isOverlappingDates(e,t,a,n){const r=getDayIdentifier(e),i=getDayIdentifier(t),o=getDayIdentifier(a),s=getDayIdentifier(n);return r>=o&&r<=s||i>=o&&i<=s||o>=r&&i>=s}function addToDate(e,t){const n=copyTimestamp(e);let r;return __forEachObject(t,(e,t)=>{if(void 0!==n[t]){n[t]+=parseInt(e,10);const a=NORMALIZE_TYPES.indexOf(t);-1!==a&&(r=void 0===r?a:Math.min(a,r))}}),void 0!==r&&__normalize(n,NORMALIZE_TYPES[r]),updateFormatted(n),n}const NORMALIZE_TYPES=["minute","hour","day","month"];function __forEachObject(t,a){Object.keys(t).forEach(e=>a(t[e],e))}function __normalizeMinute(e){if(e.minute>=MINUTES_IN_HOUR||e.minute<0){const 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){const t=Math.floor(e.hour/HOURS_IN_DAY);e.hour-=t*HOURS_IN_DAY,e.day+=t,__normalizeDay(e)}return e}function __normalizeDay(t){__normalizeMonth(t);let a=daysInMonth(t.year,t.month);if(t.day>a){++t.month,t.month>MONTH_MAX&&__normalizeMonth(t);let e=t.day-a;a=daysInMonth(t.year,t.month);do{e>a&&(++t.month,t.month>MONTH_MAX&&__normalizeMonth(t),e-=a,a=daysInMonth(t.year,t.month))}while(e>a);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month);do{e>a&&(e-=a,--t.month,t.month<=0&&__normalizeMonth(t),a=daysInMonth(t.year,t.month))}while(e>a);t.day=a-e}return t}function __normalizeMonth(e){if(e.month>MONTH_MAX){const 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){const a=diffTimestamp(e,t,!0);return Math.floor(a/MILLISECONDS_IN_DAY)}function weeksBetween(e,t){let a=copyTimestamp(e),n=copyTimestamp(t);return a=findWeekday(a,0),n=findWeekday(n,6),Math.ceil(daysBetween(a,n)/DAYS_IN_WEEK)}function convertToUnit(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function indexOf(t,a){for(let e=0;e<t.length;e++)if(!0===a(t[e],e))return e;return-1}const{version}=pkg;var Plugin={version:version,PARSE_REGEX:PARSE_REGEX,PARSE_DATE:PARSE_DATE,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_MINUTE:MILLISECONDS_IN_MINUTE,MILLISECONDS_IN_HOUR:MILLISECONDS_IN_HOUR,MILLISECONDS_IN_DAY:MILLISECONDS_IN_DAY,MILLISECONDS_IN_WEEK:MILLISECONDS_IN_WEEK,Timestamp:Timestamp,TimeObject:TimeObject,today:today,getStartOfWeek:getStartOfWeek,getEndOfWeek:getEndOfWeek,getStartOfMonth:getStartOfMonth,getEndOfMonth:getEndOfMonth,parseTime:parseTime,validateTimestamp:validateTimestamp,parsed:parsed,parseTimestamp:parseTimestamp,parseDate:parseDate,getDayIdentifier:getDayIdentifier,getTimeIdentifier:getTimeIdentifier,getDayTimeIdentifier:getDayTimeIdentifier,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,compareTimestamps:compareTimestamps,compareDate:compareDate,compareTime:compareTime,compareDateTime:compareDateTime,convertToUnit:convertToUnit,indexOf:indexOf};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,MILLISECONDS_IN_WEEK,MINUTES_IN_HOUR,MONTH_MAX,MONTH_MIN,PARSE_DATE,PARSE_REGEX,PARSE_TIME,TimeObject,Timestamp,addToDate,compareDate,compareDateTime,compareTime,compareTimestamps,convertToUnit,copyTimestamp,createDayList,createIntervalList,createNativeLocaleFormatter,daysBetween,daysInMonth,diffTimestamp,findWeekday,getDate,getDateTime,getDayIdentifier,getDayOfYear,getDayTimeIdentifier,getEndOfMonth,getEndOfWeek,getStartOfMonth,getStartOfWeek,getTime,getTimeIdentifier,getWeekday,getWeekdaySkips,getWorkWeek,indexOf,isBetweenDates,isLeapYear,isOverlappingDates,makeDate,makeDateTime,moveRelativeDays,nextDay,padNumber,parseDate,parseTime,parseTimestamp,parsed,prevDay,relativeDays,today,updateDayOfYear,updateDisabled,updateFormatted,updateMinutes,updateRelative,updateWeekday,updateWorkWeek,validateNumber,validateTimestamp,version,weeksBetween};
/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>

@@ -14,3 +14,3 @@ * Released under the MIT License.

var name = "@quasar/quasar-ui-qcalendar";
var version$1 = "4.0.0-beta.2";
var version$1 = "4.0.0-beta.3";
var author = "Jeff Galbraith <jeff@quasar.dev>";

@@ -79,17 +79,17 @@ var description = "QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps";

autoprefixer: "^10.2.6",
"babel-jest": "^27.0.5",
"babel-jest": "^27.0.6",
chalk: "^4.1.1",
cssnano: "^5.0.6",
dotenv: "^10.0.0",
eslint: "^7.29.0",
eslint: "^7.30.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^35.4.0",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-quasar": "^1.0.0",
"eslint-plugin-vue": "^7.11.1",
"eslint-plugin-vue": "^7.13.0",
"eslint-webpack-plugin": "^2.5.4",
"fs-extra": "^10.0.0",
jest: "^27.0.5",
jest: "^27.0.6",
"jest-serializer-vue": "^2.0.2",

@@ -99,11 +99,9 @@ "jest-transform-stub": "^2.0.0",

postcss: "^8.3.5",
promise: "^8.1.0",
quasar: "^2.0.0",
quasar: "^2.0.2",
"quasar-json-api": "2.0.0-alpha.3",
rimraf: "^3.0.2",
rollup: "^2.52.2",
"rollup-plugin-vue": "=6.0.0",
rtlcss: "^3.2.1",
sass: "^1.35.1",
"uglify-js": "^3.13.9",
rollup: "^2.52.8",
rtlcss: "^3.3.0",
sass: "^1.35.2",
"uglify-js": "^3.13.10",
"vue-jest": "^5.0.0-alpha.8",

@@ -110,0 +108,0 @@ zlib: "^1.0.5"

/*!
* @quasar/quasar-ui-qcalendar v4.0.0-beta.2
* @quasar/quasar-ui-qcalendar v4.0.0-beta.3
* (c) 2021 Jeff Galbraith <jeff@quasar.dev>
* Released under the MIT License.
*/
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports):"function"===typeof define&&define.amd?define(["exports"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.Timestamp={}))})(this,function(e){"use strict";var t="@quasar/quasar-ui-qcalendar",n="4.0.0-beta.2",r="Jeff Galbraith <jeff@quasar.dev>",a="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",i="MIT",o="dist/index.esm.js",s="dist/index.common.js",u="dist/types/index.d.ts",d={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},l={type:"github",url:"https://github.com/sponsors/hawkeye64"},c={access:"public"},f={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},m="https://github.com/quasarframework/quasar-ui-qcalendar/issues",y="https://github.com/quasarframework/quasar-ui-qcalendar",h=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],p={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},g={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.5",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.29.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.11.1","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.5","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",promise:"^8.1.0",quasar:"^2.0.0","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.2","rollup-plugin-vue":"=6.0.0",rtlcss:"^3.2.1",sass:"^1.35.1","uglify-js":"^3.13.9","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},b=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],b={name:t,version:n,author:r,description:a,license:i,module:o,main:s,typings:u,scripts:d,funding:l,publishConfig:c,repository:f,bugs:m,homepage:y,keywords:h,vetur:p,devDependencies:g,browserslist:b};const D=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,k=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,v=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,w=[0,31,28,31,30,31,30,31,31,30,31,30,31],T=[0,31,29,31,30,31,30,31,31,30,31,30,31],I=28,M=31,N=12,j=1,_=1,O=7,S=60,A=24,x=0,E=6e4,q=36e5,C=864e5,Y=6048e5,H={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 U(){const e=new Date,t=""+(e.getMonth()+1),n=""+e.getDate(),r=e.getFullYear();return[r,pe(t,2),pe(n,2)].join("-")}function L(e,t,n){let r=he(e);if(1===r.day||0===r.weekday)while(!t.includes(r.weekday))r=ke(r);return r=Ie(r,t[0],ve),r=de(r),n&&(r=re(r,n,r.hasTime)),r}function W(e,t,n){let r=he(e);const a=ye(r.year,r.month);if(a===r.day||6===r.weekday)while(!t.includes(r.weekday))r=ve(r);return r=Ie(r,t[t.length-1],ke),r=de(r),n&&(r=re(r,n,r.hasTime)),r}function R(e){const t=he(e);return t.day=_,de(t),t}function $(e){const t=he(e);return t.day=ye(t.year,t.month),de(t),t}function P(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=v.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function z(e){return!!D.exec(e)}function B(e,t){return JSON.stringify(e)===JSON.stringify(t)}function J(e,t){return ge(e)===ge(t)}function X(e,t){return be(e)===be(t)}function G(e,t){return De(e)===De(t)}function K(e){const t=D.exec(e);return t?{date:e,time:pe(parseInt(t[6],10)||0,2)+":"+pe(parseInt(t[8],10)||0,2),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 Q(e,t){let n=K(e);return null===n?null:(n=de(n),t&&re(n,t,n.hasTime),n)}function V(e){return de({date:pe(e.getFullYear(),4)+"-"+pe(e.getMonth()+1,2)+"-"+pe(e.getDate(),2),time:pe(e.getHours()||0,2)+":"+pe(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Z(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function ee(e){return 100*e.hour+e.minute}function te(e){return Z(e)+ee(e)}function ne(e,t,n){const r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),a=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===n&&a<r?0:a-r}function re(e,t,n=!1){let r=Z(t),a=Z(e),i=r===a;return e.hasTime&&n&&i&&(r=ee(t),a=ee(e),i=r===a),e.past=a<r,e.current=i,e.future=a>r,e}function ae(e,t,n){return e.hasTime=!0,e.hour=Math.floor(t/S),e.minute=t%S,e.time=be(e),n&&re(e,n,!0),e}function ie(e){return e.weekday=fe(e),e}function oe(e){return e.doy=le(e),e}function se(e){return e.workweek=ce(e),e}function ue(e,t,n,r,a){const i=Z(e);if(void 0!==t){const o=Z(K(t));i<=o&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==n){const s=Z(K(n));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(r[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(const d in a)if(Array.isArray(a[d])&&2===a[d].length){const l=K(a[d][0]),c=K(a[d][1]);if(xe(e,l,c)){e.disabled=!0;break}}else{const f=Z(Q(a[d]+" 00:00"));if(f===i){e.disabled=!0;break}}return e}function de(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=be(e),e.date=ge(e),e.weekday=fe(e),e.doy=le(e),e.workweek=ce(e),e}function le(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 ce(e){let t;if(t=0===e.year?Date.UTC(new Date):Oe(e),isNaN(t))return 0;const n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);const a=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-a);const i=(n-r)/Y;return 1+Math.floor(i)}function fe(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,r=e.day,a=(e.month+9)%N+1,i=n(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((r+n(2.6*a-.2)-2*i+o+n(o/4)+n(i/4))%7+7)%7}return t}function me(e){return 1===(e%4===0^e%100===0^e%400===0)}function ye(e,t){return(me(e)?T:w)[t]}function he(e){return{...e}}function pe(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function ge(e){let t=`${pe(e.year,4)}-${pe(e.month,2)}`;return e.hasDay&&(t+=`-${pe(e.day,2)}`),t}function be(e){return e.hasTime?`${pe(e.hour,2)}:${pe(e.minute,2)}`:""}function De(e){return ge(e)+" "+(e.hasTime?be(e):"00:00")}function ke(e){return++e.day,e.weekday=(e.weekday+1)%O,e.day>I&&e.day>ye(e.year,e.month)&&(e.day=_,++e.month,e.month>N&&(e.month=j,++e.year)),e}function ve(e){return e.day--,e.weekday=(e.weekday+6)%O,e.day<_&&(e.month--,e.month<j&&(e.year--,e.month=N),e.day=ye(e.year,e.month)),e}function we(e,t=ke,n=1,r=[0,1,2,3,4,5,6]){return Te(e,t,n,r)}function Te(e,t=ke,n=1,r=[0,1,2,3,4,5,6]){r.includes(e.weekday)||0!==e.weekday||t!==ke||++n;while(--n>=0)e=t(e),r.length<7&&!r.includes(e.weekday)&&++n;return e}function Ie(e,t,n=ke,r=6){while(e.weekday!==t&&--r>=0)e=n(e);return e}function Me(t){const e=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)r[t[e]]=1;for(let n=0;n<O;++n){let t=1;for(let e=1;e<O;++e){const a=(n+e)%O;if(r[a])break;++t}e[n]=r[n]*t}return e}function Ne(e,t,n,r,a,i,o=[],s=[],u=42,d=0){const l=Z(t),c=[];let f=he(e),m=0,y=m===l;if(l<Z(e))return c;while((!y||c.length<d)&&c.length<u){if(m=Z(f),y=y||m>l&&c.length>=d,y)break;if(0!==r[f.weekday]){const h=he(f);de(h),re(h,n),ue(h,a,i,o,s),c.push(h),f=Te(f,ke)}else f=Te(f,ke)}return c}function je(t,n,r,a,i){const o=[];for(let e=0;e<a;++e){const s=(n+e)*r,u=he(t);o.push(ae(u,s,i))}return o}function _e(r,a){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(r||void 0,a(t,e));return n.format(Se(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${De(t)}`),""}}}function Oe(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function Se(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 xe(e,t,n,r){const a=Z(e)+(!0===r?ee(e):0),i=Z(t)+(!0===r?ee(t):0),o=Z(n)+(!0===r?ee(n):0);return a>=i&&a<=o}function Ee(e,t,n,r){const a=Z(e),i=Z(t),o=Z(n),s=Z(r);return a>=o&&a<=s||i>=o&&i<=s||o>=a&&i>=s}function qe(e,t){const r=he(e);let a;return Ye(t,(e,t)=>{if(void 0!==r[t]){r[t]+=parseInt(e,10);const n=Ce.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&We(r,Ce[a]),de(r),r}const Ce=["minute","hour","day","month"];function Ye(t,n){Object.keys(t).forEach(e=>n(t[e],e))}function He(e){if(e.minute>=S||e.minute<0){const t=Math.floor(e.minute/S);e.minute-=t*S,e.hour+=t,Fe(e)}return e}function Fe(e){if(e.hour>=A||e.hour<0){const t=Math.floor(e.hour/A);e.hour-=t*A,e.day+=t,Ue(e)}return e}function Ue(t){Le(t);let n=ye(t.year,t.month);if(t.day>n){++t.month,t.month>N&&Le(t);let e=t.day-n;n=ye(t.year,t.month);do{e>n&&(++t.month,t.month>N&&Le(t),e-=n,n=ye(t.year,t.month))}while(e>n);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&Le(t),n=ye(t.year,t.month);do{e>n&&(e-=n,--t.month,t.month<=0&&Le(t),n=ye(t.year,t.month))}while(e>n);t.day=n-e}return t}function Le(e){if(e.month>N){const t=Math.floor(e.month/N);e.month=e.month%N,e.year+=t}else e.month<j&&(e.month+=N,--e.year);return e}function We(e,t){switch(t){case"minute":return He(e);case"hour":return Fe(e);case"day":return Ue(e);case"month":return Le(e)}}function Re(e,t){const n=ne(e,t,!0);return Math.floor(n/C)}function $e(e,t){let n=he(e),r=he(t);return n=Ie(n,0),r=Ie(r,6),Math.ceil(Re(n,r)/O)}function Pe(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function ze(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}const{version:Be}=b;e.DAYS_IN_MONTH=w,e.DAYS_IN_MONTH_LEAP=T,e.DAYS_IN_MONTH_MAX=M,e.DAYS_IN_MONTH_MIN=I,e.DAYS_IN_WEEK=O,e.DAY_MIN=_,e.FIRST_HOUR=x,e.HOURS_IN_DAY=A,e.MILLISECONDS_IN_DAY=C,e.MILLISECONDS_IN_HOUR=q,e.MILLISECONDS_IN_MINUTE=E,e.MILLISECONDS_IN_WEEK=Y,e.MINUTES_IN_HOUR=S,e.MONTH_MAX=N,e.MONTH_MIN=j,e.PARSE_DATE=k,e.PARSE_REGEX=D,e.PARSE_TIME=v,e.TimeObject=F,e.Timestamp=H,e.addToDate=qe,e.compareDate=J,e.compareDateTime=G,e.compareTime=X,e.compareTimestamps=B,e.convertToUnit=Pe,e.copyTimestamp=he,e.createDayList=Ne,e.createIntervalList=je,e.createNativeLocaleFormatter=_e,e.daysBetween=Re,e.daysInMonth=ye,e.diffTimestamp=ne,e.findWeekday=Ie,e.getDate=ge,e.getDateTime=De,e.getDayIdentifier=Z,e.getDayOfYear=le,e.getDayTimeIdentifier=te,e.getEndOfMonth=$,e.getEndOfWeek=W,e.getStartOfMonth=R,e.getStartOfWeek=L,e.getTime=be,e.getTimeIdentifier=ee,e.getWeekday=fe,e.getWeekdaySkips=Me,e.getWorkWeek=ce,e.indexOf=ze,e.isBetweenDates=xe,e.isLeapYear=me,e.isOverlappingDates=Ee,e.makeDate=Oe,e.makeDateTime=Se,e.moveRelativeDays=we,e.nextDay=ke,e.padNumber=pe,e.parseDate=V,e.parseTime=P,e.parseTimestamp=Q,e.parsed=K,e.prevDay=ve,e.relativeDays=Te,e.today=U,e.updateDayOfYear=oe,e.updateDisabled=ue,e.updateFormatted=de,e.updateMinutes=ae,e.updateRelative=re,e.updateWeekday=ie,e.updateWorkWeek=se,e.validateNumber=Ae,e.validateTimestamp=z,e.version=Be,e.weeksBetween=$e,Object.defineProperty(e,"__esModule",{value:!0})});
(function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports):"function"===typeof define&&define.amd?define(["exports"],t):(e="undefined"!==typeof globalThis?globalThis:e||self,t(e.Timestamp={}))})(this,function(e){"use strict";var t="@quasar/quasar-ui-qcalendar",n="4.0.0-beta.3",r="Jeff Galbraith <jeff@quasar.dev>",a="QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",i="MIT",o="dist/index.esm.js",s="dist/index.common.js",u="dist/types/index.d.ts",d={lint:"eslint --ext .js,.vue src","lint-fix":"eslint --ext .js,.vue src --fix",dev:"cd dev && yarn dev && cd ..","dev:umd":"yarn build && node build/script.open-umd.js","dev:ssr":"cd dev && yarn 'dev:ssr' && cd ..","dev:ios":"cd dev && yarn 'dev:ios' && cd ..","dev:android":"cd dev && yarn 'dev:android' && cd ..","dev:electron":"cd dev && yarn 'dev:electron' && cd ..",build:"node build/index.js","build:js":"node build/script.javascript.js","build:css":"node build/script.css.js","build:api":"node build/build.api.js",test:"jest --runInBand --no-cache"},c={type:"github",url:"https://github.com/sponsors/hawkeye64"},l={access:"public"},f={type:"git",url:"git+https://github.com/quasarframework/quasar-ui-qcalendar.git"},m="https://github.com/quasarframework/quasar-ui-qcalendar/issues",y="https://github.com/quasarframework/quasar-ui-qcalendar",h=["quasar","quasarframework","calendar","daily","weekly","monthly","events","reminders","agenda","resource","schedule","task","planner","range selection"],p={tags:"dist/vetur/tags.json",attributes:"dist/vetur/attributes.json"},g={"@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"^7.14.7","@rollup/plugin-buble":"^0.21.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0",autoprefixer:"^10.2.6","babel-jest":"^27.0.6",chalk:"^4.1.1",cssnano:"^5.0.6",dotenv:"^10.0.0",eslint:"^7.30.0","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-quasar":"^1.0.0","eslint-plugin-vue":"^7.13.0","eslint-webpack-plugin":"^2.5.4","fs-extra":"^10.0.0",jest:"^27.0.6","jest-serializer-vue":"^2.0.2","jest-transform-stub":"^2.0.0",open:"^8.2.1",postcss:"^8.3.5",quasar:"^2.0.2","quasar-json-api":"2.0.0-alpha.3",rimraf:"^3.0.2",rollup:"^2.52.8",rtlcss:"^3.3.0",sass:"^1.35.2","uglify-js":"^3.13.10","vue-jest":"^5.0.0-alpha.8",zlib:"^1.0.5"},b=["last 10 Chrome versions","last 10 Firefox versions","last 10 Edge versions","last 10 Safari versions","last 10 Android versions","last 10 ChromeAndroid versions","last 10 FirefoxAndroid versions","last 10 iOS versions"],b={name:t,version:n,author:r,description:a,license:i,module:o,main:s,typings:u,scripts:d,funding:c,publishConfig:l,repository:f,bugs:m,homepage:y,keywords:h,vetur:p,devDependencies:g,browserslist:b};const D=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?(.(\d{1,3}))?$/,k=/^(\d{4})-(\d{1,2})(-(\d{1,2}))/,v=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,w=[0,31,28,31,30,31,30,31,31,30,31,30,31],T=[0,31,29,31,30,31,30,31,31,30,31,30,31],I=28,M=31,N=12,j=1,_=1,O=7,S=60,A=24,x=0,E=6e4,q=36e5,C=864e5,Y=6048e5,H={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 U(){const e=new Date,t=""+(e.getMonth()+1),n=""+e.getDate(),r=e.getFullYear();return[r,pe(t,2),pe(n,2)].join("-")}function L(e,t,n){let r=he(e);if(1===r.day||0===r.weekday)while(!t.includes(r.weekday))r=ke(r);return r=Ie(r,t[0],ve),r=de(r),n&&(r=re(r,n,r.hasTime)),r}function W(e,t,n){let r=he(e);const a=ye(r.year,r.month);if(a===r.day||6===r.weekday)while(!t.includes(r.weekday))r=ve(r);return r=Ie(r,t[t.length-1],ke),r=de(r),n&&(r=re(r,n,r.hasTime)),r}function R(e){const t=he(e);return t.day=_,de(t),t}function $(e){const t=he(e);return t.day=ye(t.year,t.month),de(t),t}function P(e){const t=Object.prototype.toString.call(e);switch(t){case"[object Number]":return e;case"[object String]":{const n=v.exec(e);return n?60*parseInt(n[1],10)+parseInt(n[3]||0,10):!1}case"[object Object]":return"number"!==typeof e.hour||"number"!==typeof e.minute?!1:60*e.hour+e.minute}return!1}function z(e){return!!D.exec(e)}function B(e,t){return JSON.stringify(e)===JSON.stringify(t)}function J(e,t){return ge(e)===ge(t)}function X(e,t){return be(e)===be(t)}function G(e,t){return De(e)===De(t)}function K(e){const t=D.exec(e);return t?{date:e,time:pe(parseInt(t[6],10)||0,2)+":"+pe(parseInt(t[8],10)||0,2),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 Q(e,t){let n=K(e);return null===n?null:(n=de(n),t&&re(n,t,n.hasTime),n)}function V(e){return de({date:pe(e.getFullYear(),4)+"-"+pe(e.getMonth()+1,2)+"-"+pe(e.getDate(),2),time:pe(e.getHours()||0,2)+":"+pe(e.getMinutes()||0,2),year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),weekday:0,doy:0,workweek:0,hasDay:!0,hasTime:!(0===e.getHours()||0===e.getMinutes()),past:!1,current:!1,future:!1,disabled:!1})}function Z(e){return 1e8*e.year+1e6*e.month+1e4*e.day}function ee(e){return 100*e.hour+e.minute}function te(e){return Z(e)+ee(e)}function ne(e,t,n){const r=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute),a=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute);return!0===n&&a<r?0:a-r}function re(e,t,n=!1){let r=Z(t),a=Z(e),i=r===a;return e.hasTime&&n&&i&&(r=ee(t),a=ee(e),i=r===a),e.past=a<r,e.current=i,e.future=a>r,e}function ae(e,t,n){return e.hasTime=!0,e.hour=Math.floor(t/S),e.minute=t%S,e.time=be(e),n&&re(e,n,!0),e}function ie(e){return e.weekday=fe(e),e}function oe(e){return e.doy=ce(e),e}function se(e){return e.workweek=le(e),e}function ue(e,t,n,r,a){const i=Z(e);if(void 0!==t){const o=Z(K(t));i<=o&&(e.disabled=!0)}if(!0!==e.disabled&&void 0!==n){const s=Z(K(n));i>=s&&(e.disabled=!0)}if(!0!==e.disabled&&Array.isArray(r)&&r.length>0)for(const u in r)if(r[u]===e.weekday){e.disabled=!0;break}if(!0!==e.disabled&&Array.isArray(a)&&a.length>0)for(const d in a)if(Array.isArray(a[d])&&2===a[d].length){const c=K(a[d][0]),l=K(a[d][1]);if(xe(e,c,l)){e.disabled=!0;break}}else{const f=Z(Q(a[d]+" 00:00"));if(f===i){e.disabled=!0;break}}return e}function de(e){return e.hasTime=!(0===e.hour&&0===e.minute),e.time=be(e),e.date=ge(e),e.weekday=fe(e),e.doy=ce(e),e.workweek=le(e),e}function ce(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 le(e){let t;if(t=0===e.year?Date.UTC(new Date):Oe(e),isNaN(t))return 0;const n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);const r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);const a=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-a);const i=(n-r)/Y;return 1+Math.floor(i)}function fe(e){let t=e.weekday;if(e.hasDay){const n=Math.floor,r=e.day,a=(e.month+9)%N+1,i=n(e.year/100),o=e.year%100-(e.month<=2?1:0);t=((r+n(2.6*a-.2)-2*i+o+n(o/4)+n(i/4))%7+7)%7}return t}function me(e){return 1===(e%4===0^e%100===0^e%400===0)}function ye(e,t){return(me(e)?T:w)[t]}function he(e){return{...e}}function pe(e,t){let n=String(e);while(n.length<t)n="0"+n;return n}function ge(e){let t=`${pe(e.year,4)}-${pe(e.month,2)}`;return e.hasDay&&(t+=`-${pe(e.day,2)}`),t}function be(e){return e.hasTime?`${pe(e.hour,2)}:${pe(e.minute,2)}`:""}function De(e){return ge(e)+" "+(e.hasTime?be(e):"00:00")}function ke(e){return++e.day,e.weekday=(e.weekday+1)%O,e.day>I&&e.day>ye(e.year,e.month)&&(e.day=_,++e.month,e.month>N&&(e.month=j,++e.year)),e}function ve(e){return e.day--,e.weekday=(e.weekday+6)%O,e.day<_&&(e.month--,e.month<j&&(e.year--,e.month=N),e.day=ye(e.year,e.month)),e}function we(e,t=ke,n=1,r=[0,1,2,3,4,5,6]){return Te(e,t,n,r)}function Te(e,t=ke,n=1,r=[0,1,2,3,4,5,6]){r.includes(e.weekday)||0!==e.weekday||t!==ke||++n;while(--n>=0)e=t(e),r.length<7&&!r.includes(e.weekday)&&++n;return e}function Ie(e,t,n=ke,r=6){while(e.weekday!==t&&--r>=0)e=n(e);return e}function Me(t){const e=[1,1,1,1,1,1,1],r=[0,0,0,0,0,0,0];for(let e=0;e<t.length;++e)r[t[e]]=1;for(let n=0;n<O;++n){let t=1;for(let e=1;e<O;++e){const a=(n+e)%O;if(r[a])break;++t}e[n]=r[n]*t}return e}function Ne(e,t,n,r,a,i,o=[],s=[],u=42,d=0){const c=Z(t),l=[];let f=he(e),m=0,y=m===c;if(c<Z(e))return l;while((!y||l.length<d)&&l.length<u){if(m=Z(f),y=y||m>c&&l.length>=d,y)break;if(0!==r[f.weekday]){const h=he(f);de(h),re(h,n),ue(h,a,i,o,s),l.push(h),f=Te(f,ke)}else f=Te(f,ke)}return l}function je(t,n,r,a,i){const o=[];for(let e=0;e<a;++e){const s=(n+e)*r,u=he(t);o.push(ae(u,s,i))}return o}function _e(r,a){const e=(e,t)=>"";return"undefined"===typeof Intl||"undefined"===typeof Intl.DateTimeFormat?e:(t,e)=>{try{const n=new Intl.DateTimeFormat(r||void 0,a(t,e));return n.format(Se(t))}catch(e){return console.error(`Intl.DateTimeFormat: ${e.message} -> ${De(t)}`),""}}}function Oe(e){return new Date(Date.UTC(e.year,e.month-1,e.day,0,0))}function Se(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 xe(e,t,n,r){const a=Z(e)+(!0===r?ee(e):0),i=Z(t)+(!0===r?ee(t):0),o=Z(n)+(!0===r?ee(n):0);return a>=i&&a<=o}function Ee(e,t,n,r){const a=Z(e),i=Z(t),o=Z(n),s=Z(r);return a>=o&&a<=s||i>=o&&i<=s||o>=a&&i>=s}function qe(e,t){const r=he(e);let a;return Ye(t,(e,t)=>{if(void 0!==r[t]){r[t]+=parseInt(e,10);const n=Ce.indexOf(t);-1!==n&&(a=void 0===a?n:Math.min(n,a))}}),void 0!==a&&We(r,Ce[a]),de(r),r}const Ce=["minute","hour","day","month"];function Ye(t,n){Object.keys(t).forEach(e=>n(t[e],e))}function He(e){if(e.minute>=S||e.minute<0){const t=Math.floor(e.minute/S);e.minute-=t*S,e.hour+=t,Fe(e)}return e}function Fe(e){if(e.hour>=A||e.hour<0){const t=Math.floor(e.hour/A);e.hour-=t*A,e.day+=t,Ue(e)}return e}function Ue(t){Le(t);let n=ye(t.year,t.month);if(t.day>n){++t.month,t.month>N&&Le(t);let e=t.day-n;n=ye(t.year,t.month);do{e>n&&(++t.month,t.month>N&&Le(t),e-=n,n=ye(t.year,t.month))}while(e>n);t.day=e}else if(t.day<=0){let e=-1*t.day;--t.month,t.month<=0&&Le(t),n=ye(t.year,t.month);do{e>n&&(e-=n,--t.month,t.month<=0&&Le(t),n=ye(t.year,t.month))}while(e>n);t.day=n-e}return t}function Le(e){if(e.month>N){const t=Math.floor(e.month/N);e.month=e.month%N,e.year+=t}else e.month<j&&(e.month+=N,--e.year);return e}function We(e,t){switch(t){case"minute":return He(e);case"hour":return Fe(e);case"day":return Ue(e);case"month":return Le(e)}}function Re(e,t){const n=ne(e,t,!0);return Math.floor(n/C)}function $e(e,t){let n=he(e),r=he(t);return n=Ie(n,0),r=Ie(r,6),Math.ceil(Re(n,r)/O)}function Pe(e,t="px"){if(null!=e&&""!==e)return isNaN(e)?String(e):"auto"===e?e:`${Number(e)}${t}`}function ze(t,n){for(let e=0;e<t.length;e++)if(!0===n(t[e],e))return e;return-1}const{version:Be}=b;e.DAYS_IN_MONTH=w,e.DAYS_IN_MONTH_LEAP=T,e.DAYS_IN_MONTH_MAX=M,e.DAYS_IN_MONTH_MIN=I,e.DAYS_IN_WEEK=O,e.DAY_MIN=_,e.FIRST_HOUR=x,e.HOURS_IN_DAY=A,e.MILLISECONDS_IN_DAY=C,e.MILLISECONDS_IN_HOUR=q,e.MILLISECONDS_IN_MINUTE=E,e.MILLISECONDS_IN_WEEK=Y,e.MINUTES_IN_HOUR=S,e.MONTH_MAX=N,e.MONTH_MIN=j,e.PARSE_DATE=k,e.PARSE_REGEX=D,e.PARSE_TIME=v,e.TimeObject=F,e.Timestamp=H,e.addToDate=qe,e.compareDate=J,e.compareDateTime=G,e.compareTime=X,e.compareTimestamps=B,e.convertToUnit=Pe,e.copyTimestamp=he,e.createDayList=Ne,e.createIntervalList=je,e.createNativeLocaleFormatter=_e,e.daysBetween=Re,e.daysInMonth=ye,e.diffTimestamp=ne,e.findWeekday=Ie,e.getDate=ge,e.getDateTime=De,e.getDayIdentifier=Z,e.getDayOfYear=ce,e.getDayTimeIdentifier=te,e.getEndOfMonth=$,e.getEndOfWeek=W,e.getStartOfMonth=R,e.getStartOfWeek=L,e.getTime=be,e.getTimeIdentifier=ee,e.getWeekday=fe,e.getWeekdaySkips=Me,e.getWorkWeek=le,e.indexOf=ze,e.isBetweenDates=xe,e.isLeapYear=me,e.isOverlappingDates=Ee,e.makeDate=Oe,e.makeDateTime=Se,e.moveRelativeDays=we,e.nextDay=ke,e.padNumber=pe,e.parseDate=V,e.parseTime=P,e.parseTimestamp=Q,e.parsed=K,e.prevDay=ve,e.relativeDays=Te,e.today=U,e.updateDayOfYear=oe,e.updateDisabled=ue,e.updateFormatted=de,e.updateMinutes=ae,e.updateRelative=re,e.updateWeekday=ie,e.updateWorkWeek=se,e.validateNumber=Ae,e.validateTimestamp=z,e.version=Be,e.weeksBetween=$e,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "@quasar/quasar-ui-qcalendar",
"version": "4.0.0-beta.2",
"version": "4.0.0-beta.3",
"author": "Jeff Galbraith <jeff@quasar.dev>",

@@ -67,17 +67,17 @@ "description": "QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas, Planners and Tasks for your Vue Apps",

"autoprefixer": "^10.2.6",
"babel-jest": "^27.0.5",
"babel-jest": "^27.0.6",
"chalk": "^4.1.1",
"cssnano": "^5.0.6",
"dotenv": "^10.0.0",
"eslint": "^7.29.0",
"eslint": "^7.30.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^35.4.0",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-quasar": "^1.0.0",
"eslint-plugin-vue": "^7.11.1",
"eslint-plugin-vue": "^7.13.0",
"eslint-webpack-plugin": "^2.5.4",
"fs-extra": "^10.0.0",
"jest": "^27.0.5",
"jest": "^27.0.6",
"jest-serializer-vue": "^2.0.2",

@@ -87,11 +87,9 @@ "jest-transform-stub": "^2.0.0",

"postcss": "^8.3.5",
"promise": "^8.1.0",
"quasar": "^2.0.0",
"quasar": "^2.0.2",
"quasar-json-api": "2.0.0-alpha.3",
"rimraf": "^3.0.2",
"rollup": "^2.52.2",
"rollup-plugin-vue": "=6.0.0",
"rtlcss": "^3.2.1",
"sass": "^1.35.1",
"uglify-js": "^3.13.9",
"rollup": "^2.52.8",
"rtlcss": "^3.3.0",
"sass": "^1.35.2",
"uglify-js": "^3.13.10",
"vue-jest": "^5.0.0-alpha.8",

@@ -98,0 +96,0 @@ "zlib": "^1.0.5"

@@ -30,3 +30,3 @@ import {

type: String,
validator: v=> ['day', 'month', 'agenda', 'resource', 'scheduler', 'task'].includes(v),
validator: v=> [ 'day', 'month', 'agenda', 'resource', 'scheduler', 'task' ].includes(v),
default: 'day'

@@ -33,0 +33,0 @@ },

@@ -410,3 +410,2 @@ // interval composables

const bounds = (e.currentTarget).getBoundingClientRect()
const baseMinutes = parsedStartMinute.value
const touchEvent = e

@@ -418,6 +417,5 @@ const mouseEvent = e

const addMinutes = Math.floor((clamp ? Math.floor(addIntervals) : addIntervals) * parsedIntervalMinutes.value)
const minutes = baseMinutes + addMinutes
if (minutes !== 0) {
timestamp = addToDate(timestamp, { minute: minutes })
if (addMinutes !== 0) {
timestamp = addToDate(timestamp, { minute: addMinutes })
}

@@ -444,3 +442,2 @@

const bounds = (e.currentTarget).getBoundingClientRect()
const baseMinutes = parsedStartMinute.value
const touchEvent = e

@@ -452,5 +449,12 @@ const mouseEvent = e

const addMinutes = Math.floor((clamp ? Math.floor(addIntervals) : addIntervals) * parsedIntervalMinutes.value)
const minutes = baseMinutes + addMinutes
return updateMinutes(timestamp, minutes, now)
if (addMinutes !== 0) {
timestamp = addToDate(timestamp, { minute: addMinutes })
}
if (now) {
updateRelative(timestamp, now, true)
}
return timestamp
}

@@ -476,5 +480,12 @@

const addMinutes = Math.floor((clamp ? Math.floor(addIntervals) : addIntervals) * parsedIntervalMinutes.value)
const minutes = addMinutes + (day.hour * 60 + day.minute)
return updateMinutes(timestamp, minutes, now)
if (addMinutes !== 0) {
timestamp = addToDate(timestamp, { minute: addMinutes })
}
if (now) {
updateRelative(timestamp, now, true)
}
return timestamp
}

@@ -481,0 +492,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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 too big to display

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 too big to display

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 too big to display

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

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 too big to display

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

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 too big to display

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

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 too big to display

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

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 too big to display

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

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 too big to display

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc