Socket
Socket
Sign inDemoInstall

@wslyhbb/vuejs-datepicker

Package Overview
Dependencies
24
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.3 to 4.1.4

4

dist/vuejs-datepicker.common.js
"use strict";/*!
* vuejs-datepicker v4.1.3
* vuejs-datepicker v4.1.4
* (c) 2023-2023 Wesley Hobbie
* Released under the MIT License.
*/const d=require("date-fns"),a=require("vue");function w(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):e.defaultWidth,n=e.formats[s]||e.formats[e.defaultWidth];return n}}function m(e){return function(t,s){var n=s!=null&&s.context?String(s.context):"standalone",r;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,l=s!=null&&s.width?String(s.width):i;r=e.formattingValues[l]||e.formattingValues[i]}else{var u=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;r=e.values[o]||e.values[u]}var f=e.argumentCallback?e.argumentCallback(t):t;return r[f]}}function p(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var l=i[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(u)?E(u,function(D){return D.test(l)}):B(u,function(D){return D.test(l)}),f;f=e.valueCallback?e.valueCallback(o):o,f=s.valueCallback?s.valueCallback(f):f;var V=t.slice(l.length);return{value:f,rest:V}}}function B(e,t){for(var s in e)if(e.hasOwnProperty(s)&&t(e[s]))return s}function E(e,t){for(var s=0;s<e.length;s++)if(t(e[s]))return s}function O(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var r=n[0],i=t.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];l=s.valueCallback?s.valueCallback(l):l;var u=t.slice(r.length);return{value:l,rest:u}}}var I={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},A=function(t,s,n){var r,i=I[t];return typeof i=="string"?r=i:s===1?r=i.one:r=i.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const Y=A;var U={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},x={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$={date:w({formats:U,defaultWidth:"full"}),time:w({formats:x,defaultWidth:"full"}),dateTime:w({formats:H,defaultWidth:"full"})};const W=$;var L={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R=function(t,s,n,r){return L[t]};const K=R;var j={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},J={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},X={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Q={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},G=function(t,s){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Z={ordinalNumber:G,era:m({values:j,defaultWidth:"wide"}),quarter:m({values:z,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:m({values:q,defaultWidth:"wide"}),day:m({values:J,defaultWidth:"wide"}),dayPeriod:m({values:X,defaultWidth:"wide",formattingValues:Q,defaultFormattingWidth:"wide"})};const _=Z;var ee=/^(\d+)(th|st|nd|rd)?/i,te=/\d+/i,se={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ae={any:[/^b/i,/^(a|c)/i]},ie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ne={any:[/1/i,/2/i,/3/i,/4/i]},re={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},le={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ue={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},de={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},he={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ce={ordinalNumber:O({matchPattern:ee,parsePattern:te,valueCallback:function(t){return parseInt(t,10)}}),era:p({matchPatterns:se,defaultMatchWidth:"wide",parsePatterns:ae,defaultParseWidth:"any"}),quarter:p({matchPatterns:ie,defaultMatchWidth:"wide",parsePatterns:ne,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:p({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:le,defaultParseWidth:"any"}),day:p({matchPatterns:oe,defaultMatchWidth:"wide",parsePatterns:ue,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:de,defaultMatchWidth:"any",parsePatterns:he,defaultParseWidth:"any"})};const fe=ce;var ge={code:"en-US",formatDistance:Y,formatLong:W,formatRelative:K,localize:_,match:fe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const b=ge,F={useUtc:!1,language:b,getFullYear(e){return this.useUtc?e.getUTCFullYear():e.getFullYear()},getMonth(e){return this.useUtc?e.getUTCMonth():e.getMonth()},getDaysInMonth(e){return this.daysInMonth(this.getFullYear(e),this.getMonth(e))},getDate(e){return this.useUtc?e.getUTCDate():e.getDate()},getDay(e){return this.useUtc?e.getUTCDay():e.getDay()},getHours(e){return this.useUtc?e.getUTCHours():e.getHours()},getMinutes(e){return this.useUtc?e.getUTCMinutes():e.getMinutes()},setFullYear(e,t){return this.useUtc?e.setUTCFullYear(t):e.setFullYear(t)},setMonth(e,t){return this.useUtc?e.setUTCMonth(t):e.setMonth(t)},setDate(e,t){return this.useUtc?e.setUTCDate(t):e.setDate(t)},compareDates(e,t){const s=new Date(e.getTime()),n=new Date(t.getTime());return this.useUtc?(s.setUTCHours(0,0,0,0),n.setUTCHours(0,0,0,0)):(s.setHours(0,0,0,0),n.setHours(0,0,0,0)),s.getTime()===n.getTime()},isValidDate(e){return Object.prototype.toString.call(e)!=="[object Date]"?!1:!isNaN(e.getTime())},getDayNameAbbr(e){if(typeof e!="object")throw TypeError("Invalid Type");return d.format(e,"ccc",{locale:this.language})},getDayFromAbbr(e){const t=new Date,s=[0,1,2,3,4,5,6];let n=s.map(r=>d.format(d.setDay(t,r),"ccc",{locale:b}));for(let r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase())return r;if(this.language!==b){n=s.map(r=>d.format(d.setDay(t,r),"ccc",{locale:this.language}));for(let r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase())return r}throw TypeError("Invalid week day")},getMonthName(e){if(typeof e=="object")return d.format(e,"LLLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLLL",{locale:this.language});throw TypeError("Invalid type")},getMonthNameAbbr(e){if(typeof e=="object")return d.format(e,"LLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLL",{locale:this.language});throw TypeError("Invalid type")},daysInMonth(e,t){return/8|3|5|10/.test(t)?30:t===1?!(e%4)&&e%100||!(e%400)?29:28:31},getNthSuffix(e){switch(e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},getDaysStartingOn(e,t=!1){const s=new Date,n=[0,1,2,3,4,5,6];let r="ccc";return t&&(r="cccccc"),n.map(i=>d.format(d.setDay(s,i+e),r,{locale:this.language}))},formatDate(e,t){return d.format(e,t,{locale:this.language})},parseDate(e,t="yyyy-MM-dd"){if(typeof e=="string")return d.parse(e,t,new Date,{locale:this.language});if(typeof e=="number")return d.toDate(e)},validateDateInput(e){return e===null||e instanceof Date||typeof e=="string"||typeof e=="number"},resetDateTime(e){return new Date(this.useUtc?e.setUTCHours(0,0,0,0):e.setHours(0,0,0,0))},getNewDateObject(e){return e?this.resetDateTime(new Date(e)):this.resetDateTime(new Date)}},h=(e=!1,t=b)=>({...F,useUtc:e,language:t}),P={...F},T=["dv","fa","ha","he","kwh","ks","ku","ps","ur","yi"],me=["ja","lt","mn","ko"],C={zh:"年",ja:"年",ko:"년"},N={props:{autofocus:{type:Boolean,default:!1},bootstrapStyling:{type:Boolean,default:!1},clearButton:{type:Boolean,default:!1},clearButtonIcon:{type:String,default:null},calendarButton:{type:Boolean,default:!1},calendarButtonIcon:{type:String,default:null},calendarButtonIconContent:{type:String,default:null},disabled:{type:Boolean,default:!1},format:{type:[String,Function],default:"dd MMM yyyy"},id:{type:String,default:null},inline:{type:Boolean,default:!1},inputClass:{type:[String,Object,Array],default:null},maxlength:{type:[Number,String],default:null},name:{type:String,default:null},pattern:{type:String,default:null},placeholder:{type:String,default:null},refName:{type:String,default:""},required:{type:Boolean,default:!1},showCalendarOnFocus:{type:Boolean,default:!1},tabindex:{type:[Number,String],default:null},typeable:{type:Boolean,default:!1},useUtc:{type:Boolean,default:!1}}},g=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},pe={name:"DateInput",mixins:[N],props:{isOpen:{type:Boolean,default:!1},language:{type:Object},openDate:Date,parseTypedDate:Function,resetTypedDate:[Date],selectedDate:{type:Date,default:null}},emits:{clearDate:null,closeCalendar:null,open:null,selectTypedDate:e=>e===null||e instanceof Date,setFocus:e=>e.every(t=>["calendarButton","input","prev","up","next","tabbableCell"].includes(t)),typedDate:e=>e===null||e instanceof Date},data(){return{input:null,typedDate:!1,utils:h(this.useUtc,this.language)}},computed:{formattedValue(){return this.selectedDate?this.typedDate?this.typedDate:typeof this.format=="function"?this.format(this.selectedDate):this.utils.formatDate(this.selectedDate,this.format):null},computedInputClass(){return this.bootstrapStyling?typeof this.inputClass=="string"?[this.inputClass,"form-control"].join(" "):{"form-control":!0,...this.inputClass}:this.inputClass}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)},resetTypedDate(){this.typedDate=!1}},mounted(){this.input=this.$el.querySelector("input")},methods:{showCalendar(){this.showCalendarOnFocus||this.toggle()},showFocusCalendar(){this.showCalendarOnFocus&&!this.isOpen&&this.$emit("open")},handleKeydownDown(){this.isOpen||this.$emit("open"),this.typeable&&this.$emit("setFocus",["prev","up","next","tabbableCell"])},handleKeydownEnter(){if(!this.typeable)return;if(!this.input.value){this.$emit("selectTypedDate",null);return}const e=this.getTypedDate(this.input.value);isNaN(e)||(this.typedDate=this.input.value,this.$emit("selectTypedDate",e))},handleKeydownEscape(){this.$emit("closeCalendar")},keyUp(e){if(!(!this.typeable||["Control","Escape","Shift","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))){if(!this.input.value){this.$emit("typedDate",null);return}if(this.typeable){const t=this.getTypedDate(this.input.value);isNaN(t)||(this.typedDate=this.input.value,this.$emit("typedDate",t))}}},inputBlurred(){this.typeable&&isNaN(this.getTypedDate(this.input.value))&&(this.clearDate(),this.input.value=null,this.typedDate=null)},clearDate(){this.$emit("clearDate")},getTypedDate(e){return typeof this.parseTypedDate=="function"?this.parseTypedDate(e):this.utils.parseDate(e,typeof this.format=="string"?this.format:void 0)},toggle(e){this.isOpen&&this.$emit("setFocus",[e||"input"]),this.$emit(this.isOpen?"closeCalendar":"open")}}},be=["disabled"],ye={key:0},De=["id","autofocus","clear-button","disabled","maxlength","name","open-date","pattern","placeholder","readonly","required","tabindex","type","value"],we=["disabled"],ve={key:0};function Ce(e,t,s,n,r,i){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"input-group":e.bootstrapStyling})},[e.calendarButton?(a.openBlock(),a.createElementBlock("button",{key:0,ref:"calendarButton",class:a.normalizeClass(["vdp-datepicker__calendar-button",{"btn input-group-prepend":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[0]||(t[0]=l=>i.toggle("calendarButton"))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"calendarBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.calendarButtonIcon)},[a.createTextVNode(a.toDisplayString(e.calendarButtonIconContent)+" ",1),e.calendarButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",ye,"…"))],2)])],2)],10,be)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"beforeDateInput"),a.createElementVNode("input",{id:e.id,ref:e.refName,autocomplete:"off",autofocus:e.autofocus,class:a.normalizeClass(i.computedInputClass),"clear-button":e.clearButton,disabled:e.disabled,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,pattern:e.pattern,placeholder:e.placeholder,readonly:!e.typeable,required:e.required,tabindex:e.tabindex,type:e.inline?"hidden":"text",value:i.formattedValue,onBlur:t[1]||(t[1]=(...l)=>i.inputBlurred&&i.inputBlurred(...l)),onClick:t[2]||(t[2]=(...l)=>i.showCalendar&&i.showCalendar(...l)),onFocus:t[3]||(t[3]=(...l)=>i.showFocusCalendar&&i.showFocusCalendar(...l)),onKeydown:[t[4]||(t[4]=a.withKeys(a.withModifiers((...l)=>i.handleKeydownDown&&i.handleKeydownDown(...l),["prevent"]),["down"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...l)=>i.handleKeydownEnter&&i.handleKeydownEnter(...l),["prevent"]),["enter"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...l)=>i.handleKeydownEscape&&i.handleKeydownEscape(...l),["prevent"]),["esc"]))],onKeyup:t[7]||(t[7]=(...l)=>i.keyUp&&i.keyUp(...l))},null,42,De),e.clearButton&&s.selectedDate?(a.openBlock(),a.createElementBlock("button",{key:1,class:a.normalizeClass(["vdp-datepicker__clear-button",{"btn input-group-append":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[8]||(t[8]=(...l)=>i.clearDate&&i.clearDate(...l))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"clearBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.clearButtonIcon)},[e.clearButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",ve,"×"))],2)])],2)],10,we)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"afterDateInput")],2)}const Me=g(pe,[["render",Ce]]),Se={isDefined(e,t){return e&&typeof e[t]<"u"},hasArray(e,t){return e&&Array.isArray(e[t])},hasDate(e,t){return this.isDefined(e,t)&&this.utils.isValidDate(e[t])},dayMonthYear(e,t){const{utils:s}=this;if(!this.hasDate(e,t))return{day:void 0,month:void 0,year:void 0};const r=e[t];return{day:s.getDate(r),month:s.getMonth(r),year:s.getFullYear(r)}}},y=e=>({...Se,utils:e});class c{constructor(t,s){this._utils=t,this._disabledDates=s}get config(){const t=this._disabledDates,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to")};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}daysInMonth(t){const s=this._utils,n=s.getMonth(t),r=s.getFullYear(t);return s.daysInMonth(r,n)}isDateDisabledVia(t){const s=this._disabledDates,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:r}=s,i=y(this._utils);return r.some(l=>{const u=i.isDefined(l,"from"),o=i.isDefined(l,"to");return u&&o&&t<l.to&&t>l.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(r=>this._utils.compareDates(t,r)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isMonthDisabledVia(t){const{from:s,has:n,to:r}=this.config,i=this._utils.getMonth(t),l=this._utils.getFullYear(t);return{to:()=>n.to&&l<r.year?!0:n.to&&i<r.month&&l<=r.year,from:()=>n.from&&l>s.year?!0:n.from&&i>s.month&&l>=s.year}}isYearDisabledVia(t){const{from:s,has:n,to:r}=this.config,i=this._utils.getFullYear(t);return{to:()=>n.to&&i<r.year,from:()=>n.from&&i>s.year}}isDateDisabled(t){const s=this.isDateDisabledVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isMonthDisabled(t){const s=this.isMonthDisabledVia(t);if(s.to()||s.from())return!0;for(let n=1;n<=this.daysInMonth(t);n++){const r=new Date(t);if(r.setDate(n),!this.isDateDisabled(r))return!1}return!0}isYearDisabled(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const r=new Date(t);if(r.setMonth(n),!this.isMonthDisabled(r))return!1}return!0}getEarliestPossibleDate(t){if(!t)return null;const s=this._utils;if(this.isDateDisabled(t)){const n=new Date(s.getFullYear(t),s.getMonth(t),s.getDate(t)+1);return this.getEarliestPossibleDate(n)}return t}getLatestPossibleDate(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const r=new Date(t);if(r.setMonth(n),!this.isMonthDisabled(r))return!1}return!0}}const ke={data(){return{focus:{delay:0,refs:[]},navElements:[],navElementsFocusedIndex:0,resetTabbableCell:!1,tabbableCell:null}},computed:{fallbackElementsToFocus(){const e=["tabbableCell","prev","next"];return this.typeable&&e.unshift("input"),e},tabbableCellId(){return this.tabbableCell&&Number(this.tabbableCell.getAttribute("data-id"))}},methods:{getCellDate(e){switch(this.view){case"month":return new Date(this.utils.setDate(e,1));case"year":return new Date(this.utils.setMonth(new Date(this.utils.setDate(e,1)),0));default:return e}},applyFocus(){const e=[...this.focus.refs,...this.fallbackElementsToFocus];for(let t=0;t<e.length;t++){const s=this.getElementByRef(e[t]);if(s&&s.getAttribute("disabled")===null){s.focus(),this.setNavElementsFocusedIndex();break}}},getActiveCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell"),s=this.hasClass(e,this.view);return t&&s&&!this.resetTabbableCell?e:null},getActiveElement(){return document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement},getCellId(e){if(!e||!this.$refs.picker.$refs.cells)return null;const t=this.getCellDate(e),{cells:s}=this.$refs.picker.$refs.cells;for(let n=0;n<s.length;n++)if(s[n].timestamp===t.valueOf())return n;return null},getElementByRef(e){return e==="tabbableCell"?this.tabbableCell:e==="input"?this.$refs.dateInput&&this.$refs.dateInput.$refs[this.refName]:e==="calendarButton"?this.$refs.dateInput&&this.$refs.dateInput.$refs.calendarButton:this.$refs.picker&&this.$refs.picker.$refs.pickerHeader&&this.$refs.picker.$refs.pickerHeader.$refs[e]},getElementsFromSlot(e){if(!this.hasSlot(e))return[];if(e==="beforeCalendarHeader")return this.getFocusableElements(this.$refs.view.children[0]);const t=e.indexOf("beforeCalendarHeader")>-1,s=this.$refs.picker.$el,n=t?0:s.children.length-1;return this.getFocusableElements(s.children[n])},getElementsFromHeader(){if(!this.$refs.picker.$refs.pickerHeader)return[];const t=this.$refs.picker.$refs.pickerHeader.$el.querySelectorAll("button:enabled");return[...Array.prototype.slice.call(t)]},getFocusableElements(e){if(!e)return[];const t=e.querySelectorAll('button:enabled:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]):not([type=hidden]), select:enabled:not([tabindex="-1"]), textarea:enabled:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])');return[...Array.prototype.slice.call(t)]},getInputField(){return!this.typeable||this.inline?null:this.$refs.dateInput.$refs[this.refName]},getTypedCell(){if(!this.typeable)return null;const e=this.getCellId(this.latestValidTypedDate);return e?this.$refs.picker.$refs.cells.$el.children[e]:null},hasSlot(e){return!!this.$slots[e]},reviewFocus(){this.tabbableCell=null,this.resetTabbableCell=!0,this.$nextTick(()=>{this.setNavElements(),setTimeout(()=>{this.applyFocus()},this.focus.delay),this.resetTabbableCell=!1})},setFocus(e){this.focus.refs=e,this.applyFocus()},setNavElements(){if(!this.view)return;this.updateTabbableCell();const e=this.ucFirst(this.view);this.navElements=[this.getInputField(),this.getElementsFromSlot("beforeCalendarHeader"),this.getElementsFromSlot(`beforeCalendarHeader${e}`),this.getElementsFromHeader(),this.tabbableCell].filter(t=>!!t).reduce((t,s)=>t.concat(s),[])},setNavElementsFocusedIndex(){const e=this.getActiveElement();for(let t=0;t<this.navElements.length;t++)if(e===this.navElements[t]){this.navElementsFocusedIndex=t;return}this.navElementsFocusedIndex=0},setTabbableCell(){if(!this.$refs.picker||!this.$refs.picker.$refs.cells)return;const e=this.$refs.picker.$refs.cells.$el;this.tabbableCell=this.getActiveCell()||this.getTypedCell()||e.querySelector("button.selected:not(.muted):enabled")||e.querySelector("button.today:not(.muted):enabled")||e.querySelector("button.cell:not(.muted):enabled")},updateTabbableCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell");(!this.tabbableCell||t)&&this.setTabbableCell()}}},Pe={props:{bootstrapStyling:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,required:!0},isPreviousDisabled:{type:Boolean,required:!0},isRtl:{type:Boolean,required:!0},isUpDisabled:{type:Boolean,default:!1},nextViewUp:{type:String,default:null},upButtonClasses:{type:String}},emits:{focusInput:null,pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>["day","month","year"].includes(e)},computed:{leftButton(){return[this.isRtl?"next":"prev"]},rightButton(){return[this.isRtl?"prev":"next"]}},methods:{arrowLeftPrev(){if(this.isRtl){this.$emit("setFocus",["up","next","tabbableCell"]);return}this.goToPreviousPage()},arrowRightPrev(){if(this.isRtl){this.goToPreviousPage();return}this.$emit("setFocus",["up","next","tabbableCell"])},arrowLeftNext(){if(this.isRtl){this.goToNextPage();return}this.$emit("setFocus",["up","prev","tabbableCell"])},arrowRightNext(){if(this.isRtl){this.$emit("setFocus",["up","prev","tabbableCell"]);return}this.goToNextPage()},focusInput(){this.$emit("focusInput")},focusTabbableCell(){this.$emit("setFocus",["tabbableCell"])},focusLeftButton(){this.$emit("setFocus",this.leftButton)},focusRightButton(){this.$emit("setFocus",this.rightButton)},goToNextPage(){this.$emit("pageChange",{incrementBy:1,focusRefs:["next"]})},goToPreviousPage(){this.$emit("pageChange",{incrementBy:-1,focusRefs:["prev"]})},selectUpButton(){this.isUpDisabled||this.$emit("setView",this.nextViewUp)}}},Fe=["disabled"],Te={key:1,ref:"up"},Ne=["disabled"];function Ve(e,t,s,n,r,i){return a.openBlock(),a.createElementBlock("header",null,[a.createElementVNode("button",{ref:"prev",class:a.normalizeClass(["prev",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isPreviousDisabled,type:"button",onClick:t[0]||(t[0]=l=>s.isRtl?i.goToNextPage():i.goToPreviousPage()),onKeydown:[t[1]||(t[1]=a.withKeys(a.withModifiers((...l)=>i.focusTabbableCell&&i.focusTabbableCell(...l),["prevent"]),["down"])),t[2]||(t[2]=a.withKeys(a.withModifiers((...l)=>i.focusInput&&i.focusInput(...l),["prevent"]),["up"])),t[3]||(t[3]=a.withKeys(a.withModifiers((...l)=>i.arrowLeftPrev&&i.arrowLeftPrev(...l),["prevent"]),["left"])),t[4]||(t[4]=a.withKeys(a.withModifiers((...l)=>i.arrowRightPrev&&i.arrowRightPrev(...l),["prevent"]),["right"]))]},"<",42,Fe),s.isUpDisabled?(a.openBlock(),a.createElementBlock("span",Te,[a.renderSlot(e.$slots,"default")],512)):(a.openBlock(),a.createElementBlock("button",{key:0,ref:"up",class:a.normalizeClass([s.upButtonClasses,"up",{btn:s.bootstrapStyling}]),type:"button",onClick:t[5]||(t[5]=(...l)=>i.selectUpButton&&i.selectUpButton(...l)),onKeydown:[t[6]||(t[6]=a.withKeys(a.withModifiers((...l)=>i.focusTabbableCell&&i.focusTabbableCell(...l),["prevent"]),["down"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...l)=>i.focusInput&&i.focusInput(...l),["prevent"]),["up"])),t[8]||(t[8]=a.withKeys(a.withModifiers((...l)=>i.focusLeftButton&&i.focusLeftButton(...l),["prevent"]),["left"])),t[9]||(t[9]=a.withKeys(a.withModifiers((...l)=>i.focusRightButton&&i.focusRightButton(...l),["prevent"]),["right"]))]},[a.renderSlot(e.$slots,"default")],34)),a.createElementVNode("button",{ref:"next",class:a.normalizeClass(["next",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isNextDisabled,type:"button",onClick:t[10]||(t[10]=l=>s.isRtl?i.goToPreviousPage():i.goToNextPage()),onKeydown:[t[11]||(t[11]=a.withKeys(a.withModifiers((...l)=>i.focusTabbableCell&&i.focusTabbableCell(...l),["prevent"]),["down"])),t[12]||(t[12]=a.withKeys(a.withModifiers((...l)=>i.focusInput&&i.focusInput(...l),["prevent"]),["up"])),t[13]||(t[13]=a.withKeys(a.withModifiers((...l)=>i.arrowLeftNext&&i.arrowLeftNext(...l),["prevent"]),["left"])),t[14]||(t[14]=a.withKeys(a.withModifiers((...l)=>i.arrowRightNext&&i.arrowRightNext(...l),["prevent"]),["right"]))]},">",42,Ne)])}const M=g(Pe,[["render",Ve]]),Be={name:"PickerCells",props:{bootstrapStyling:{type:Boolean,default:!1},cells:{type:Array,required:!0},isRtl:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!0},tabbableCellId:{type:Number,default:null},view:{type:String,validator:e=>["day","month","year"].includes(e),required:!0}},emits:{arrow(e){return typeof e=="object"},select(e){return typeof e=="object"}},computed:{columns(){return this.view==="day"?7:3}},methods:{cellClasses(e){return["cell",this.view,{blank:e.date==="",btn:this.bootstrapStyling,disabled:e.isDisabled,"highlight-start":e.isHighlightStart,"highlight-end":e.isHighlightEnd,highlighted:e.isHighlighted,muted:e.isPreviousMonth||e.isNextMonth,sat:e.isSaturday,sun:e.isSunday,selected:this.showEdgeDates?e.isSelected:e.isSelected&&!e.isPreviousMonth&&!e.isNextMonth,today:this.showEdgeDates?e.isToday:e.isToday&&!e.isPreviousMonth&&!e.isNextMonth,weekend:e.isWeekend}]},handleArrow(e,t){this.$emit("arrow",{cellId:e,delta:t})}}},Ee={class:"picker-cells"},Oe=["data-id","disabled","onClick","onKeypress","onKeydown"];function Ie(e,t,s,n,r,i){return a.openBlock(),a.createElementBlock("div",Ee,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.cells,(l,u)=>(a.openBlock(),a.createElementBlock("button",{key:l.timestamp,class:a.normalizeClass(i.cellClasses(l)),"data-id":u,disabled:l.isDisabled,type:"button",onClick:o=>e.$emit("select",l),onKeypress:[a.withKeys(o=>e.$emit("select",l),["enter"]),a.withKeys(o=>e.$emit("select",l),["space"])],onKeydown:[a.withKeys(a.withModifiers(o=>i.handleArrow(u,-i.columns),["prevent"]),["up"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,i.columns),["prevent"]),["down"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?1:-1),["prevent"]),["left"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?-1:1),["prevent"]),["right"])]},[a.renderSlot(e.$slots,"default",{cell:l})],42,Oe))),128))])}const S=g(Be,[["render",Ie]]),k={props:{bootstrapStyling:{type:Boolean,default:!1},calendarClass:[String,Object,Array],calendarStyle:{type:Object},disabledDates:{type:Object},isTypeable:{type:Boolean,default:!1},isUpDisabled:{type:Boolean,default:!1},language:{type:Object},pageDate:{type:Date,default:null},selectedDate:{type:Date,default:null},slideDuration:{type:Number,default:250},tabbableCellId:{type:Number,default:null},useUtc:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:{select:e=>typeof e=="object",selectedDisabled:e=>typeof e=="object",setFocus:e=>e===["input"]},data(){return{utils:h(this.useUtc,this.language)}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)}},computed:{disabledConfig(){return this.disabledDates?new c(this.utils,this.disabledDates).config:{has:{from:!1,to:!1}}},earliestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getEarliestPossibleDate(this.disabledDates.to):null},isRtl(){return T.indexOf(this.language)!==-1},latestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getLatestPossibleDate(this.disabledDates.from):null},pageYear(){return this.utils.getFullYear(this.pageDate)}},methods:{addMoreSteps(e){return e.stepsRemaining<=0&&Math.abs(e.delta)>1?Math.abs(e.delta):e.stepsRemaining},changePageAndSetFocus(e){const{delta:t}=e;t>0&&this.isNextDisabled||t<0&&this.isPreviousDisabled||(this.changePage({incrementBy:Math.sign(t),focusRefs:["arrow-to-cell"]}),this.$nextTick(()=>{this.setFocusOnNewPage(e)}))},focusInput(){this.isTypeable&&this.$emit("setFocus",["input"])},getElement({currentElement:e,delta:t,stepsRemaining:s}){const n=this.getElementSibling(e,t),r={currentElement:n,delta:t,stepsRemaining:s-1};return n?this.isBeyondPossibleDate(r)?this.firstOrLastPossibleDate(r):this.isMutedOrDisabled(n)?(r.stepsRemaining=this.addMoreSteps(r),this.getElement(r)):s>1&&r.currentElement?this.getElement(r):n:this.changePageAndSetFocus(r)},getElementSibling(e,t){return t>0?e.nextElementSibling:e.previousElementSibling},getFirstOrLastElement(e){const t=e>0,s=this.$refs.cells.$el.children;return t?s[0]:s[s.length-1]},firstOrLastPossibleDate({currentElement:e,delta:t}){return t>0?this.getElementSibling(e,-1):this.getElementSibling(e,1)},handleArrow({delta:e}){const t=document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement,s=Math.abs(e),n={currentElement:t,delta:e,stepsRemaining:s};this.setFocusToAvailableCell(n)},select(e){e.isDisabled?this.$emit("selectedDisabled",e):this.$emit("select",e)},isBeyondPossibleDate({currentElement:e,delta:t}){return t>0&&this.latestPossibleDate?this.isDatePossible(e,t):t<0&&this.earliestPossibleDate?this.isDatePossible(e,t):!1},isDatePossible(e,t){const s=e.getAttribute("data-id"),n=new Date(this.cells[s].timestamp);return t>0?n>this.latestPossibleDate:n<this.earliestPossibleDate},isMutedOrDisabled(e){const t=e.classList.value.split(" ").includes("muted"),s=e.disabled;return t||s},setFocusOnNewPage({delta:e,stepsRemaining:t}){const s=this.getFirstOrLastElement(e),n={currentElement:s,delta:e,stepsRemaining:t};if(t<=0){if(this.isMutedOrDisabled(s)){n.stepsRemaining=Math.abs(n.delta),setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration);return}setTimeout(()=>{s.focus()},this.slideDuration);return}setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration)},setFocusToAvailableCell(e){const t=this.getElement(e);t&&t.focus()}}};class v{constructor(t,s,n){this._utils=t,this._disabledDates=s,this._highlighted=n}get config(){const t=this._highlighted,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to"),includeDisabled:s.isDefined(t,"includeDisabled")&&t.includeDisabled};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}isDateDisabled(t){const s=this._utils,n=this._disabledDates;return new c(s,n).isDateDisabled(t)}isHighlightingNotPossible(t){return!this.config.has.includeDisabled&&this.isDateDisabled(t)}isDateHighlightedVia(t){const s=this._highlighted,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:r}=s,i=y(this._utils);return r.some(l=>{const u=i.isDefined(l,"from"),o=i.isDefined(l,"to");return u&&o&&t<=l.to&&t>=l.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(r=>this._utils.compareDates(t,r)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isDateHighlighted(t){if(this.isHighlightingNotPossible(t))return!1;const s=this.isDateHighlightedVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isHighlightStart(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].from.valueOf()===t.valueOf())return!0;return!1}isHighlightEnd(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].to.valueOf()===t.valueOf())return!0;return!1}}const Ae={name:"PickerDay",components:{PickerHeader:M,PickerCells:S},mixins:[k],props:{dayCellContent:{type:Function,default:e=>e.date},firstDayOfWeek:{type:String},highlighted:{type:Object,default(){return{}}},mondayFirst:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!1},showFullMonthName:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean,default:!1}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="month"},computed:{currMonthName(){return this.showFullMonthName?this.utils.getMonthName(this.pageMonth):this.utils.getMonthNameAbbr(this.pageMonth)},currYearName(){const e=C[this.language]||"";return`${this.pageYear}${e}`},days(){const e=[],t=this.daysFromPrevMonth+this.daysInMonth+this.daysFromNextMonth,s=this.firstDayCellDate();for(let n=0;n<t;n++)e.push(this.makeDay(s)),this.utils.setDate(s,this.utils.getDate(s)+1);return e},daysFromNextMonth(){const e=this.daysFromPrevMonth+this.daysInMonth;return Math.ceil(e/7)*7-e},daysFromPrevMonth(){const e=this.utils.getDay(this.pageDate);return(7-this.firstDayOfWeekNumber+e)%7},daysInMonth(){return this.utils.getDaysInMonth(this.pageDate)},daysOfWeek(){return this.utils.getDaysStartingOn(this.firstDayOfWeekNumber,this.twoLetterAbbr)},firstDayOfWeekNumber(){return this.mondayFirst?1:this.firstDayOfWeek?this.utils.getDayFromAbbr(this.firstDayOfWeek):0},firstOfNextMonth(){const e=new Date(this.pageDate);return new Date(this.utils.setMonth(e,this.utils.getMonth(e)+1))},isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.month<=this.pageMonth&&this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.month>=this.pageMonth&&this.disabledConfig.to.year>=this.pageYear:!1},pageMonth(){return this.utils.getMonth(this.pageDate)},pageTitleDay(){return me.indexOf(this.language.code)!==-1?`${this.currYearName} ${this.currMonthName}`:`${this.currMonthName} ${this.currYearName}`}},methods:{firstDayCellDate(){const e=new Date(this.pageDate);return new Date(this.utils.setDate(e,1-this.daysFromPrevMonth))},changeMonth({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setMonth(s,this.utils.getMonth(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeMonth({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeMonth({incrementBy:e,focusRefs:t})},isSelectedDate(e){return this.selectedDate&&this.utils.compareDates(this.selectedDate,e)},isDisabledDate(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},isHighlightedDate(e){return this.highlighted?new v(this.utils,this.disabledDates,this.highlighted).isDateHighlighted(e):!1},isHighlightStart(e){return this.highlighted?new v(this.utils,this.disabledDates,this.highlighted).isHighlightStart(e):!1},isHighlightEnd(e){return this.highlighted?new v(this.utils,this.disabledDates,this.highlighted).isHighlightEnd(e):!1},makeDay(e){const{utils:t}=this,s=t.getDay(e),n=e>=this.firstOfNextMonth,r=e<this.pageDate,i=s===6,l=s===0;return{date:this.showEdgeDates||!(r||n)?t.getDate(e):"",timestamp:e.getTime(),isSelected:this.isSelectedDate(e),isDisabled:this.isDisabledDate(e),isHighlighted:this.isHighlightedDate(e),isHighlightStart:this.isHighlightStart(e),isHighlightEnd:this.isHighlightEnd(e),isToday:t.compareDates(e,new Date),isWeekend:i||l,isSaturday:i,isSunday:l,isPreviousMonth:r,isNextMonth:n}}}};function Ye(e,t,s,n,r,i){const l=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"month","up-button-classes":"day__month_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleDay),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createElementVNode("div",{class:a.normalizeClass({"flex-rtl":e.isRtl})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysOfWeek,o=>(a.openBlock(),a.createElementBlock("span",{class:"cell day-header",key:o.timestamp},a.toDisplayString(o),1))),128)),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.days,"is-rtl":e.isRtl,"show-edge-dates":s.showEdgeDates,"tabbable-cell-id":e.tabbableCellId,view:"day",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(s.dayCellContent(o)),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","show-edge-dates","tabbable-cell-id"])],2)],38)),[[a.vShow,e.visible]])}const Ue=g(Ae,[["render",Ye]]),xe={name:"PickerMonth",components:{PickerHeader:M,PickerCells:S},mixins:[k],emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="year"},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageYear:!1},months(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(e.getUTCFullYear(),0,e.getUTCDate())):new Date(e.getFullYear(),0,e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<12;n++)t.push({month:this.utils.getMonthName(s),timestamp:s.getTime(),isDisabled:this.isDisabledMonth(s),isSelected:this.isSelectedMonth(s),isToday:this.isTodayMonth(s)}),this.utils.setMonth(s,this.utils.getMonth(s)+1);return t},pageTitleMonth(){const e=C[this.language]||"";return`${this.pageYear}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e,focusRefs:t})},isSelectedMonth(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)&&this.utils.getMonth(this.selectedDate)===this.utils.getMonth(e)},isDisabledMonth(e){return this.disabledDates?new c(this.utils,this.disabledDates).isMonthDisabled(e):!1},isTodayMonth(e){const{utils:t}=this,s=new Date(t.setDate(t.getNewDateObject(),1));return t.compareDates(e,s)}}};function He(e,t,s,n,r,i){const l=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"year","up-button-classes":"month__year_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleMonth),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.months,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"month",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.month),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const $e=g(xe,[["render",He]]),We={name:"PickerYear",components:{PickerHeader:M,PickerCells:S},mixins:[k],props:{highlighted:{type:Object,default(){return{}}}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t))},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageDecadeEnd:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageDecadeStart:!1},pageDecadeStart(){return Math.floor(this.pageYear/10)*10},pageDecadeEnd(){return this.pageDecadeStart+10-1},years(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(Math.floor(e.getUTCFullYear()/10)*10,e.getUTCMonth(),e.getUTCDate())):new Date(Math.floor(e.getFullYear()/10)*10,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<10;n++)t.push({year:this.utils.getFullYear(s),timestamp:s.getTime(),isDisabled:this.isDisabledYear(s),isSelected:this.isSelectedYear(s),isToday:this.isTodayYear(s)}),this.utils.setFullYear(s,this.utils.getFullYear(s)+1);return t},pageTitleYear(){const e=C[this.language]||"";return`${this.pageDecadeStart} - ${this.pageDecadeEnd}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e*10,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e*10,focusRefs:t})},isSelectedYear(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)},isDisabledYear(e){return this.disabledDates?new c(this.utils,this.disabledDates).isYearDisabled(e):!1},isTodayYear(e){const{utils:t}=this,s=t.getFullYear(t.getNewDateObject());return t.getFullYear(e)===s}}};function Le(e,t,s,n,r,i){const l=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[4]||(t[4]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":!0,onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleYear),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.years,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"year",onArrow:t[2]||(t[2]=o=>e.handleArrow(o)),onSelect:t[3]||(t[3]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.year),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const Re=g(We,[["render",Le]]);const Ke={name:"DatePicker",components:{DateInput:Me,PickerDay:Ue,PickerMonth:$e,PickerYear:Re},mixins:[N,ke],props:{calendarClass:{type:[String,Object,Array],default:""},dayCellContent:{type:Function},disabledDates:{type:Object},firstDayOfWeek:{type:String},fullMonthName:{type:Boolean},highlighted:{type:Object},initialView:{type:String,default:""},language:{type:Object,default(){return b}},maximumView:{type:String,default:"year"},minimumView:{type:String,default:"day"},mondayFirst:{type:Boolean},openDate:{validator:e=>P.validateDateInput(e)},parseTypedDate:{type:Function},showEdgeDates:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean},value:{validator:e=>P.validateDateInput(e)},wrapperClass:{type:[String,Object,Array],default:""}},emits:{changedMonth:e=>typeof e=="object",changedYear:e=>typeof e=="object",changedDecade:e=>typeof e=="object",cleared:null,closed:null,input:e=>e instanceof Date||e===null,opened:null,selected:e=>e instanceof Date||e===null,selectedDisabled:e=>typeof e=="object"},data(){const e=this.openDate?new Date(this.openDate):new Date,t=h(this.useUtc,this.language);return{calendarHeight:0,latestValidTypedDate:null,pageTimestamp:t.setDate(e,1),selectedDate:null,slideDuration:250,resetTypedDate:new Date,utils:t,view:""}},watch:{disabledDates:{handler(){const e=this.selectedDate||this.parseValue(this.value);if(e){if(this.isDateDisabled(e)&&e){this.setDate(null);return}this.dateHasChanged(e)&&this.setDate(e)}},deep:!0},initialView(){this.isOpen&&this.setInitialView()},language(e){this.utils=h(this.useUtc,e)},latestValidTypedDate(e){this.setPageDate(e)},useUtc(e){this.utils=h(e,this.language)},value(e){this.setValue(e)},openDate(){this.setPageDate()}},computed:{computedInitialView(){return this.initialView?this.initialView:this.minimumView},computedOpenDate(){const e=this.parseValue(this.openDate),t=this.utils.getNewDateObject(e),s=this.selectedDate||t;return this.minimumView==="day"?s:new Date(this.utils.setDate(s,1))},calendarStyle(){return{position:this.isInline?"static":void 0}},isInline(){return!!this.inline},isOpen(){return this.view!==""},isRtl(){return T.indexOf(this.language)!==-1},isUpDisabled(){return!this.allowedToShowView(this.nextView.up)},nextView(){const e=["day","month","year"],t=i=>i===this.view,s=e.findIndex(t),n=i=>i<=0?void 0:e[i-1];return{up:(i=>{if(!(i<0))return i===e.length-1?"decade":e[i+1]})(s),down:n(s)}},pageDate(){return new Date(this.pageTimestamp)},picker(){const e=this.view||this.computedInitialView;return`Picker${this.ucFirst(e)}`}},methods:{resetDefaultPageDate(){if(this.selectedDate===null){this.setPageDate();return}this.setPageDate(this.selectedDate)},open(){if(this.disabled||this.isInline)return!1;this.setInitialView(),this.reviewFocus(),this.$emit("opened")},parseValue(e){if(typeof e=="string"||typeof e=="number"){const t=new Date(e);return this.utils.isValidDate(t)?t:null}return this.utils.isValidDate(e)?e:null},selectTypedDate(e){this.setDate(e.getTime()),this.reviewFocus(),this.isOpen&&this.close()},setInitialView(){const e=this.computedInitialView;if(!this.allowedToShowView(e))throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`);this.setView(e)},allowedToShowView(e){const t=["day","month","year"],s=t.indexOf(this.minimumView),n=t.indexOf(this.maximumView),r=t.indexOf(e);return r>=s&&r<=n},setDate(e){const t=new Date(e);this.selectedDate=t,this.setPageDate(t),this.$emit("selected",t),this.$emit("input",t)},clearDate(){this.selectedDate=null,this.setPageDate(),this.$emit("selected",null),this.$emit("input",null),this.focus.refs=["input"],this.close(),this.$emit("cleared")},handleSelect(e){if(this.allowedToShowView(this.nextView.down)){this.showNextViewDown(e);return}this.$refs.dateInput.typedDate="",this.setDate(e.timestamp),this.focus.delay=e.isNextMonth?this.slideDuration:0,this.focus.refs=this.isInline?["tabbableCell"]:["input"],this.close(),this.reviewFocus(),this.resetTypedDate=new Date},selectDisabledDate(e){this.$emit("selectedDisabled",e)},setValue(e){if(typeof e=="string"||typeof e=="number"){const t=this.utils.parseDate(e,this.format);e=isNaN(t.valueOf())?null:t}this.selectedDate=e||null,this.setPageDate(e),this.typeable&&(this.latestValidTypedDate=e||this.computedOpenDate)},setView(e){this.allowedToShowView(e)&&(this.view=e)},setPageDate(e){e||(this.openDate?e=new Date(this.openDate):e=new Date),this.pageTimestamp=this.utils.setDate(new Date(e),1)},setTypedDate(e){const t=new Date(this.pageDate);if(this.latestValidTypedDate=e||this.computedOpenDate,this.setPageDate(e),this.isPageChange(t)){this.handlePageChange({focusRefs:[],pageDate:this.pageDate});return}this.setTabbableCell()},close(){this.isInline||(this.view="",this.isClickOutside?this.isClickOutside=!1:this.reviewFocus(),this.$emit("closed"))},handlePageChange({focusRefs:e,pageDate:t}){this.setPageDate(t),this.focus.refs=e,this.focus.delay=this.slideDuration||250,this.reviewFocus(),this.$emit(`changed${this.ucFirst(this.nextView.up)}`,t)},hasClass(e,t){return e&&e.className.split(" ").includes(t)},isPageChange(e){return this.isOpen?e.valueOf()!==this.pageDate.valueOf():!1},init(){this.typeable&&(this.latestValidTypedDate=this.selectedDate||this.computedOpenDate),this.value&&this.setValue(this.value),this.isInline&&this.setInitialView()},isDateDisabled(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},showNextViewDown(e){this.setPageDate(new Date(e.timestamp)),this.$emit(`changed${this.ucFirst(this.view)}`,e),this.setView(this.nextView.down)},ucFirst(e){return e[0].toUpperCase()+e.substring(1)}},mounted(){this.init()}};function je(e,t,s,n,r,i){const l=a.resolveComponent("date-input");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vdp-datepicker",[s.wrapperClass,i.isRtl?"rtl":""]])},[a.createVNode(l,{id:e.id,ref:"dateInput",autofocus:e.autofocus,"bootstrap-styling":e.bootstrapStyling,"calendar-button":e.calendarButton,"calendar-button-icon":e.calendarButtonIcon,"calendar-button-icon-content":e.calendarButtonIconContent,"clear-button":e.clearButton,"clear-button-icon":e.clearButtonIcon,disabled:e.disabled,format:e.format,inline:e.inline,"input-class":e.inputClass,"is-open":i.isOpen,language:s.language,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,"parse-typed-date":s.parseTypedDate,pattern:e.pattern,placeholder:e.placeholder,"ref-name":e.refName,required:e.required,"reset-typed-date":r.resetTypedDate,"selected-date":r.selectedDate,"show-calendar-on-focus":e.showCalendarOnFocus,tabindex:e.tabindex,typeable:e.typeable,"use-utc":e.useUtc,onClearDate:i.clearDate,onCloseCalendar:i.close,onOpen:i.open,onSelectTypedDate:i.selectTypedDate,onSetFocus:t[0]||(t[0]=u=>e.setFocus(u)),onTypedDate:i.setTypedDate},{calendarBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"calendarBtn")]),beforeDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeDateInput")]),clearBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"clearBtn")]),afterDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"afterDateInput")]),_:3},8,["id","autofocus","bootstrap-styling","calendar-button","calendar-button-icon","calendar-button-icon-content","clear-button","clear-button-icon","disabled","format","inline","input-class","is-open","language","maxlength","name","open-date","parse-typed-date","pattern","placeholder","ref-name","required","reset-typed-date","selected-date","show-calendar-on-focus","tabindex","typeable","use-utc","onClearDate","onCloseCalendar","onOpen","onSelectTypedDate","onTypedDate"]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.picker),{ref:"picker","bootstrap-styling":e.bootstrapStyling,calendarClass:s.calendarClass,calendarStyle:i.calendarStyle,dayCellContent:s.dayCellContent,disabledDates:s.disabledDates,firstDayOfWeek:s.firstDayOfWeek,highlighted:s.highlighted,"is-typeable":e.typeable,"is-up-disabled":i.isUpDisabled,language:s.language,mondayFirst:s.mondayFirst,pageDate:i.pageDate,selectedDate:r.selectedDate,showEdgeDates:s.showEdgeDates,showFullMonthName:s.fullMonthName,"slide-duration":r.slideDuration,"tabbable-cell-id":e.tabbableCellId,twoLetterAbbr:s.twoLetterAbbr,"use-utc":e.useUtc,visible:i.isOpen,onPageChange:i.handlePageChange,onSelect:i.handleSelect,onSetFocus:t[1]||(t[1]=u=>e.setFocus(u)),onSetView:i.setView,onSelectedDisabled:i.selectDisabledDate},{beforeCalendarHeader:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeCalendarHeader")]),_:3},40,["bootstrap-styling","calendarClass","calendarStyle","dayCellContent","disabledDates","firstDayOfWeek","highlighted","is-typeable","is-up-disabled","language","mondayFirst","pageDate","selectedDate","showEdgeDates","showFullMonthName","slide-duration","tabbable-cell-id","twoLetterAbbr","use-utc","visible","onPageChange","onSelect","onSetView","onSelectedDisabled"]))],2)}const ze=g(Ke,[["render",je]]);module.exports=ze;
*/const d=require("date-fns"),a=require("vue");function w(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):e.defaultWidth,n=e.formats[s]||e.formats[e.defaultWidth];return n}}function m(e){return function(t,s){var n=s!=null&&s.context?String(s.context):"standalone",l;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,r=s!=null&&s.width?String(s.width):i;l=e.formattingValues[r]||e.formattingValues[i]}else{var u=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;l=e.values[o]||e.values[u]}var f=e.argumentCallback?e.argumentCallback(t):t;return l[f]}}function p(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,l=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(l);if(!i)return null;var r=i[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(u)?E(u,function(D){return D.test(r)}):B(u,function(D){return D.test(r)}),f;f=e.valueCallback?e.valueCallback(o):o,f=s.valueCallback?s.valueCallback(f):f;var V=t.slice(r.length);return{value:f,rest:V}}}function B(e,t){for(var s in e)if(e.hasOwnProperty(s)&&t(e[s]))return s}function E(e,t){for(var s=0;s<e.length;s++)if(t(e[s]))return s}function O(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var l=n[0],i=t.match(e.parsePattern);if(!i)return null;var r=e.valueCallback?e.valueCallback(i[0]):i[0];r=s.valueCallback?s.valueCallback(r):r;var u=t.slice(l.length);return{value:r,rest:u}}}var I={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},A=function(t,s,n){var l,i=I[t];return typeof i=="string"?l=i:s===1?l=i.one:l=i.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+l:l+" ago":l};const Y=A;var U={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},x={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},W={date:w({formats:U,defaultWidth:"full"}),time:w({formats:x,defaultWidth:"full"}),dateTime:w({formats:H,defaultWidth:"full"})};const $=W;var L={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R=function(t,s,n,l){return L[t]};const K=R;var j={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},J={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},X={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Q={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},G=function(t,s){var n=Number(t),l=n%100;if(l>20||l<10)switch(l%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Z={ordinalNumber:G,era:m({values:j,defaultWidth:"wide"}),quarter:m({values:z,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:m({values:q,defaultWidth:"wide"}),day:m({values:J,defaultWidth:"wide"}),dayPeriod:m({values:X,defaultWidth:"wide",formattingValues:Q,defaultFormattingWidth:"wide"})};const _=Z;var ee=/^(\d+)(th|st|nd|rd)?/i,te=/\d+/i,se={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ae={any:[/^b/i,/^(a|c)/i]},ie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ne={any:[/1/i,/2/i,/3/i,/4/i]},re={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},le={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ue={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},de={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},he={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ce={ordinalNumber:O({matchPattern:ee,parsePattern:te,valueCallback:function(t){return parseInt(t,10)}}),era:p({matchPatterns:se,defaultMatchWidth:"wide",parsePatterns:ae,defaultParseWidth:"any"}),quarter:p({matchPatterns:ie,defaultMatchWidth:"wide",parsePatterns:ne,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:p({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:le,defaultParseWidth:"any"}),day:p({matchPatterns:oe,defaultMatchWidth:"wide",parsePatterns:ue,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:de,defaultMatchWidth:"any",parsePatterns:he,defaultParseWidth:"any"})};const fe=ce;var ge={code:"en-US",formatDistance:Y,formatLong:$,formatRelative:K,localize:_,match:fe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const b=ge,F={useUtc:!1,language:b,getFullYear(e){return this.useUtc?e.getUTCFullYear():e.getFullYear()},getMonth(e){return this.useUtc?e.getUTCMonth():e.getMonth()},getDaysInMonth(e){return this.daysInMonth(this.getFullYear(e),this.getMonth(e))},getDate(e){return this.useUtc?e.getUTCDate():e.getDate()},getDay(e){return this.useUtc?e.getUTCDay():e.getDay()},getHours(e){return this.useUtc?e.getUTCHours():e.getHours()},getMinutes(e){return this.useUtc?e.getUTCMinutes():e.getMinutes()},setFullYear(e,t){return this.useUtc?e.setUTCFullYear(t):e.setFullYear(t)},setMonth(e,t){return this.useUtc?e.setUTCMonth(t):e.setMonth(t)},setDate(e,t){return this.useUtc?e.setUTCDate(t):e.setDate(t)},compareDates(e,t){const s=new Date(e.getTime()),n=new Date(t.getTime());return this.useUtc?(s.setUTCHours(0,0,0,0),n.setUTCHours(0,0,0,0)):(s.setHours(0,0,0,0),n.setHours(0,0,0,0)),s.getTime()===n.getTime()},isValidDate(e){return Object.prototype.toString.call(e)!=="[object Date]"?!1:!isNaN(e.getTime())},getDayNameAbbr(e){if(typeof e!="object")throw TypeError("Invalid Type");return d.format(e,"ccc",{locale:this.language})},getDayFromAbbr(e){const t=new Date,s=[0,1,2,3,4,5,6];let n=s.map(l=>d.format(d.setDay(t,l),"ccc",{locale:b}));for(let l=0;l<n.length;l++)if(e.toLowerCase()===n[l].toLowerCase())return l;if(this.language!==b){n=s.map(l=>d.format(d.setDay(t,l),"ccc",{locale:this.language}));for(let l=0;l<n.length;l++)if(e.toLowerCase()===n[l].toLowerCase())return l}throw TypeError("Invalid week day")},getMonthName(e){if(typeof e=="object")return d.format(e,"LLLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLLL",{locale:this.language});throw TypeError("Invalid type")},getMonthNameAbbr(e){if(typeof e=="object")return d.format(e,"LLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLL",{locale:this.language});throw TypeError("Invalid type")},daysInMonth(e,t){return/8|3|5|10/.test(t)?30:t===1?!(e%4)&&e%100||!(e%400)?29:28:31},getNthSuffix(e){switch(e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},getDaysStartingOn(e,t=!1){const s=new Date,n=[0,1,2,3,4,5,6];let l="ccc";return t&&(l="cccccc"),n.map(i=>d.format(d.setDay(s,i+e),l,{locale:this.language}))},formatDate(e,t){return d.format(e,t,{locale:this.language})},parseDate(e,t="yyyy-MM-dd"){if(typeof e=="string")return d.parse(e,t,new Date,{locale:this.language});if(typeof e=="number")return d.toDate(e)},validateDateInput(e){return e===null||e instanceof Date||typeof e=="string"||typeof e=="number"},resetDateTime(e){return new Date(this.useUtc?e.setUTCHours(0,0,0,0):e.setHours(0,0,0,0))},getNewDateObject(e){return e?this.resetDateTime(new Date(e)):this.resetDateTime(new Date)}},h=(e=!1,t=b)=>({...F,useUtc:e,language:t}),P={...F},T=["dv","fa","ha","he","kwh","ks","ku","ps","ur","yi"],me=["ja","lt","mn","ko"],C={zh:"年",ja:"年",ko:"년"},N={props:{autofocus:{type:Boolean,default:!1},bootstrapStyling:{type:Boolean,default:!1},clearButton:{type:Boolean,default:!1},clearButtonIcon:{type:String,default:null},calendarButton:{type:Boolean,default:!1},calendarButtonIcon:{type:String,default:null},calendarButtonIconContent:{type:String,default:null},disabled:{type:Boolean,default:!1},format:{type:[String,Function],default:"dd MMM yyyy"},id:{type:String,default:null},inline:{type:Boolean,default:!1},inputClass:{type:[String,Object,Array],default:null},maxlength:{type:[Number,String],default:null},name:{type:String,default:null},pattern:{type:String,default:null},placeholder:{type:String,default:null},refName:{type:String,default:""},required:{type:Boolean,default:!1},showCalendarOnFocus:{type:Boolean,default:!1},tabindex:{type:[Number,String],default:null},typeable:{type:Boolean,default:!1},useUtc:{type:Boolean,default:!1}}},g=(e,t)=>{const s=e.__vccOpts||e;for(const[n,l]of t)s[n]=l;return s},pe={name:"DateInput",mixins:[N],props:{isOpen:{type:Boolean,default:!1},language:{type:Object},openDate:Date,parseTypedDate:Function,resetTypedDate:[Date],selectedDate:{type:Date,default:null}},emits:{clearDate:null,closeCalendar:null,open:null,selectTypedDate:e=>e===null||e instanceof Date,setFocus:e=>e.every(t=>["calendarButton","input","prev","up","next","tabbableCell"].includes(t)),typedDate:e=>e===null||e instanceof Date},data(){return{input:null,typedDate:!1,utils:h(this.useUtc,this.language)}},computed:{formattedValue(){return this.selectedDate?this.typedDate?this.typedDate:typeof this.format=="function"?this.format(this.selectedDate):this.utils.formatDate(this.selectedDate,this.format):null},computedInputClass(){return this.bootstrapStyling?typeof this.inputClass=="string"?[this.inputClass,"form-control"].join(" "):{"form-control":!0,...this.inputClass}:this.inputClass}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)},resetTypedDate(){this.typedDate=!1}},mounted(){this.input=this.$el.querySelector("input")},methods:{showCalendar(){this.showCalendarOnFocus||this.toggle()},showFocusCalendar(){this.showCalendarOnFocus&&!this.isOpen&&this.$emit("open")},handleKeydownDown(){this.isOpen||this.$emit("open"),this.typeable&&this.$emit("setFocus",["prev","up","next","tabbableCell"])},handleKeydownEnter(){if(!this.typeable)return;if(!this.input.value){this.$emit("selectTypedDate",null);return}const e=this.getTypedDate(this.input.value);isNaN(e)||(this.typedDate=this.input.value,this.$emit("selectTypedDate",e))},handleKeydownEscape(){this.$emit("closeCalendar")},handleKeydownSpace(e){this.typeable||e.preventDefault()},keyUp(e){if(!(!this.typeable||["Control","Escape","Shift","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))){if(!this.input.value){this.$emit("typedDate",null);return}if(this.typeable){const t=this.getTypedDate(this.input.value);isNaN(t)||(this.typedDate=this.input.value,this.$emit("typedDate",t))}}},handleKeyupSpace(e){if(this.typeable){this.input.value===""&&this.toggle();return}e.preventDefault(),this.toggle()},inputBlurred(){this.typeable&&isNaN(this.getTypedDate(this.input.value))&&(this.clearDate(),this.input.value=null,this.typedDate=null)},handleDelete(){!this.typeable&&this.selectedDate&&this.clearDate()},clearDate(){this.$emit("clearDate")},getTypedDate(e){return typeof this.parseTypedDate=="function"?this.parseTypedDate(e):this.utils.parseDate(e,typeof this.format=="string"?this.format:void 0)},toggle(e){this.isOpen&&this.$emit("setFocus",[e||"input"]),this.$emit(this.isOpen?"closeCalendar":"open")}}},be=["disabled"],ye={key:0},De=["id","autofocus","clear-button","disabled","maxlength","name","open-date","pattern","placeholder","readonly","required","tabindex","type","value"],we=["disabled"],ve={key:0};function Ce(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"input-group":e.bootstrapStyling})},[e.calendarButton?(a.openBlock(),a.createElementBlock("button",{key:0,ref:"calendarButton",class:a.normalizeClass(["vdp-datepicker__calendar-button",{"btn input-group-prepend":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[0]||(t[0]=r=>i.toggle("calendarButton"))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"calendarBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.calendarButtonIcon)},[a.createTextVNode(a.toDisplayString(e.calendarButtonIconContent)+" ",1),e.calendarButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",ye,"…"))],2)])],2)],10,be)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"beforeDateInput"),a.createElementVNode("input",{id:e.id,ref:e.refName,autocomplete:"off",autofocus:e.autofocus,class:a.normalizeClass(i.computedInputClass),"clear-button":e.clearButton,disabled:e.disabled,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,pattern:e.pattern,placeholder:e.placeholder,readonly:!e.typeable,required:e.required,tabindex:e.tabindex,type:e.inline?"hidden":"text",value:i.formattedValue,onBlur:t[1]||(t[1]=(...r)=>i.inputBlurred&&i.inputBlurred(...r)),onClick:t[2]||(t[2]=(...r)=>i.showCalendar&&i.showCalendar(...r)),onFocus:t[3]||(t[3]=(...r)=>i.showFocusCalendar&&i.showFocusCalendar(...r)),onKeydown:[t[4]||(t[4]=a.withKeys((...r)=>i.handleDelete&&i.handleDelete(...r),["delete"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownDown&&i.handleKeydownDown(...r),["prevent"]),["down"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownEnter&&i.handleKeydownEnter(...r),["prevent"]),["enter"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownEscape&&i.handleKeydownEscape(...r),["prevent"]),["esc"])),t[8]||(t[8]=a.withKeys(r=>i.handleKeydownSpace(r),["space"]))],onKeyup:[t[9]||(t[9]=(...r)=>i.keyUp&&i.keyUp(...r)),t[10]||(t[10]=a.withKeys(r=>i.handleKeyupSpace(r),["space"]))]},null,42,De),e.clearButton&&s.selectedDate?(a.openBlock(),a.createElementBlock("button",{key:1,class:a.normalizeClass(["vdp-datepicker__clear-button",{"btn input-group-append":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[11]||(t[11]=(...r)=>i.clearDate&&i.clearDate(...r))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"clearBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.clearButtonIcon)},[e.clearButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",ve,"×"))],2)])],2)],10,we)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"afterDateInput")],2)}const Me=g(pe,[["render",Ce]]),Se={isDefined(e,t){return e&&typeof e[t]<"u"},hasArray(e,t){return e&&Array.isArray(e[t])},hasDate(e,t){return this.isDefined(e,t)&&this.utils.isValidDate(e[t])},dayMonthYear(e,t){const{utils:s}=this;if(!this.hasDate(e,t))return{day:void 0,month:void 0,year:void 0};const l=e[t];return{day:s.getDate(l),month:s.getMonth(l),year:s.getFullYear(l)}}},y=e=>({...Se,utils:e});class c{constructor(t,s){this._utils=t,this._disabledDates=s}get config(){const t=this._disabledDates,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to")};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}daysInMonth(t){const s=this._utils,n=s.getMonth(t),l=s.getFullYear(t);return s.daysInMonth(l,n)}isDateDisabledVia(t){const s=this._disabledDates,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:l}=s,i=y(this._utils);return l.some(r=>{const u=i.isDefined(r,"from"),o=i.isDefined(r,"to");return u&&o&&t<r.to&&t>r.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(l=>this._utils.compareDates(t,l)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isMonthDisabledVia(t){const{from:s,has:n,to:l}=this.config,i=this._utils.getMonth(t),r=this._utils.getFullYear(t);return{to:()=>n.to&&r<l.year?!0:n.to&&i<l.month&&r<=l.year,from:()=>n.from&&r>s.year?!0:n.from&&i>s.month&&r>=s.year}}isYearDisabledVia(t){const{from:s,has:n,to:l}=this.config,i=this._utils.getFullYear(t);return{to:()=>n.to&&i<l.year,from:()=>n.from&&i>s.year}}isDateDisabled(t){const s=this.isDateDisabledVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isMonthDisabled(t){const s=this.isMonthDisabledVia(t);if(s.to()||s.from())return!0;for(let n=1;n<=this.daysInMonth(t);n++){const l=new Date(t);if(l.setDate(n),!this.isDateDisabled(l))return!1}return!0}isYearDisabled(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const l=new Date(t);if(l.setMonth(n),!this.isMonthDisabled(l))return!1}return!0}getEarliestPossibleDate(t){if(!t)return null;const s=this._utils;if(this.isDateDisabled(t)){const n=new Date(s.getFullYear(t),s.getMonth(t),s.getDate(t)+1);return this.getEarliestPossibleDate(n)}return t}getLatestPossibleDate(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const l=new Date(t);if(l.setMonth(n),!this.isMonthDisabled(l))return!1}return!0}}const ke={data(){return{focus:{delay:0,refs:[]},navElements:[],navElementsFocusedIndex:0,resetTabbableCell:!1,tabbableCell:null}},computed:{fallbackElementsToFocus(){const e=["tabbableCell","prev","next"];return this.typeable&&e.unshift("input"),e},tabbableCellId(){return this.tabbableCell&&Number(this.tabbableCell.getAttribute("data-id"))}},methods:{getCellDate(e){switch(this.view){case"month":return new Date(this.utils.setDate(e,1));case"year":return new Date(this.utils.setMonth(new Date(this.utils.setDate(e,1)),0));default:return e}},applyFocus(){const e=[...this.focus.refs,...this.fallbackElementsToFocus];for(let t=0;t<e.length;t++){const s=this.getElementByRef(e[t]);if(s&&s.getAttribute("disabled")===null){s.focus(),this.setNavElementsFocusedIndex();break}}},getActiveCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell"),s=this.hasClass(e,this.view);return t&&s&&!this.resetTabbableCell?e:null},getActiveElement(){return document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement},getCellId(e){if(!e||!this.$refs.picker.$refs.cells)return null;const t=this.getCellDate(e),{cells:s}=this.$refs.picker.$refs.cells;for(let n=0;n<s.length;n++)if(s[n].timestamp===t.valueOf())return n;return null},getElementByRef(e){return e==="tabbableCell"?this.tabbableCell:e==="input"?this.$refs.dateInput&&this.$refs.dateInput.$refs[this.refName]:e==="calendarButton"?this.$refs.dateInput&&this.$refs.dateInput.$refs.calendarButton:this.$refs.picker&&this.$refs.picker.$refs.pickerHeader&&this.$refs.picker.$refs.pickerHeader.$refs[e]},getElementsFromSlot(e){if(!this.hasSlot(e))return[];if(e==="beforeCalendarHeader")return this.getFocusableElements(this.$refs.view.children[0]);const t=e.indexOf("beforeCalendarHeader")>-1,s=this.$refs.picker.$el,n=t?0:s.children.length-1;return this.getFocusableElements(s.children[n])},getElementsFromHeader(){if(!this.$refs.picker.$refs.pickerHeader)return[];const t=this.$refs.picker.$refs.pickerHeader.$el.querySelectorAll("button:enabled");return[...Array.prototype.slice.call(t)]},getFocusableElements(e){if(!e)return[];const t=e.querySelectorAll('button:enabled:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]):not([type=hidden]), select:enabled:not([tabindex="-1"]), textarea:enabled:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])');return[...Array.prototype.slice.call(t)]},getInputField(){return!this.typeable||this.inline?null:this.$refs.dateInput.$refs[this.refName]},getTypedCell(){if(!this.typeable)return null;const e=this.getCellId(this.latestValidTypedDate);return e?this.$refs.picker.$refs.cells.$el.children[e]:null},hasSlot(e){return!!this.$slots[e]},reviewFocus(){this.tabbableCell=null,this.resetTabbableCell=!0,this.$nextTick(()=>{this.setNavElements(),setTimeout(()=>{this.applyFocus()},this.focus.delay),this.resetTabbableCell=!1})},setFocus(e){this.focus.refs=e,this.applyFocus()},setNavElements(){if(!this.view)return;this.updateTabbableCell();const e=this.ucFirst(this.view);this.navElements=[this.getInputField(),this.getElementsFromSlot("beforeCalendarHeader"),this.getElementsFromSlot(`beforeCalendarHeader${e}`),this.getElementsFromHeader(),this.tabbableCell].filter(t=>!!t).reduce((t,s)=>t.concat(s),[])},setNavElementsFocusedIndex(){const e=this.getActiveElement();for(let t=0;t<this.navElements.length;t++)if(e===this.navElements[t]){this.navElementsFocusedIndex=t;return}this.navElementsFocusedIndex=0},setTabbableCell(){if(!this.$refs.picker||!this.$refs.picker.$refs.cells)return;const e=this.$refs.picker.$refs.cells.$el;this.tabbableCell=this.getActiveCell()||this.getTypedCell()||e.querySelector("button.selected:not(.muted):enabled")||e.querySelector("button.today:not(.muted):enabled")||e.querySelector("button.cell:not(.muted):enabled")},updateTabbableCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell");(!this.tabbableCell||t)&&this.setTabbableCell()}}},Pe={props:{bootstrapStyling:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,required:!0},isPreviousDisabled:{type:Boolean,required:!0},isRtl:{type:Boolean,required:!0},isUpDisabled:{type:Boolean,default:!1},nextViewUp:{type:String,default:null},upButtonClasses:{type:String}},emits:{focusInput:null,pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>["day","month","year"].includes(e)},computed:{leftButton(){return[this.isRtl?"next":"prev"]},rightButton(){return[this.isRtl?"prev":"next"]}},methods:{arrowLeftPrev(){if(this.isRtl){this.$emit("setFocus",["up","next","tabbableCell"]);return}this.goToPreviousPage()},arrowRightPrev(){if(this.isRtl){this.goToPreviousPage();return}this.$emit("setFocus",["up","next","tabbableCell"])},arrowLeftNext(){if(this.isRtl){this.goToNextPage();return}this.$emit("setFocus",["up","prev","tabbableCell"])},arrowRightNext(){if(this.isRtl){this.$emit("setFocus",["up","prev","tabbableCell"]);return}this.goToNextPage()},focusInput(){this.$emit("focusInput")},focusTabbableCell(){this.$emit("setFocus",["tabbableCell"])},focusLeftButton(){this.$emit("setFocus",this.leftButton)},focusRightButton(){this.$emit("setFocus",this.rightButton)},goToNextPage(){this.$emit("pageChange",{incrementBy:1,focusRefs:["next"]})},goToPreviousPage(){this.$emit("pageChange",{incrementBy:-1,focusRefs:["prev"]})},selectUpButton(){this.isUpDisabled||this.$emit("setView",this.nextViewUp)}}},Fe=["disabled"],Te={key:1,ref:"up"},Ne=["disabled"];function Ve(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("header",null,[a.createElementVNode("button",{ref:"prev",class:a.normalizeClass(["prev",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isPreviousDisabled,type:"button",onClick:t[0]||(t[0]=r=>s.isRtl?i.goToNextPage():i.goToPreviousPage()),onKeydown:[t[1]||(t[1]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[2]||(t[2]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[3]||(t[3]=a.withKeys(a.withModifiers((...r)=>i.arrowLeftPrev&&i.arrowLeftPrev(...r),["prevent"]),["left"])),t[4]||(t[4]=a.withKeys(a.withModifiers((...r)=>i.arrowRightPrev&&i.arrowRightPrev(...r),["prevent"]),["right"]))]},"<",42,Fe),s.isUpDisabled?(a.openBlock(),a.createElementBlock("span",Te,[a.renderSlot(e.$slots,"default")],512)):(a.openBlock(),a.createElementBlock("button",{key:0,ref:"up",class:a.normalizeClass([s.upButtonClasses,"up",{btn:s.bootstrapStyling}]),type:"button",onClick:t[5]||(t[5]=(...r)=>i.selectUpButton&&i.selectUpButton(...r)),onKeydown:[t[6]||(t[6]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[8]||(t[8]=a.withKeys(a.withModifiers((...r)=>i.focusLeftButton&&i.focusLeftButton(...r),["prevent"]),["left"])),t[9]||(t[9]=a.withKeys(a.withModifiers((...r)=>i.focusRightButton&&i.focusRightButton(...r),["prevent"]),["right"]))]},[a.renderSlot(e.$slots,"default")],34)),a.createElementVNode("button",{ref:"next",class:a.normalizeClass(["next",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isNextDisabled,type:"button",onClick:t[10]||(t[10]=r=>s.isRtl?i.goToPreviousPage():i.goToNextPage()),onKeydown:[t[11]||(t[11]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[12]||(t[12]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[13]||(t[13]=a.withKeys(a.withModifiers((...r)=>i.arrowLeftNext&&i.arrowLeftNext(...r),["prevent"]),["left"])),t[14]||(t[14]=a.withKeys(a.withModifiers((...r)=>i.arrowRightNext&&i.arrowRightNext(...r),["prevent"]),["right"]))]},">",42,Ne)])}const M=g(Pe,[["render",Ve]]),Be={name:"PickerCells",props:{bootstrapStyling:{type:Boolean,default:!1},cells:{type:Array,required:!0},isRtl:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!0},tabbableCellId:{type:Number,default:null},view:{type:String,validator:e=>["day","month","year"].includes(e),required:!0}},emits:{arrow(e){return typeof e=="object"},select(e){return typeof e=="object"}},computed:{columns(){return this.view==="day"?7:3}},methods:{cellClasses(e){return["cell",this.view,{blank:e.date==="",btn:this.bootstrapStyling,disabled:e.isDisabled,"highlight-start":e.isHighlightStart,"highlight-end":e.isHighlightEnd,highlighted:e.isHighlighted,muted:e.isPreviousMonth||e.isNextMonth,sat:e.isSaturday,sun:e.isSunday,selected:this.showEdgeDates?e.isSelected:e.isSelected&&!e.isPreviousMonth&&!e.isNextMonth,today:this.showEdgeDates?e.isToday:e.isToday&&!e.isPreviousMonth&&!e.isNextMonth,weekend:e.isWeekend}]},handleArrow(e,t){this.$emit("arrow",{cellId:e,delta:t})}}},Ee={class:"picker-cells"},Oe=["data-id","disabled","onClick","onKeypress","onKeydown"];function Ie(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("div",Ee,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.cells,(r,u)=>(a.openBlock(),a.createElementBlock("button",{key:r.timestamp,class:a.normalizeClass(i.cellClasses(r)),"data-id":u,disabled:r.isDisabled,type:"button",onClick:o=>e.$emit("select",r),onKeypress:[a.withKeys(o=>e.$emit("select",r),["enter"]),a.withKeys(o=>e.$emit("select",r),["space"])],onKeydown:[a.withKeys(a.withModifiers(o=>i.handleArrow(u,-i.columns),["prevent"]),["up"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,i.columns),["prevent"]),["down"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?1:-1),["prevent"]),["left"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?-1:1),["prevent"]),["right"])]},[a.renderSlot(e.$slots,"default",{cell:r})],42,Oe))),128))])}const S=g(Be,[["render",Ie]]),k={props:{bootstrapStyling:{type:Boolean,default:!1},calendarClass:[String,Object,Array],calendarStyle:{type:Object},disabledDates:{type:Object},isTypeable:{type:Boolean,default:!1},isUpDisabled:{type:Boolean,default:!1},language:{type:Object},pageDate:{type:Date,default:null},selectedDate:{type:Date,default:null},slideDuration:{type:Number,default:250},tabbableCellId:{type:Number,default:null},useUtc:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:{select:e=>typeof e=="object",selectedDisabled:e=>typeof e=="object",setFocus:e=>e===["input"]},data(){return{utils:h(this.useUtc,this.language)}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)}},computed:{disabledConfig(){return this.disabledDates?new c(this.utils,this.disabledDates).config:{has:{from:!1,to:!1}}},earliestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getEarliestPossibleDate(this.disabledDates.to):null},isRtl(){return T.indexOf(this.language)!==-1},latestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getLatestPossibleDate(this.disabledDates.from):null},pageYear(){return this.utils.getFullYear(this.pageDate)}},methods:{addMoreSteps(e){return e.stepsRemaining<=0&&Math.abs(e.delta)>1?Math.abs(e.delta):e.stepsRemaining},changePageAndSetFocus(e){const{delta:t}=e;t>0&&this.isNextDisabled||t<0&&this.isPreviousDisabled||(this.changePage({incrementBy:Math.sign(t),focusRefs:["arrow-to-cell"]}),this.$nextTick(()=>{this.setFocusOnNewPage(e)}))},focusInput(){this.isTypeable&&this.$emit("setFocus",["input"])},getElement({currentElement:e,delta:t,stepsRemaining:s}){const n=this.getElementSibling(e,t),l={currentElement:n,delta:t,stepsRemaining:s-1};return n?this.isBeyondPossibleDate(l)?this.firstOrLastPossibleDate(l):this.isMutedOrDisabled(n)?(l.stepsRemaining=this.addMoreSteps(l),this.getElement(l)):s>1&&l.currentElement?this.getElement(l):n:this.changePageAndSetFocus(l)},getElementSibling(e,t){return t>0?e.nextElementSibling:e.previousElementSibling},getFirstOrLastElement(e){const t=e>0,s=this.$refs.cells.$el.children;return t?s[0]:s[s.length-1]},firstOrLastPossibleDate({currentElement:e,delta:t}){return t>0?this.getElementSibling(e,-1):this.getElementSibling(e,1)},handleArrow({delta:e}){const t=document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement,s=Math.abs(e),n={currentElement:t,delta:e,stepsRemaining:s};this.setFocusToAvailableCell(n)},select(e){e.isDisabled?this.$emit("selectedDisabled",e):this.$emit("select",e)},isBeyondPossibleDate({currentElement:e,delta:t}){return t>0&&this.latestPossibleDate?this.isDatePossible(e,t):t<0&&this.earliestPossibleDate?this.isDatePossible(e,t):!1},isDatePossible(e,t){const s=e.getAttribute("data-id"),n=new Date(this.cells[s].timestamp);return t>0?n>this.latestPossibleDate:n<this.earliestPossibleDate},isMutedOrDisabled(e){const t=e.classList.value.split(" ").includes("muted"),s=e.disabled;return t||s},setFocusOnNewPage({delta:e,stepsRemaining:t}){const s=this.getFirstOrLastElement(e),n={currentElement:s,delta:e,stepsRemaining:t};if(t<=0){if(this.isMutedOrDisabled(s)){n.stepsRemaining=Math.abs(n.delta),setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration);return}setTimeout(()=>{s.focus()},this.slideDuration);return}setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration)},setFocusToAvailableCell(e){const t=this.getElement(e);t&&t.focus()}}};class v{constructor(t,s,n){this._utils=t,this._disabledDates=s,this._highlighted=n}get config(){const t=this._highlighted,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to"),includeDisabled:s.isDefined(t,"includeDisabled")&&t.includeDisabled};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}isDateDisabled(t){const s=this._utils,n=this._disabledDates;return new c(s,n).isDateDisabled(t)}isHighlightingNotPossible(t){return!this.config.has.includeDisabled&&this.isDateDisabled(t)}isDateHighlightedVia(t){const s=this._highlighted,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:l}=s,i=y(this._utils);return l.some(r=>{const u=i.isDefined(r,"from"),o=i.isDefined(r,"to");return u&&o&&t<=r.to&&t>=r.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(l=>this._utils.compareDates(t,l)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isDateHighlighted(t){if(this.isHighlightingNotPossible(t))return!1;const s=this.isDateHighlightedVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isHighlightStart(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].from.valueOf()===t.valueOf())return!0;return!1}isHighlightEnd(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].to.valueOf()===t.valueOf())return!0;return!1}}const Ae={name:"PickerDay",components:{PickerHeader:M,PickerCells:S},mixins:[k],props:{dayCellContent:{type:Function,default:e=>e.date},firstDayOfWeek:{type:String},highlighted:{type:Object,default(){return{}}},mondayFirst:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!1},showFullMonthName:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean,default:!1}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="month"},computed:{currMonthName(){return this.showFullMonthName?this.utils.getMonthName(this.pageMonth):this.utils.getMonthNameAbbr(this.pageMonth)},currYearName(){const e=C[this.language]||"";return`${this.pageYear}${e}`},days(){const e=[],t=this.daysFromPrevMonth+this.daysInMonth+this.daysFromNextMonth,s=this.firstDayCellDate();for(let n=0;n<t;n++)e.push(this.makeDay(s)),this.utils.setDate(s,this.utils.getDate(s)+1);return e},daysFromNextMonth(){const e=this.daysFromPrevMonth+this.daysInMonth;return Math.ceil(e/7)*7-e},daysFromPrevMonth(){const e=this.utils.getDay(this.pageDate);return(7-this.firstDayOfWeekNumber+e)%7},daysInMonth(){return this.utils.getDaysInMonth(this.pageDate)},daysOfWeek(){return this.utils.getDaysStartingOn(this.firstDayOfWeekNumber,this.twoLetterAbbr)},firstDayOfWeekNumber(){return this.mondayFirst?1:this.firstDayOfWeek?this.utils.getDayFromAbbr(this.firstDayOfWeek):0},firstOfNextMonth(){const e=new Date(this.pageDate);return new Date(this.utils.setMonth(e,this.utils.getMonth(e)+1))},isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.month<=this.pageMonth&&this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.month>=this.pageMonth&&this.disabledConfig.to.year>=this.pageYear:!1},pageMonth(){return this.utils.getMonth(this.pageDate)},pageTitleDay(){return me.indexOf(this.language.code)!==-1?`${this.currYearName} ${this.currMonthName}`:`${this.currMonthName} ${this.currYearName}`}},methods:{firstDayCellDate(){const e=new Date(this.pageDate);return new Date(this.utils.setDate(e,1-this.daysFromPrevMonth))},changeMonth({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setMonth(s,this.utils.getMonth(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeMonth({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeMonth({incrementBy:e,focusRefs:t})},isSelectedDate(e){return this.selectedDate&&this.utils.compareDates(this.selectedDate,e)},isDisabledDate(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},isHighlightedDate(e){return this.highlighted?new v(this.utils,this.disabledDates,this.highlighted).isDateHighlighted(e):!1},isHighlightStart(e){return this.highlighted?new v(this.utils,this.disabledDates,this.highlighted).isHighlightStart(e):!1},isHighlightEnd(e){return this.highlighted?new v(this.utils,this.disabledDates,this.highlighted).isHighlightEnd(e):!1},makeDay(e){const{utils:t}=this,s=t.getDay(e),n=e>=this.firstOfNextMonth,l=e<this.pageDate,i=s===6,r=s===0;return{date:this.showEdgeDates||!(l||n)?t.getDate(e):"",timestamp:e.getTime(),isSelected:this.isSelectedDate(e),isDisabled:this.isDisabledDate(e),isHighlighted:this.isHighlightedDate(e),isHighlightStart:this.isHighlightStart(e),isHighlightEnd:this.isHighlightEnd(e),isToday:t.compareDates(e,new Date),isWeekend:i||r,isSaturday:i,isSunday:r,isPreviousMonth:l,isNextMonth:n}}}};function Ye(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"month","up-button-classes":"day__month_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleDay),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createElementVNode("div",{class:a.normalizeClass({"flex-rtl":e.isRtl})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysOfWeek,o=>(a.openBlock(),a.createElementBlock("span",{class:"cell day-header",key:o.timestamp},a.toDisplayString(o),1))),128)),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.days,"is-rtl":e.isRtl,"show-edge-dates":s.showEdgeDates,"tabbable-cell-id":e.tabbableCellId,view:"day",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(s.dayCellContent(o)),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","show-edge-dates","tabbable-cell-id"])],2)],38)),[[a.vShow,e.visible]])}const Ue=g(Ae,[["render",Ye]]),xe={name:"PickerMonth",components:{PickerHeader:M,PickerCells:S},mixins:[k],emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="year"},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageYear:!1},months(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(e.getUTCFullYear(),0,e.getUTCDate())):new Date(e.getFullYear(),0,e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<12;n++)t.push({month:this.utils.getMonthName(s),timestamp:s.getTime(),isDisabled:this.isDisabledMonth(s),isSelected:this.isSelectedMonth(s),isToday:this.isTodayMonth(s)}),this.utils.setMonth(s,this.utils.getMonth(s)+1);return t},pageTitleMonth(){const e=C[this.language]||"";return`${this.pageYear}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e,focusRefs:t})},isSelectedMonth(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)&&this.utils.getMonth(this.selectedDate)===this.utils.getMonth(e)},isDisabledMonth(e){return this.disabledDates?new c(this.utils,this.disabledDates).isMonthDisabled(e):!1},isTodayMonth(e){const{utils:t}=this,s=new Date(t.setDate(t.getNewDateObject(),1));return t.compareDates(e,s)}}};function He(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"year","up-button-classes":"month__year_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleMonth),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.months,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"month",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.month),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const We=g(xe,[["render",He]]),$e={name:"PickerYear",components:{PickerHeader:M,PickerCells:S},mixins:[k],props:{highlighted:{type:Object,default(){return{}}}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t))},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageDecadeEnd:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageDecadeStart:!1},pageDecadeStart(){return Math.floor(this.pageYear/10)*10},pageDecadeEnd(){return this.pageDecadeStart+10-1},years(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(Math.floor(e.getUTCFullYear()/10)*10,e.getUTCMonth(),e.getUTCDate())):new Date(Math.floor(e.getFullYear()/10)*10,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<10;n++)t.push({year:this.utils.getFullYear(s),timestamp:s.getTime(),isDisabled:this.isDisabledYear(s),isSelected:this.isSelectedYear(s),isToday:this.isTodayYear(s)}),this.utils.setFullYear(s,this.utils.getFullYear(s)+1);return t},pageTitleYear(){const e=C[this.language]||"";return`${this.pageDecadeStart} - ${this.pageDecadeEnd}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e*10,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e*10,focusRefs:t})},isSelectedYear(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)},isDisabledYear(e){return this.disabledDates?new c(this.utils,this.disabledDates).isYearDisabled(e):!1},isTodayYear(e){const{utils:t}=this,s=t.getFullYear(t.getNewDateObject());return t.getFullYear(e)===s}}};function Le(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[4]||(t[4]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":!0,onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleYear),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.years,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"year",onArrow:t[2]||(t[2]=o=>e.handleArrow(o)),onSelect:t[3]||(t[3]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.year),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const Re=g($e,[["render",Le]]);const Ke={name:"DatePicker",components:{DateInput:Me,PickerDay:Ue,PickerMonth:We,PickerYear:Re},mixins:[N,ke],props:{calendarClass:{type:[String,Object,Array],default:""},dayCellContent:{type:Function},disabledDates:{type:Object},firstDayOfWeek:{type:String},fullMonthName:{type:Boolean},highlighted:{type:Object},initialView:{type:String,default:""},language:{type:Object,default(){return b}},maximumView:{type:String,default:"year"},minimumView:{type:String,default:"day"},mondayFirst:{type:Boolean},openDate:{validator:e=>P.validateDateInput(e)},parseTypedDate:{type:Function},showEdgeDates:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean},value:{validator:e=>P.validateDateInput(e)},wrapperClass:{type:[String,Object,Array],default:""}},emits:{changedMonth:e=>typeof e=="object",changedYear:e=>typeof e=="object",changedDecade:e=>typeof e=="object",cleared:null,closed:null,input:e=>e instanceof Date||e===null,opened:null,selected:e=>e instanceof Date||e===null,selectedDisabled:e=>typeof e=="object"},data(){const e=this.openDate?new Date(this.openDate):new Date,t=h(this.useUtc,this.language);return{calendarHeight:0,latestValidTypedDate:null,pageTimestamp:t.setDate(e,1),selectedDate:null,slideDuration:250,resetTypedDate:new Date,utils:t,view:""}},watch:{disabledDates:{handler(){const e=this.selectedDate||this.parseValue(this.value);if(e){if(this.isDateDisabled(e)&&e){this.setDate(null);return}this.dateHasChanged(e)&&this.setDate(e)}},deep:!0},initialView(){this.isOpen&&this.setInitialView()},language(e){this.utils=h(this.useUtc,e)},latestValidTypedDate(e){this.setPageDate(e)},useUtc(e){this.utils=h(e,this.language)},value(e){this.setValue(e)},openDate(){this.setPageDate()}},computed:{computedInitialView(){return this.initialView?this.initialView:this.minimumView},computedOpenDate(){const e=this.parseValue(this.openDate),t=this.utils.getNewDateObject(e),s=this.selectedDate||t;return this.minimumView==="day"?s:new Date(this.utils.setDate(s,1))},calendarStyle(){return{position:this.isInline?"static":void 0}},isInline(){return!!this.inline},isOpen(){return this.view!==""},isRtl(){return T.indexOf(this.language)!==-1},isUpDisabled(){return!this.allowedToShowView(this.nextView.up)},nextView(){const e=["day","month","year"],t=i=>i===this.view,s=e.findIndex(t),n=i=>i<=0?void 0:e[i-1];return{up:(i=>{if(!(i<0))return i===e.length-1?"decade":e[i+1]})(s),down:n(s)}},pageDate(){return new Date(this.pageTimestamp)},picker(){const e=this.view||this.computedInitialView;return`Picker${this.ucFirst(e)}`}},methods:{resetDefaultPageDate(){if(this.selectedDate===null){this.setPageDate();return}this.setPageDate(this.selectedDate)},open(){if(this.disabled||this.isInline)return!1;this.setInitialView(),this.reviewFocus(),this.$emit("opened")},parseValue(e){if(typeof e=="string"||typeof e=="number"){const t=new Date(e);return this.utils.isValidDate(t)?t:null}return this.utils.isValidDate(e)?e:null},selectTypedDate(e){this.setDate(e.getTime()),this.reviewFocus(),this.isOpen&&this.close()},setInitialView(){const e=this.computedInitialView;if(!this.allowedToShowView(e))throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`);this.setView(e)},allowedToShowView(e){const t=["day","month","year"],s=t.indexOf(this.minimumView),n=t.indexOf(this.maximumView),l=t.indexOf(e);return l>=s&&l<=n},setDate(e){const t=new Date(e);this.selectedDate=t,this.setPageDate(t),this.$emit("selected",t),this.$emit("input",t)},clearDate(){this.selectedDate=null,this.setPageDate(),this.$emit("selected",null),this.$emit("input",null),this.focus.refs=["input"],this.close(),this.$emit("cleared")},handleSelect(e){if(this.allowedToShowView(this.nextView.down)){this.showNextViewDown(e);return}this.$refs.dateInput.typedDate="",this.setDate(e.timestamp),this.focus.delay=e.isNextMonth?this.slideDuration:0,this.focus.refs=this.isInline?["tabbableCell"]:["input"],this.close(),this.reviewFocus(),this.resetTypedDate=new Date},selectDisabledDate(e){this.$emit("selectedDisabled",e)},setValue(e){if(typeof e=="string"||typeof e=="number"){const t=this.utils.parseDate(e,this.format);e=isNaN(t.valueOf())?null:t}this.selectedDate=e||null,this.setPageDate(e),this.typeable&&(this.latestValidTypedDate=e||this.computedOpenDate)},setView(e){this.allowedToShowView(e)&&(this.view=e)},setPageDate(e){e||(this.openDate?e=new Date(this.openDate):e=new Date),this.pageTimestamp=this.utils.setDate(new Date(e),1)},setTypedDate(e){const t=new Date(this.pageDate);if(this.latestValidTypedDate=e||this.computedOpenDate,this.setPageDate(e),this.isPageChange(t)){this.handlePageChange({focusRefs:[],pageDate:this.pageDate});return}this.setTabbableCell()},close(){this.isInline||(this.view="",this.reviewFocus(),this.$emit("closed"))},handlePageChange({focusRefs:e,pageDate:t}){this.setPageDate(t),this.focus.refs=e,this.focus.delay=this.slideDuration||250,this.reviewFocus(),this.$emit(`changed${this.ucFirst(this.nextView.up)}`,t)},hasClass(e,t){return e&&e.className.split(" ").includes(t)},isPageChange(e){return this.isOpen?e.valueOf()!==this.pageDate.valueOf():!1},init(){this.typeable&&(this.latestValidTypedDate=this.selectedDate||this.computedOpenDate),this.value&&this.setValue(this.value),this.isInline&&this.setInitialView()},isDateDisabled(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},showNextViewDown(e){this.setPageDate(new Date(e.timestamp)),this.$emit(`changed${this.ucFirst(this.view)}`,e),this.setView(this.nextView.down)},ucFirst(e){return e[0].toUpperCase()+e.substring(1)}},mounted(){this.init()}};function je(e,t,s,n,l,i){const r=a.resolveComponent("date-input");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vdp-datepicker",[s.wrapperClass,i.isRtl?"rtl":""]])},[a.createVNode(r,{id:e.id,ref:"dateInput",autofocus:e.autofocus,"bootstrap-styling":e.bootstrapStyling,"calendar-button":e.calendarButton,"calendar-button-icon":e.calendarButtonIcon,"calendar-button-icon-content":e.calendarButtonIconContent,"clear-button":e.clearButton,"clear-button-icon":e.clearButtonIcon,disabled:e.disabled,format:e.format,inline:e.inline,"input-class":e.inputClass,"is-open":i.isOpen,language:s.language,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,"parse-typed-date":s.parseTypedDate,pattern:e.pattern,placeholder:e.placeholder,"ref-name":e.refName,required:e.required,"reset-typed-date":l.resetTypedDate,"selected-date":l.selectedDate,"show-calendar-on-focus":e.showCalendarOnFocus,tabindex:e.tabindex,typeable:e.typeable,"use-utc":e.useUtc,onClearDate:i.clearDate,onCloseCalendar:i.close,onOpen:i.open,onSelectTypedDate:i.selectTypedDate,onSetFocus:t[0]||(t[0]=u=>e.setFocus(u)),onTypedDate:i.setTypedDate},{calendarBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"calendarBtn")]),beforeDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeDateInput")]),clearBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"clearBtn")]),afterDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"afterDateInput")]),_:3},8,["id","autofocus","bootstrap-styling","calendar-button","calendar-button-icon","calendar-button-icon-content","clear-button","clear-button-icon","disabled","format","inline","input-class","is-open","language","maxlength","name","open-date","parse-typed-date","pattern","placeholder","ref-name","required","reset-typed-date","selected-date","show-calendar-on-focus","tabindex","typeable","use-utc","onClearDate","onCloseCalendar","onOpen","onSelectTypedDate","onTypedDate"]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.picker),{ref:"picker","bootstrap-styling":e.bootstrapStyling,calendarClass:s.calendarClass,calendarStyle:i.calendarStyle,dayCellContent:s.dayCellContent,disabledDates:s.disabledDates,firstDayOfWeek:s.firstDayOfWeek,highlighted:s.highlighted,"is-typeable":e.typeable,"is-up-disabled":i.isUpDisabled,language:s.language,mondayFirst:s.mondayFirst,pageDate:i.pageDate,selectedDate:l.selectedDate,showEdgeDates:s.showEdgeDates,showFullMonthName:s.fullMonthName,"slide-duration":l.slideDuration,"tabbable-cell-id":e.tabbableCellId,twoLetterAbbr:s.twoLetterAbbr,"use-utc":e.useUtc,visible:i.isOpen,onPageChange:i.handlePageChange,onSelect:i.handleSelect,onSetFocus:t[1]||(t[1]=u=>e.setFocus(u)),onSetView:i.setView,onSelectedDisabled:i.selectDisabledDate},{beforeCalendarHeader:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeCalendarHeader")]),_:3},40,["bootstrap-styling","calendarClass","calendarStyle","dayCellContent","disabledDates","firstDayOfWeek","highlighted","is-typeable","is-up-disabled","language","mondayFirst","pageDate","selectedDate","showEdgeDates","showFullMonthName","slide-duration","tabbable-cell-id","twoLetterAbbr","use-utc","visible","onPageChange","onSelect","onSetView","onSelectedDisabled"]))],2)}const ze=g(Ke,[["render",je]]);module.exports=ze;
var vuejsDatepicker=function(d,a){"use strict";/*!
* vuejs-datepicker v4.1.3
* vuejs-datepicker v4.1.4
* (c) 2023-2023 Wesley Hobbie
* Released under the MIT License.
*/function D(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):e.defaultWidth,n=e.formats[s]||e.formats[e.defaultWidth];return n}}function m(e){return function(t,s){var n=s!=null&&s.context?String(s.context):"standalone",r;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,l=s!=null&&s.width?String(s.width):i;r=e.formattingValues[l]||e.formattingValues[i]}else{var u=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;r=e.values[o]||e.values[u]}var g=e.argumentCallback?e.argumentCallback(t):t;return r[g]}}function p(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var l=i[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(u)?B(u,function(v){return v.test(l)}):V(u,function(v){return v.test(l)}),g;g=e.valueCallback?e.valueCallback(o):o,g=s.valueCallback?s.valueCallback(g):g;var Ke=t.slice(l.length);return{value:g,rest:Ke}}}function V(e,t){for(var s in e)if(e.hasOwnProperty(s)&&t(e[s]))return s}function B(e,t){for(var s=0;s<e.length;s++)if(t(e[s]))return s}function E(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var r=n[0],i=t.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];l=s.valueCallback?s.valueCallback(l):l;var u=t.slice(r.length);return{value:l,rest:u}}}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},I=function(t,s,n){var r,i=O[t];return typeof i=="string"?r=i:s===1?r=i.one:r=i.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const A=I;var Y={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},H={date:D({formats:Y,defaultWidth:"full"}),time:D({formats:U,defaultWidth:"full"}),dateTime:D({formats:x,defaultWidth:"full"})};const $=H;var W={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L=function(t,s,n,r){return W[t]};const R=L;var K={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},j={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},q={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},J={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Q=function(t,s){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},G={ordinalNumber:Q,era:m({values:K,defaultWidth:"wide"}),quarter:m({values:j,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:m({values:z,defaultWidth:"wide"}),day:m({values:q,defaultWidth:"wide"}),dayPeriod:m({values:J,defaultWidth:"wide",formattingValues:X,defaultFormattingWidth:"wide"})};const Z=G;var _=/^(\d+)(th|st|nd|rd)?/i,ee=/\d+/i,te={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},se={any:[/^b/i,/^(a|c)/i]},ae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ie={any:[/1/i,/2/i,/3/i,/4/i]},ne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},re={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},le={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ue={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},de={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:E({matchPattern:_,parsePattern:ee,valueCallback:function(t){return parseInt(t,10)}}),era:p({matchPatterns:te,defaultMatchWidth:"wide",parsePatterns:se,defaultParseWidth:"any"}),quarter:p({matchPatterns:ae,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:p({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:re,defaultParseWidth:"any"}),day:p({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:ue,defaultMatchWidth:"any",parsePatterns:de,defaultParseWidth:"any"})},ce={code:"en-US",formatDistance:A,formatLong:$,formatRelative:R,localize:Z,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};const b=ce,P={useUtc:!1,language:b,getFullYear(e){return this.useUtc?e.getUTCFullYear():e.getFullYear()},getMonth(e){return this.useUtc?e.getUTCMonth():e.getMonth()},getDaysInMonth(e){return this.daysInMonth(this.getFullYear(e),this.getMonth(e))},getDate(e){return this.useUtc?e.getUTCDate():e.getDate()},getDay(e){return this.useUtc?e.getUTCDay():e.getDay()},getHours(e){return this.useUtc?e.getUTCHours():e.getHours()},getMinutes(e){return this.useUtc?e.getUTCMinutes():e.getMinutes()},setFullYear(e,t){return this.useUtc?e.setUTCFullYear(t):e.setFullYear(t)},setMonth(e,t){return this.useUtc?e.setUTCMonth(t):e.setMonth(t)},setDate(e,t){return this.useUtc?e.setUTCDate(t):e.setDate(t)},compareDates(e,t){const s=new Date(e.getTime()),n=new Date(t.getTime());return this.useUtc?(s.setUTCHours(0,0,0,0),n.setUTCHours(0,0,0,0)):(s.setHours(0,0,0,0),n.setHours(0,0,0,0)),s.getTime()===n.getTime()},isValidDate(e){return Object.prototype.toString.call(e)!=="[object Date]"?!1:!isNaN(e.getTime())},getDayNameAbbr(e){if(typeof e!="object")throw TypeError("Invalid Type");return d.format(e,"ccc",{locale:this.language})},getDayFromAbbr(e){const t=new Date,s=[0,1,2,3,4,5,6];let n=s.map(r=>d.format(d.setDay(t,r),"ccc",{locale:b}));for(let r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase())return r;if(this.language!==b){n=s.map(r=>d.format(d.setDay(t,r),"ccc",{locale:this.language}));for(let r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase())return r}throw TypeError("Invalid week day")},getMonthName(e){if(typeof e=="object")return d.format(e,"LLLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLLL",{locale:this.language});throw TypeError("Invalid type")},getMonthNameAbbr(e){if(typeof e=="object")return d.format(e,"LLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLL",{locale:this.language});throw TypeError("Invalid type")},daysInMonth(e,t){return/8|3|5|10/.test(t)?30:t===1?!(e%4)&&e%100||!(e%400)?29:28:31},getNthSuffix(e){switch(e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},getDaysStartingOn(e,t=!1){const s=new Date,n=[0,1,2,3,4,5,6];let r="ccc";return t&&(r="cccccc"),n.map(i=>d.format(d.setDay(s,i+e),r,{locale:this.language}))},formatDate(e,t){return d.format(e,t,{locale:this.language})},parseDate(e,t="yyyy-MM-dd"){if(typeof e=="string")return d.parse(e,t,new Date,{locale:this.language});if(typeof e=="number")return d.toDate(e)},validateDateInput(e){return e===null||e instanceof Date||typeof e=="string"||typeof e=="number"},resetDateTime(e){return new Date(this.useUtc?e.setUTCHours(0,0,0,0):e.setHours(0,0,0,0))},getNewDateObject(e){return e?this.resetDateTime(new Date(e)):this.resetDateTime(new Date)}},h=(e=!1,t=b)=>({...P,useUtc:e,language:t}),T={...P},F=["dv","fa","ha","he","kwh","ks","ku","ps","ur","yi"],fe=["ja","lt","mn","ko"],w={zh:"年",ja:"年",ko:"년"},N={props:{autofocus:{type:Boolean,default:!1},bootstrapStyling:{type:Boolean,default:!1},clearButton:{type:Boolean,default:!1},clearButtonIcon:{type:String,default:null},calendarButton:{type:Boolean,default:!1},calendarButtonIcon:{type:String,default:null},calendarButtonIconContent:{type:String,default:null},disabled:{type:Boolean,default:!1},format:{type:[String,Function],default:"dd MMM yyyy"},id:{type:String,default:null},inline:{type:Boolean,default:!1},inputClass:{type:[String,Object,Array],default:null},maxlength:{type:[Number,String],default:null},name:{type:String,default:null},pattern:{type:String,default:null},placeholder:{type:String,default:null},refName:{type:String,default:""},required:{type:Boolean,default:!1},showCalendarOnFocus:{type:Boolean,default:!1},tabindex:{type:[Number,String],default:null},typeable:{type:Boolean,default:!1},useUtc:{type:Boolean,default:!1}}},f=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ge={name:"DateInput",mixins:[N],props:{isOpen:{type:Boolean,default:!1},language:{type:Object},openDate:Date,parseTypedDate:Function,resetTypedDate:[Date],selectedDate:{type:Date,default:null}},emits:{clearDate:null,closeCalendar:null,open:null,selectTypedDate:e=>e===null||e instanceof Date,setFocus:e=>e.every(t=>["calendarButton","input","prev","up","next","tabbableCell"].includes(t)),typedDate:e=>e===null||e instanceof Date},data(){return{input:null,typedDate:!1,utils:h(this.useUtc,this.language)}},computed:{formattedValue(){return this.selectedDate?this.typedDate?this.typedDate:typeof this.format=="function"?this.format(this.selectedDate):this.utils.formatDate(this.selectedDate,this.format):null},computedInputClass(){return this.bootstrapStyling?typeof this.inputClass=="string"?[this.inputClass,"form-control"].join(" "):{"form-control":!0,...this.inputClass}:this.inputClass}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)},resetTypedDate(){this.typedDate=!1}},mounted(){this.input=this.$el.querySelector("input")},methods:{showCalendar(){this.showCalendarOnFocus||this.toggle()},showFocusCalendar(){this.showCalendarOnFocus&&!this.isOpen&&this.$emit("open")},handleKeydownDown(){this.isOpen||this.$emit("open"),this.typeable&&this.$emit("setFocus",["prev","up","next","tabbableCell"])},handleKeydownEnter(){if(!this.typeable)return;if(!this.input.value){this.$emit("selectTypedDate",null);return}const e=this.getTypedDate(this.input.value);isNaN(e)||(this.typedDate=this.input.value,this.$emit("selectTypedDate",e))},handleKeydownEscape(){this.$emit("closeCalendar")},keyUp(e){if(!(!this.typeable||["Control","Escape","Shift","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))){if(!this.input.value){this.$emit("typedDate",null);return}if(this.typeable){const t=this.getTypedDate(this.input.value);isNaN(t)||(this.typedDate=this.input.value,this.$emit("typedDate",t))}}},inputBlurred(){this.typeable&&isNaN(this.getTypedDate(this.input.value))&&(this.clearDate(),this.input.value=null,this.typedDate=null)},clearDate(){this.$emit("clearDate")},getTypedDate(e){return typeof this.parseTypedDate=="function"?this.parseTypedDate(e):this.utils.parseDate(e,typeof this.format=="string"?this.format:void 0)},toggle(e){this.isOpen&&this.$emit("setFocus",[e||"input"]),this.$emit(this.isOpen?"closeCalendar":"open")}}},me=["disabled"],pe={key:0},be=["id","autofocus","clear-button","disabled","maxlength","name","open-date","pattern","placeholder","readonly","required","tabindex","type","value"],ye=["disabled"],De={key:0};function we(e,t,s,n,r,i){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"input-group":e.bootstrapStyling})},[e.calendarButton?(a.openBlock(),a.createElementBlock("button",{key:0,ref:"calendarButton",class:a.normalizeClass(["vdp-datepicker__calendar-button",{"btn input-group-prepend":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[0]||(t[0]=l=>i.toggle("calendarButton"))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"calendarBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.calendarButtonIcon)},[a.createTextVNode(a.toDisplayString(e.calendarButtonIconContent)+" ",1),e.calendarButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",pe,"…"))],2)])],2)],10,me)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"beforeDateInput"),a.createElementVNode("input",{id:e.id,ref:e.refName,autocomplete:"off",autofocus:e.autofocus,class:a.normalizeClass(i.computedInputClass),"clear-button":e.clearButton,disabled:e.disabled,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,pattern:e.pattern,placeholder:e.placeholder,readonly:!e.typeable,required:e.required,tabindex:e.tabindex,type:e.inline?"hidden":"text",value:i.formattedValue,onBlur:t[1]||(t[1]=(...l)=>i.inputBlurred&&i.inputBlurred(...l)),onClick:t[2]||(t[2]=(...l)=>i.showCalendar&&i.showCalendar(...l)),onFocus:t[3]||(t[3]=(...l)=>i.showFocusCalendar&&i.showFocusCalendar(...l)),onKeydown:[t[4]||(t[4]=a.withKeys(a.withModifiers((...l)=>i.handleKeydownDown&&i.handleKeydownDown(...l),["prevent"]),["down"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...l)=>i.handleKeydownEnter&&i.handleKeydownEnter(...l),["prevent"]),["enter"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...l)=>i.handleKeydownEscape&&i.handleKeydownEscape(...l),["prevent"]),["esc"]))],onKeyup:t[7]||(t[7]=(...l)=>i.keyUp&&i.keyUp(...l))},null,42,be),e.clearButton&&s.selectedDate?(a.openBlock(),a.createElementBlock("button",{key:1,class:a.normalizeClass(["vdp-datepicker__clear-button",{"btn input-group-append":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[8]||(t[8]=(...l)=>i.clearDate&&i.clearDate(...l))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"clearBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.clearButtonIcon)},[e.clearButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",De,"×"))],2)])],2)],10,ye)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"afterDateInput")],2)}const Ce=f(ge,[["render",we]]),Me={isDefined(e,t){return e&&typeof e[t]<"u"},hasArray(e,t){return e&&Array.isArray(e[t])},hasDate(e,t){return this.isDefined(e,t)&&this.utils.isValidDate(e[t])},dayMonthYear(e,t){const{utils:s}=this;if(!this.hasDate(e,t))return{day:void 0,month:void 0,year:void 0};const r=e[t];return{day:s.getDate(r),month:s.getMonth(r),year:s.getFullYear(r)}}},y=e=>({...Me,utils:e});class c{constructor(t,s){this._utils=t,this._disabledDates=s}get config(){const t=this._disabledDates,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to")};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}daysInMonth(t){const s=this._utils,n=s.getMonth(t),r=s.getFullYear(t);return s.daysInMonth(r,n)}isDateDisabledVia(t){const s=this._disabledDates,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:r}=s,i=y(this._utils);return r.some(l=>{const u=i.isDefined(l,"from"),o=i.isDefined(l,"to");return u&&o&&t<l.to&&t>l.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(r=>this._utils.compareDates(t,r)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isMonthDisabledVia(t){const{from:s,has:n,to:r}=this.config,i=this._utils.getMonth(t),l=this._utils.getFullYear(t);return{to:()=>n.to&&l<r.year?!0:n.to&&i<r.month&&l<=r.year,from:()=>n.from&&l>s.year?!0:n.from&&i>s.month&&l>=s.year}}isYearDisabledVia(t){const{from:s,has:n,to:r}=this.config,i=this._utils.getFullYear(t);return{to:()=>n.to&&i<r.year,from:()=>n.from&&i>s.year}}isDateDisabled(t){const s=this.isDateDisabledVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isMonthDisabled(t){const s=this.isMonthDisabledVia(t);if(s.to()||s.from())return!0;for(let n=1;n<=this.daysInMonth(t);n++){const r=new Date(t);if(r.setDate(n),!this.isDateDisabled(r))return!1}return!0}isYearDisabled(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const r=new Date(t);if(r.setMonth(n),!this.isMonthDisabled(r))return!1}return!0}getEarliestPossibleDate(t){if(!t)return null;const s=this._utils;if(this.isDateDisabled(t)){const n=new Date(s.getFullYear(t),s.getMonth(t),s.getDate(t)+1);return this.getEarliestPossibleDate(n)}return t}getLatestPossibleDate(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const r=new Date(t);if(r.setMonth(n),!this.isMonthDisabled(r))return!1}return!0}}const Se={data(){return{focus:{delay:0,refs:[]},navElements:[],navElementsFocusedIndex:0,resetTabbableCell:!1,tabbableCell:null}},computed:{fallbackElementsToFocus(){const e=["tabbableCell","prev","next"];return this.typeable&&e.unshift("input"),e},tabbableCellId(){return this.tabbableCell&&Number(this.tabbableCell.getAttribute("data-id"))}},methods:{getCellDate(e){switch(this.view){case"month":return new Date(this.utils.setDate(e,1));case"year":return new Date(this.utils.setMonth(new Date(this.utils.setDate(e,1)),0));default:return e}},applyFocus(){const e=[...this.focus.refs,...this.fallbackElementsToFocus];for(let t=0;t<e.length;t++){const s=this.getElementByRef(e[t]);if(s&&s.getAttribute("disabled")===null){s.focus(),this.setNavElementsFocusedIndex();break}}},getActiveCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell"),s=this.hasClass(e,this.view);return t&&s&&!this.resetTabbableCell?e:null},getActiveElement(){return document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement},getCellId(e){if(!e||!this.$refs.picker.$refs.cells)return null;const t=this.getCellDate(e),{cells:s}=this.$refs.picker.$refs.cells;for(let n=0;n<s.length;n++)if(s[n].timestamp===t.valueOf())return n;return null},getElementByRef(e){return e==="tabbableCell"?this.tabbableCell:e==="input"?this.$refs.dateInput&&this.$refs.dateInput.$refs[this.refName]:e==="calendarButton"?this.$refs.dateInput&&this.$refs.dateInput.$refs.calendarButton:this.$refs.picker&&this.$refs.picker.$refs.pickerHeader&&this.$refs.picker.$refs.pickerHeader.$refs[e]},getElementsFromSlot(e){if(!this.hasSlot(e))return[];if(e==="beforeCalendarHeader")return this.getFocusableElements(this.$refs.view.children[0]);const t=e.indexOf("beforeCalendarHeader")>-1,s=this.$refs.picker.$el,n=t?0:s.children.length-1;return this.getFocusableElements(s.children[n])},getElementsFromHeader(){if(!this.$refs.picker.$refs.pickerHeader)return[];const t=this.$refs.picker.$refs.pickerHeader.$el.querySelectorAll("button:enabled");return[...Array.prototype.slice.call(t)]},getFocusableElements(e){if(!e)return[];const t=e.querySelectorAll('button:enabled:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]):not([type=hidden]), select:enabled:not([tabindex="-1"]), textarea:enabled:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])');return[...Array.prototype.slice.call(t)]},getInputField(){return!this.typeable||this.inline?null:this.$refs.dateInput.$refs[this.refName]},getTypedCell(){if(!this.typeable)return null;const e=this.getCellId(this.latestValidTypedDate);return e?this.$refs.picker.$refs.cells.$el.children[e]:null},hasSlot(e){return!!this.$slots[e]},reviewFocus(){this.tabbableCell=null,this.resetTabbableCell=!0,this.$nextTick(()=>{this.setNavElements(),setTimeout(()=>{this.applyFocus()},this.focus.delay),this.resetTabbableCell=!1})},setFocus(e){this.focus.refs=e,this.applyFocus()},setNavElements(){if(!this.view)return;this.updateTabbableCell();const e=this.ucFirst(this.view);this.navElements=[this.getInputField(),this.getElementsFromSlot("beforeCalendarHeader"),this.getElementsFromSlot(`beforeCalendarHeader${e}`),this.getElementsFromHeader(),this.tabbableCell].filter(t=>!!t).reduce((t,s)=>t.concat(s),[])},setNavElementsFocusedIndex(){const e=this.getActiveElement();for(let t=0;t<this.navElements.length;t++)if(e===this.navElements[t]){this.navElementsFocusedIndex=t;return}this.navElementsFocusedIndex=0},setTabbableCell(){if(!this.$refs.picker||!this.$refs.picker.$refs.cells)return;const e=this.$refs.picker.$refs.cells.$el;this.tabbableCell=this.getActiveCell()||this.getTypedCell()||e.querySelector("button.selected:not(.muted):enabled")||e.querySelector("button.today:not(.muted):enabled")||e.querySelector("button.cell:not(.muted):enabled")},updateTabbableCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell");(!this.tabbableCell||t)&&this.setTabbableCell()}}},ke={props:{bootstrapStyling:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,required:!0},isPreviousDisabled:{type:Boolean,required:!0},isRtl:{type:Boolean,required:!0},isUpDisabled:{type:Boolean,default:!1},nextViewUp:{type:String,default:null},upButtonClasses:{type:String}},emits:{focusInput:null,pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>["day","month","year"].includes(e)},computed:{leftButton(){return[this.isRtl?"next":"prev"]},rightButton(){return[this.isRtl?"prev":"next"]}},methods:{arrowLeftPrev(){if(this.isRtl){this.$emit("setFocus",["up","next","tabbableCell"]);return}this.goToPreviousPage()},arrowRightPrev(){if(this.isRtl){this.goToPreviousPage();return}this.$emit("setFocus",["up","next","tabbableCell"])},arrowLeftNext(){if(this.isRtl){this.goToNextPage();return}this.$emit("setFocus",["up","prev","tabbableCell"])},arrowRightNext(){if(this.isRtl){this.$emit("setFocus",["up","prev","tabbableCell"]);return}this.goToNextPage()},focusInput(){this.$emit("focusInput")},focusTabbableCell(){this.$emit("setFocus",["tabbableCell"])},focusLeftButton(){this.$emit("setFocus",this.leftButton)},focusRightButton(){this.$emit("setFocus",this.rightButton)},goToNextPage(){this.$emit("pageChange",{incrementBy:1,focusRefs:["next"]})},goToPreviousPage(){this.$emit("pageChange",{incrementBy:-1,focusRefs:["prev"]})},selectUpButton(){this.isUpDisabled||this.$emit("setView",this.nextViewUp)}}},ve=["disabled"],Pe={key:1,ref:"up"},Te=["disabled"];function Fe(e,t,s,n,r,i){return a.openBlock(),a.createElementBlock("header",null,[a.createElementVNode("button",{ref:"prev",class:a.normalizeClass(["prev",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isPreviousDisabled,type:"button",onClick:t[0]||(t[0]=l=>s.isRtl?i.goToNextPage():i.goToPreviousPage()),onKeydown:[t[1]||(t[1]=a.withKeys(a.withModifiers((...l)=>i.focusTabbableCell&&i.focusTabbableCell(...l),["prevent"]),["down"])),t[2]||(t[2]=a.withKeys(a.withModifiers((...l)=>i.focusInput&&i.focusInput(...l),["prevent"]),["up"])),t[3]||(t[3]=a.withKeys(a.withModifiers((...l)=>i.arrowLeftPrev&&i.arrowLeftPrev(...l),["prevent"]),["left"])),t[4]||(t[4]=a.withKeys(a.withModifiers((...l)=>i.arrowRightPrev&&i.arrowRightPrev(...l),["prevent"]),["right"]))]},"<",42,ve),s.isUpDisabled?(a.openBlock(),a.createElementBlock("span",Pe,[a.renderSlot(e.$slots,"default")],512)):(a.openBlock(),a.createElementBlock("button",{key:0,ref:"up",class:a.normalizeClass([s.upButtonClasses,"up",{btn:s.bootstrapStyling}]),type:"button",onClick:t[5]||(t[5]=(...l)=>i.selectUpButton&&i.selectUpButton(...l)),onKeydown:[t[6]||(t[6]=a.withKeys(a.withModifiers((...l)=>i.focusTabbableCell&&i.focusTabbableCell(...l),["prevent"]),["down"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...l)=>i.focusInput&&i.focusInput(...l),["prevent"]),["up"])),t[8]||(t[8]=a.withKeys(a.withModifiers((...l)=>i.focusLeftButton&&i.focusLeftButton(...l),["prevent"]),["left"])),t[9]||(t[9]=a.withKeys(a.withModifiers((...l)=>i.focusRightButton&&i.focusRightButton(...l),["prevent"]),["right"]))]},[a.renderSlot(e.$slots,"default")],34)),a.createElementVNode("button",{ref:"next",class:a.normalizeClass(["next",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isNextDisabled,type:"button",onClick:t[10]||(t[10]=l=>s.isRtl?i.goToPreviousPage():i.goToNextPage()),onKeydown:[t[11]||(t[11]=a.withKeys(a.withModifiers((...l)=>i.focusTabbableCell&&i.focusTabbableCell(...l),["prevent"]),["down"])),t[12]||(t[12]=a.withKeys(a.withModifiers((...l)=>i.focusInput&&i.focusInput(...l),["prevent"]),["up"])),t[13]||(t[13]=a.withKeys(a.withModifiers((...l)=>i.arrowLeftNext&&i.arrowLeftNext(...l),["prevent"]),["left"])),t[14]||(t[14]=a.withKeys(a.withModifiers((...l)=>i.arrowRightNext&&i.arrowRightNext(...l),["prevent"]),["right"]))]},">",42,Te)])}const C=f(ke,[["render",Fe]]),Ne={name:"PickerCells",props:{bootstrapStyling:{type:Boolean,default:!1},cells:{type:Array,required:!0},isRtl:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!0},tabbableCellId:{type:Number,default:null},view:{type:String,validator:e=>["day","month","year"].includes(e),required:!0}},emits:{arrow(e){return typeof e=="object"},select(e){return typeof e=="object"}},computed:{columns(){return this.view==="day"?7:3}},methods:{cellClasses(e){return["cell",this.view,{blank:e.date==="",btn:this.bootstrapStyling,disabled:e.isDisabled,"highlight-start":e.isHighlightStart,"highlight-end":e.isHighlightEnd,highlighted:e.isHighlighted,muted:e.isPreviousMonth||e.isNextMonth,sat:e.isSaturday,sun:e.isSunday,selected:this.showEdgeDates?e.isSelected:e.isSelected&&!e.isPreviousMonth&&!e.isNextMonth,today:this.showEdgeDates?e.isToday:e.isToday&&!e.isPreviousMonth&&!e.isNextMonth,weekend:e.isWeekend}]},handleArrow(e,t){this.$emit("arrow",{cellId:e,delta:t})}}},Ve={class:"picker-cells"},Be=["data-id","disabled","onClick","onKeypress","onKeydown"];function Ee(e,t,s,n,r,i){return a.openBlock(),a.createElementBlock("div",Ve,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.cells,(l,u)=>(a.openBlock(),a.createElementBlock("button",{key:l.timestamp,class:a.normalizeClass(i.cellClasses(l)),"data-id":u,disabled:l.isDisabled,type:"button",onClick:o=>e.$emit("select",l),onKeypress:[a.withKeys(o=>e.$emit("select",l),["enter"]),a.withKeys(o=>e.$emit("select",l),["space"])],onKeydown:[a.withKeys(a.withModifiers(o=>i.handleArrow(u,-i.columns),["prevent"]),["up"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,i.columns),["prevent"]),["down"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?1:-1),["prevent"]),["left"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?-1:1),["prevent"]),["right"])]},[a.renderSlot(e.$slots,"default",{cell:l})],42,Be))),128))])}const M=f(Ne,[["render",Ee]]),S={props:{bootstrapStyling:{type:Boolean,default:!1},calendarClass:[String,Object,Array],calendarStyle:{type:Object},disabledDates:{type:Object},isTypeable:{type:Boolean,default:!1},isUpDisabled:{type:Boolean,default:!1},language:{type:Object},pageDate:{type:Date,default:null},selectedDate:{type:Date,default:null},slideDuration:{type:Number,default:250},tabbableCellId:{type:Number,default:null},useUtc:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:{select:e=>typeof e=="object",selectedDisabled:e=>typeof e=="object",setFocus:e=>e===["input"]},data(){return{utils:h(this.useUtc,this.language)}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)}},computed:{disabledConfig(){return this.disabledDates?new c(this.utils,this.disabledDates).config:{has:{from:!1,to:!1}}},earliestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getEarliestPossibleDate(this.disabledDates.to):null},isRtl(){return F.indexOf(this.language)!==-1},latestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getLatestPossibleDate(this.disabledDates.from):null},pageYear(){return this.utils.getFullYear(this.pageDate)}},methods:{addMoreSteps(e){return e.stepsRemaining<=0&&Math.abs(e.delta)>1?Math.abs(e.delta):e.stepsRemaining},changePageAndSetFocus(e){const{delta:t}=e;t>0&&this.isNextDisabled||t<0&&this.isPreviousDisabled||(this.changePage({incrementBy:Math.sign(t),focusRefs:["arrow-to-cell"]}),this.$nextTick(()=>{this.setFocusOnNewPage(e)}))},focusInput(){this.isTypeable&&this.$emit("setFocus",["input"])},getElement({currentElement:e,delta:t,stepsRemaining:s}){const n=this.getElementSibling(e,t),r={currentElement:n,delta:t,stepsRemaining:s-1};return n?this.isBeyondPossibleDate(r)?this.firstOrLastPossibleDate(r):this.isMutedOrDisabled(n)?(r.stepsRemaining=this.addMoreSteps(r),this.getElement(r)):s>1&&r.currentElement?this.getElement(r):n:this.changePageAndSetFocus(r)},getElementSibling(e,t){return t>0?e.nextElementSibling:e.previousElementSibling},getFirstOrLastElement(e){const t=e>0,s=this.$refs.cells.$el.children;return t?s[0]:s[s.length-1]},firstOrLastPossibleDate({currentElement:e,delta:t}){return t>0?this.getElementSibling(e,-1):this.getElementSibling(e,1)},handleArrow({delta:e}){const t=document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement,s=Math.abs(e),n={currentElement:t,delta:e,stepsRemaining:s};this.setFocusToAvailableCell(n)},select(e){e.isDisabled?this.$emit("selectedDisabled",e):this.$emit("select",e)},isBeyondPossibleDate({currentElement:e,delta:t}){return t>0&&this.latestPossibleDate?this.isDatePossible(e,t):t<0&&this.earliestPossibleDate?this.isDatePossible(e,t):!1},isDatePossible(e,t){const s=e.getAttribute("data-id"),n=new Date(this.cells[s].timestamp);return t>0?n>this.latestPossibleDate:n<this.earliestPossibleDate},isMutedOrDisabled(e){const t=e.classList.value.split(" ").includes("muted"),s=e.disabled;return t||s},setFocusOnNewPage({delta:e,stepsRemaining:t}){const s=this.getFirstOrLastElement(e),n={currentElement:s,delta:e,stepsRemaining:t};if(t<=0){if(this.isMutedOrDisabled(s)){n.stepsRemaining=Math.abs(n.delta),setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration);return}setTimeout(()=>{s.focus()},this.slideDuration);return}setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration)},setFocusToAvailableCell(e){const t=this.getElement(e);t&&t.focus()}}};class k{constructor(t,s,n){this._utils=t,this._disabledDates=s,this._highlighted=n}get config(){const t=this._highlighted,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to"),includeDisabled:s.isDefined(t,"includeDisabled")&&t.includeDisabled};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}isDateDisabled(t){const s=this._utils,n=this._disabledDates;return new c(s,n).isDateDisabled(t)}isHighlightingNotPossible(t){return!this.config.has.includeDisabled&&this.isDateDisabled(t)}isDateHighlightedVia(t){const s=this._highlighted,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:r}=s,i=y(this._utils);return r.some(l=>{const u=i.isDefined(l,"from"),o=i.isDefined(l,"to");return u&&o&&t<=l.to&&t>=l.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(r=>this._utils.compareDates(t,r)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isDateHighlighted(t){if(this.isHighlightingNotPossible(t))return!1;const s=this.isDateHighlightedVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isHighlightStart(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].from.valueOf()===t.valueOf())return!0;return!1}isHighlightEnd(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].to.valueOf()===t.valueOf())return!0;return!1}}const Oe={name:"PickerDay",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{dayCellContent:{type:Function,default:e=>e.date},firstDayOfWeek:{type:String},highlighted:{type:Object,default(){return{}}},mondayFirst:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!1},showFullMonthName:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean,default:!1}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="month"},computed:{currMonthName(){return this.showFullMonthName?this.utils.getMonthName(this.pageMonth):this.utils.getMonthNameAbbr(this.pageMonth)},currYearName(){const e=w[this.language]||"";return`${this.pageYear}${e}`},days(){const e=[],t=this.daysFromPrevMonth+this.daysInMonth+this.daysFromNextMonth,s=this.firstDayCellDate();for(let n=0;n<t;n++)e.push(this.makeDay(s)),this.utils.setDate(s,this.utils.getDate(s)+1);return e},daysFromNextMonth(){const e=this.daysFromPrevMonth+this.daysInMonth;return Math.ceil(e/7)*7-e},daysFromPrevMonth(){const e=this.utils.getDay(this.pageDate);return(7-this.firstDayOfWeekNumber+e)%7},daysInMonth(){return this.utils.getDaysInMonth(this.pageDate)},daysOfWeek(){return this.utils.getDaysStartingOn(this.firstDayOfWeekNumber,this.twoLetterAbbr)},firstDayOfWeekNumber(){return this.mondayFirst?1:this.firstDayOfWeek?this.utils.getDayFromAbbr(this.firstDayOfWeek):0},firstOfNextMonth(){const e=new Date(this.pageDate);return new Date(this.utils.setMonth(e,this.utils.getMonth(e)+1))},isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.month<=this.pageMonth&&this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.month>=this.pageMonth&&this.disabledConfig.to.year>=this.pageYear:!1},pageMonth(){return this.utils.getMonth(this.pageDate)},pageTitleDay(){return fe.indexOf(this.language.code)!==-1?`${this.currYearName} ${this.currMonthName}`:`${this.currMonthName} ${this.currYearName}`}},methods:{firstDayCellDate(){const e=new Date(this.pageDate);return new Date(this.utils.setDate(e,1-this.daysFromPrevMonth))},changeMonth({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setMonth(s,this.utils.getMonth(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeMonth({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeMonth({incrementBy:e,focusRefs:t})},isSelectedDate(e){return this.selectedDate&&this.utils.compareDates(this.selectedDate,e)},isDisabledDate(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},isHighlightedDate(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isDateHighlighted(e):!1},isHighlightStart(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightStart(e):!1},isHighlightEnd(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightEnd(e):!1},makeDay(e){const{utils:t}=this,s=t.getDay(e),n=e>=this.firstOfNextMonth,r=e<this.pageDate,i=s===6,l=s===0;return{date:this.showEdgeDates||!(r||n)?t.getDate(e):"",timestamp:e.getTime(),isSelected:this.isSelectedDate(e),isDisabled:this.isDisabledDate(e),isHighlighted:this.isHighlightedDate(e),isHighlightStart:this.isHighlightStart(e),isHighlightEnd:this.isHighlightEnd(e),isToday:t.compareDates(e,new Date),isWeekend:i||l,isSaturday:i,isSunday:l,isPreviousMonth:r,isNextMonth:n}}}};function Ie(e,t,s,n,r,i){const l=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"month","up-button-classes":"day__month_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleDay),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createElementVNode("div",{class:a.normalizeClass({"flex-rtl":e.isRtl})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysOfWeek,o=>(a.openBlock(),a.createElementBlock("span",{class:"cell day-header",key:o.timestamp},a.toDisplayString(o),1))),128)),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.days,"is-rtl":e.isRtl,"show-edge-dates":s.showEdgeDates,"tabbable-cell-id":e.tabbableCellId,view:"day",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(s.dayCellContent(o)),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","show-edge-dates","tabbable-cell-id"])],2)],38)),[[a.vShow,e.visible]])}const Ae=f(Oe,[["render",Ie]]),Ye={name:"PickerMonth",components:{PickerHeader:C,PickerCells:M},mixins:[S],emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="year"},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageYear:!1},months(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(e.getUTCFullYear(),0,e.getUTCDate())):new Date(e.getFullYear(),0,e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<12;n++)t.push({month:this.utils.getMonthName(s),timestamp:s.getTime(),isDisabled:this.isDisabledMonth(s),isSelected:this.isSelectedMonth(s),isToday:this.isTodayMonth(s)}),this.utils.setMonth(s,this.utils.getMonth(s)+1);return t},pageTitleMonth(){const e=w[this.language]||"";return`${this.pageYear}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e,focusRefs:t})},isSelectedMonth(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)&&this.utils.getMonth(this.selectedDate)===this.utils.getMonth(e)},isDisabledMonth(e){return this.disabledDates?new c(this.utils,this.disabledDates).isMonthDisabled(e):!1},isTodayMonth(e){const{utils:t}=this,s=new Date(t.setDate(t.getNewDateObject(),1));return t.compareDates(e,s)}}};function Ue(e,t,s,n,r,i){const l=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"year","up-button-classes":"month__year_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleMonth),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.months,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"month",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.month),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const xe=f(Ye,[["render",Ue]]),He={name:"PickerYear",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{highlighted:{type:Object,default(){return{}}}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t))},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageDecadeEnd:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageDecadeStart:!1},pageDecadeStart(){return Math.floor(this.pageYear/10)*10},pageDecadeEnd(){return this.pageDecadeStart+10-1},years(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(Math.floor(e.getUTCFullYear()/10)*10,e.getUTCMonth(),e.getUTCDate())):new Date(Math.floor(e.getFullYear()/10)*10,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<10;n++)t.push({year:this.utils.getFullYear(s),timestamp:s.getTime(),isDisabled:this.isDisabledYear(s),isSelected:this.isSelectedYear(s),isToday:this.isTodayYear(s)}),this.utils.setFullYear(s,this.utils.getFullYear(s)+1);return t},pageTitleYear(){const e=w[this.language]||"";return`${this.pageDecadeStart} - ${this.pageDecadeEnd}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e*10,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e*10,focusRefs:t})},isSelectedYear(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)},isDisabledYear(e){return this.disabledDates?new c(this.utils,this.disabledDates).isYearDisabled(e):!1},isTodayYear(e){const{utils:t}=this,s=t.getFullYear(t.getNewDateObject());return t.getFullYear(e)===s}}};function $e(e,t,s,n,r,i){const l=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[4]||(t[4]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":!0,onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleYear),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.years,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"year",onArrow:t[2]||(t[2]=o=>e.handleArrow(o)),onSelect:t[3]||(t[3]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.year),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const We=f(He,[["render",$e]]),ze="",Le={name:"DatePicker",components:{DateInput:Ce,PickerDay:Ae,PickerMonth:xe,PickerYear:We},mixins:[N,Se],props:{calendarClass:{type:[String,Object,Array],default:""},dayCellContent:{type:Function},disabledDates:{type:Object},firstDayOfWeek:{type:String},fullMonthName:{type:Boolean},highlighted:{type:Object},initialView:{type:String,default:""},language:{type:Object,default(){return b}},maximumView:{type:String,default:"year"},minimumView:{type:String,default:"day"},mondayFirst:{type:Boolean},openDate:{validator:e=>T.validateDateInput(e)},parseTypedDate:{type:Function},showEdgeDates:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean},value:{validator:e=>T.validateDateInput(e)},wrapperClass:{type:[String,Object,Array],default:""}},emits:{changedMonth:e=>typeof e=="object",changedYear:e=>typeof e=="object",changedDecade:e=>typeof e=="object",cleared:null,closed:null,input:e=>e instanceof Date||e===null,opened:null,selected:e=>e instanceof Date||e===null,selectedDisabled:e=>typeof e=="object"},data(){const e=this.openDate?new Date(this.openDate):new Date,t=h(this.useUtc,this.language);return{calendarHeight:0,latestValidTypedDate:null,pageTimestamp:t.setDate(e,1),selectedDate:null,slideDuration:250,resetTypedDate:new Date,utils:t,view:""}},watch:{disabledDates:{handler(){const e=this.selectedDate||this.parseValue(this.value);if(e){if(this.isDateDisabled(e)&&e){this.setDate(null);return}this.dateHasChanged(e)&&this.setDate(e)}},deep:!0},initialView(){this.isOpen&&this.setInitialView()},language(e){this.utils=h(this.useUtc,e)},latestValidTypedDate(e){this.setPageDate(e)},useUtc(e){this.utils=h(e,this.language)},value(e){this.setValue(e)},openDate(){this.setPageDate()}},computed:{computedInitialView(){return this.initialView?this.initialView:this.minimumView},computedOpenDate(){const e=this.parseValue(this.openDate),t=this.utils.getNewDateObject(e),s=this.selectedDate||t;return this.minimumView==="day"?s:new Date(this.utils.setDate(s,1))},calendarStyle(){return{position:this.isInline?"static":void 0}},isInline(){return!!this.inline},isOpen(){return this.view!==""},isRtl(){return F.indexOf(this.language)!==-1},isUpDisabled(){return!this.allowedToShowView(this.nextView.up)},nextView(){const e=["day","month","year"],t=i=>i===this.view,s=e.findIndex(t),n=i=>i<=0?void 0:e[i-1];return{up:(i=>{if(!(i<0))return i===e.length-1?"decade":e[i+1]})(s),down:n(s)}},pageDate(){return new Date(this.pageTimestamp)},picker(){const e=this.view||this.computedInitialView;return`Picker${this.ucFirst(e)}`}},methods:{resetDefaultPageDate(){if(this.selectedDate===null){this.setPageDate();return}this.setPageDate(this.selectedDate)},open(){if(this.disabled||this.isInline)return!1;this.setInitialView(),this.reviewFocus(),this.$emit("opened")},parseValue(e){if(typeof e=="string"||typeof e=="number"){const t=new Date(e);return this.utils.isValidDate(t)?t:null}return this.utils.isValidDate(e)?e:null},selectTypedDate(e){this.setDate(e.getTime()),this.reviewFocus(),this.isOpen&&this.close()},setInitialView(){const e=this.computedInitialView;if(!this.allowedToShowView(e))throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`);this.setView(e)},allowedToShowView(e){const t=["day","month","year"],s=t.indexOf(this.minimumView),n=t.indexOf(this.maximumView),r=t.indexOf(e);return r>=s&&r<=n},setDate(e){const t=new Date(e);this.selectedDate=t,this.setPageDate(t),this.$emit("selected",t),this.$emit("input",t)},clearDate(){this.selectedDate=null,this.setPageDate(),this.$emit("selected",null),this.$emit("input",null),this.focus.refs=["input"],this.close(),this.$emit("cleared")},handleSelect(e){if(this.allowedToShowView(this.nextView.down)){this.showNextViewDown(e);return}this.$refs.dateInput.typedDate="",this.setDate(e.timestamp),this.focus.delay=e.isNextMonth?this.slideDuration:0,this.focus.refs=this.isInline?["tabbableCell"]:["input"],this.close(),this.reviewFocus(),this.resetTypedDate=new Date},selectDisabledDate(e){this.$emit("selectedDisabled",e)},setValue(e){if(typeof e=="string"||typeof e=="number"){const t=this.utils.parseDate(e,this.format);e=isNaN(t.valueOf())?null:t}this.selectedDate=e||null,this.setPageDate(e),this.typeable&&(this.latestValidTypedDate=e||this.computedOpenDate)},setView(e){this.allowedToShowView(e)&&(this.view=e)},setPageDate(e){e||(this.openDate?e=new Date(this.openDate):e=new Date),this.pageTimestamp=this.utils.setDate(new Date(e),1)},setTypedDate(e){const t=new Date(this.pageDate);if(this.latestValidTypedDate=e||this.computedOpenDate,this.setPageDate(e),this.isPageChange(t)){this.handlePageChange({focusRefs:[],pageDate:this.pageDate});return}this.setTabbableCell()},close(){this.isInline||(this.view="",this.isClickOutside?this.isClickOutside=!1:this.reviewFocus(),this.$emit("closed"))},handlePageChange({focusRefs:e,pageDate:t}){this.setPageDate(t),this.focus.refs=e,this.focus.delay=this.slideDuration||250,this.reviewFocus(),this.$emit(`changed${this.ucFirst(this.nextView.up)}`,t)},hasClass(e,t){return e&&e.className.split(" ").includes(t)},isPageChange(e){return this.isOpen?e.valueOf()!==this.pageDate.valueOf():!1},init(){this.typeable&&(this.latestValidTypedDate=this.selectedDate||this.computedOpenDate),this.value&&this.setValue(this.value),this.isInline&&this.setInitialView()},isDateDisabled(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},showNextViewDown(e){this.setPageDate(new Date(e.timestamp)),this.$emit(`changed${this.ucFirst(this.view)}`,e),this.setView(this.nextView.down)},ucFirst(e){return e[0].toUpperCase()+e.substring(1)}},mounted(){this.init()}};function Re(e,t,s,n,r,i){const l=a.resolveComponent("date-input");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vdp-datepicker",[s.wrapperClass,i.isRtl?"rtl":""]])},[a.createVNode(l,{id:e.id,ref:"dateInput",autofocus:e.autofocus,"bootstrap-styling":e.bootstrapStyling,"calendar-button":e.calendarButton,"calendar-button-icon":e.calendarButtonIcon,"calendar-button-icon-content":e.calendarButtonIconContent,"clear-button":e.clearButton,"clear-button-icon":e.clearButtonIcon,disabled:e.disabled,format:e.format,inline:e.inline,"input-class":e.inputClass,"is-open":i.isOpen,language:s.language,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,"parse-typed-date":s.parseTypedDate,pattern:e.pattern,placeholder:e.placeholder,"ref-name":e.refName,required:e.required,"reset-typed-date":r.resetTypedDate,"selected-date":r.selectedDate,"show-calendar-on-focus":e.showCalendarOnFocus,tabindex:e.tabindex,typeable:e.typeable,"use-utc":e.useUtc,onClearDate:i.clearDate,onCloseCalendar:i.close,onOpen:i.open,onSelectTypedDate:i.selectTypedDate,onSetFocus:t[0]||(t[0]=u=>e.setFocus(u)),onTypedDate:i.setTypedDate},{calendarBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"calendarBtn")]),beforeDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeDateInput")]),clearBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"clearBtn")]),afterDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"afterDateInput")]),_:3},8,["id","autofocus","bootstrap-styling","calendar-button","calendar-button-icon","calendar-button-icon-content","clear-button","clear-button-icon","disabled","format","inline","input-class","is-open","language","maxlength","name","open-date","parse-typed-date","pattern","placeholder","ref-name","required","reset-typed-date","selected-date","show-calendar-on-focus","tabindex","typeable","use-utc","onClearDate","onCloseCalendar","onOpen","onSelectTypedDate","onTypedDate"]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.picker),{ref:"picker","bootstrap-styling":e.bootstrapStyling,calendarClass:s.calendarClass,calendarStyle:i.calendarStyle,dayCellContent:s.dayCellContent,disabledDates:s.disabledDates,firstDayOfWeek:s.firstDayOfWeek,highlighted:s.highlighted,"is-typeable":e.typeable,"is-up-disabled":i.isUpDisabled,language:s.language,mondayFirst:s.mondayFirst,pageDate:i.pageDate,selectedDate:r.selectedDate,showEdgeDates:s.showEdgeDates,showFullMonthName:s.fullMonthName,"slide-duration":r.slideDuration,"tabbable-cell-id":e.tabbableCellId,twoLetterAbbr:s.twoLetterAbbr,"use-utc":e.useUtc,visible:i.isOpen,onPageChange:i.handlePageChange,onSelect:i.handleSelect,onSetFocus:t[1]||(t[1]=u=>e.setFocus(u)),onSetView:i.setView,onSelectedDisabled:i.selectDisabledDate},{beforeCalendarHeader:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeCalendarHeader")]),_:3},40,["bootstrap-styling","calendarClass","calendarStyle","dayCellContent","disabledDates","firstDayOfWeek","highlighted","is-typeable","is-up-disabled","language","mondayFirst","pageDate","selectedDate","showEdgeDates","showFullMonthName","slide-duration","tabbable-cell-id","twoLetterAbbr","use-utc","visible","onPageChange","onSelect","onSetView","onSelectedDisabled"]))],2)}return f(Le,[["render",Re]])}(dateFns,Vue);
*/function D(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):e.defaultWidth,n=e.formats[s]||e.formats[e.defaultWidth];return n}}function m(e){return function(t,s){var n=s!=null&&s.context?String(s.context):"standalone",l;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,r=s!=null&&s.width?String(s.width):i;l=e.formattingValues[r]||e.formattingValues[i]}else{var u=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;l=e.values[o]||e.values[u]}var g=e.argumentCallback?e.argumentCallback(t):t;return l[g]}}function p(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,l=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(l);if(!i)return null;var r=i[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(u)?B(u,function(v){return v.test(r)}):V(u,function(v){return v.test(r)}),g;g=e.valueCallback?e.valueCallback(o):o,g=s.valueCallback?s.valueCallback(g):g;var Ke=t.slice(r.length);return{value:g,rest:Ke}}}function V(e,t){for(var s in e)if(e.hasOwnProperty(s)&&t(e[s]))return s}function B(e,t){for(var s=0;s<e.length;s++)if(t(e[s]))return s}function E(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var l=n[0],i=t.match(e.parsePattern);if(!i)return null;var r=e.valueCallback?e.valueCallback(i[0]):i[0];r=s.valueCallback?s.valueCallback(r):r;var u=t.slice(l.length);return{value:r,rest:u}}}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},I=function(t,s,n){var l,i=O[t];return typeof i=="string"?l=i:s===1?l=i.one:l=i.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+l:l+" ago":l};const A=I;var Y={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},H={date:D({formats:Y,defaultWidth:"full"}),time:D({formats:U,defaultWidth:"full"}),dateTime:D({formats:x,defaultWidth:"full"})};const W=H;var $={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L=function(t,s,n,l){return $[t]};const R=L;var K={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},j={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},q={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},J={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Q=function(t,s){var n=Number(t),l=n%100;if(l>20||l<10)switch(l%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},G={ordinalNumber:Q,era:m({values:K,defaultWidth:"wide"}),quarter:m({values:j,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:m({values:z,defaultWidth:"wide"}),day:m({values:q,defaultWidth:"wide"}),dayPeriod:m({values:J,defaultWidth:"wide",formattingValues:X,defaultFormattingWidth:"wide"})};const Z=G;var _=/^(\d+)(th|st|nd|rd)?/i,ee=/\d+/i,te={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},se={any:[/^b/i,/^(a|c)/i]},ae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ie={any:[/1/i,/2/i,/3/i,/4/i]},ne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},re={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},le={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ue={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},de={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:E({matchPattern:_,parsePattern:ee,valueCallback:function(t){return parseInt(t,10)}}),era:p({matchPatterns:te,defaultMatchWidth:"wide",parsePatterns:se,defaultParseWidth:"any"}),quarter:p({matchPatterns:ae,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:p({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:re,defaultParseWidth:"any"}),day:p({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:ue,defaultMatchWidth:"any",parsePatterns:de,defaultParseWidth:"any"})},ce={code:"en-US",formatDistance:A,formatLong:W,formatRelative:R,localize:Z,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};const b=ce,P={useUtc:!1,language:b,getFullYear(e){return this.useUtc?e.getUTCFullYear():e.getFullYear()},getMonth(e){return this.useUtc?e.getUTCMonth():e.getMonth()},getDaysInMonth(e){return this.daysInMonth(this.getFullYear(e),this.getMonth(e))},getDate(e){return this.useUtc?e.getUTCDate():e.getDate()},getDay(e){return this.useUtc?e.getUTCDay():e.getDay()},getHours(e){return this.useUtc?e.getUTCHours():e.getHours()},getMinutes(e){return this.useUtc?e.getUTCMinutes():e.getMinutes()},setFullYear(e,t){return this.useUtc?e.setUTCFullYear(t):e.setFullYear(t)},setMonth(e,t){return this.useUtc?e.setUTCMonth(t):e.setMonth(t)},setDate(e,t){return this.useUtc?e.setUTCDate(t):e.setDate(t)},compareDates(e,t){const s=new Date(e.getTime()),n=new Date(t.getTime());return this.useUtc?(s.setUTCHours(0,0,0,0),n.setUTCHours(0,0,0,0)):(s.setHours(0,0,0,0),n.setHours(0,0,0,0)),s.getTime()===n.getTime()},isValidDate(e){return Object.prototype.toString.call(e)!=="[object Date]"?!1:!isNaN(e.getTime())},getDayNameAbbr(e){if(typeof e!="object")throw TypeError("Invalid Type");return d.format(e,"ccc",{locale:this.language})},getDayFromAbbr(e){const t=new Date,s=[0,1,2,3,4,5,6];let n=s.map(l=>d.format(d.setDay(t,l),"ccc",{locale:b}));for(let l=0;l<n.length;l++)if(e.toLowerCase()===n[l].toLowerCase())return l;if(this.language!==b){n=s.map(l=>d.format(d.setDay(t,l),"ccc",{locale:this.language}));for(let l=0;l<n.length;l++)if(e.toLowerCase()===n[l].toLowerCase())return l}throw TypeError("Invalid week day")},getMonthName(e){if(typeof e=="object")return d.format(e,"LLLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLLL",{locale:this.language});throw TypeError("Invalid type")},getMonthNameAbbr(e){if(typeof e=="object")return d.format(e,"LLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLL",{locale:this.language});throw TypeError("Invalid type")},daysInMonth(e,t){return/8|3|5|10/.test(t)?30:t===1?!(e%4)&&e%100||!(e%400)?29:28:31},getNthSuffix(e){switch(e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},getDaysStartingOn(e,t=!1){const s=new Date,n=[0,1,2,3,4,5,6];let l="ccc";return t&&(l="cccccc"),n.map(i=>d.format(d.setDay(s,i+e),l,{locale:this.language}))},formatDate(e,t){return d.format(e,t,{locale:this.language})},parseDate(e,t="yyyy-MM-dd"){if(typeof e=="string")return d.parse(e,t,new Date,{locale:this.language});if(typeof e=="number")return d.toDate(e)},validateDateInput(e){return e===null||e instanceof Date||typeof e=="string"||typeof e=="number"},resetDateTime(e){return new Date(this.useUtc?e.setUTCHours(0,0,0,0):e.setHours(0,0,0,0))},getNewDateObject(e){return e?this.resetDateTime(new Date(e)):this.resetDateTime(new Date)}},h=(e=!1,t=b)=>({...P,useUtc:e,language:t}),T={...P},F=["dv","fa","ha","he","kwh","ks","ku","ps","ur","yi"],fe=["ja","lt","mn","ko"],w={zh:"年",ja:"年",ko:"년"},N={props:{autofocus:{type:Boolean,default:!1},bootstrapStyling:{type:Boolean,default:!1},clearButton:{type:Boolean,default:!1},clearButtonIcon:{type:String,default:null},calendarButton:{type:Boolean,default:!1},calendarButtonIcon:{type:String,default:null},calendarButtonIconContent:{type:String,default:null},disabled:{type:Boolean,default:!1},format:{type:[String,Function],default:"dd MMM yyyy"},id:{type:String,default:null},inline:{type:Boolean,default:!1},inputClass:{type:[String,Object,Array],default:null},maxlength:{type:[Number,String],default:null},name:{type:String,default:null},pattern:{type:String,default:null},placeholder:{type:String,default:null},refName:{type:String,default:""},required:{type:Boolean,default:!1},showCalendarOnFocus:{type:Boolean,default:!1},tabindex:{type:[Number,String],default:null},typeable:{type:Boolean,default:!1},useUtc:{type:Boolean,default:!1}}},f=(e,t)=>{const s=e.__vccOpts||e;for(const[n,l]of t)s[n]=l;return s},ge={name:"DateInput",mixins:[N],props:{isOpen:{type:Boolean,default:!1},language:{type:Object},openDate:Date,parseTypedDate:Function,resetTypedDate:[Date],selectedDate:{type:Date,default:null}},emits:{clearDate:null,closeCalendar:null,open:null,selectTypedDate:e=>e===null||e instanceof Date,setFocus:e=>e.every(t=>["calendarButton","input","prev","up","next","tabbableCell"].includes(t)),typedDate:e=>e===null||e instanceof Date},data(){return{input:null,typedDate:!1,utils:h(this.useUtc,this.language)}},computed:{formattedValue(){return this.selectedDate?this.typedDate?this.typedDate:typeof this.format=="function"?this.format(this.selectedDate):this.utils.formatDate(this.selectedDate,this.format):null},computedInputClass(){return this.bootstrapStyling?typeof this.inputClass=="string"?[this.inputClass,"form-control"].join(" "):{"form-control":!0,...this.inputClass}:this.inputClass}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)},resetTypedDate(){this.typedDate=!1}},mounted(){this.input=this.$el.querySelector("input")},methods:{showCalendar(){this.showCalendarOnFocus||this.toggle()},showFocusCalendar(){this.showCalendarOnFocus&&!this.isOpen&&this.$emit("open")},handleKeydownDown(){this.isOpen||this.$emit("open"),this.typeable&&this.$emit("setFocus",["prev","up","next","tabbableCell"])},handleKeydownEnter(){if(!this.typeable)return;if(!this.input.value){this.$emit("selectTypedDate",null);return}const e=this.getTypedDate(this.input.value);isNaN(e)||(this.typedDate=this.input.value,this.$emit("selectTypedDate",e))},handleKeydownEscape(){this.$emit("closeCalendar")},handleKeydownSpace(e){this.typeable||e.preventDefault()},keyUp(e){if(!(!this.typeable||["Control","Escape","Shift","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))){if(!this.input.value){this.$emit("typedDate",null);return}if(this.typeable){const t=this.getTypedDate(this.input.value);isNaN(t)||(this.typedDate=this.input.value,this.$emit("typedDate",t))}}},handleKeyupSpace(e){if(this.typeable){this.input.value===""&&this.toggle();return}e.preventDefault(),this.toggle()},inputBlurred(){this.typeable&&isNaN(this.getTypedDate(this.input.value))&&(this.clearDate(),this.input.value=null,this.typedDate=null)},handleDelete(){!this.typeable&&this.selectedDate&&this.clearDate()},clearDate(){this.$emit("clearDate")},getTypedDate(e){return typeof this.parseTypedDate=="function"?this.parseTypedDate(e):this.utils.parseDate(e,typeof this.format=="string"?this.format:void 0)},toggle(e){this.isOpen&&this.$emit("setFocus",[e||"input"]),this.$emit(this.isOpen?"closeCalendar":"open")}}},me=["disabled"],pe={key:0},be=["id","autofocus","clear-button","disabled","maxlength","name","open-date","pattern","placeholder","readonly","required","tabindex","type","value"],ye=["disabled"],De={key:0};function we(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"input-group":e.bootstrapStyling})},[e.calendarButton?(a.openBlock(),a.createElementBlock("button",{key:0,ref:"calendarButton",class:a.normalizeClass(["vdp-datepicker__calendar-button",{"btn input-group-prepend":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[0]||(t[0]=r=>i.toggle("calendarButton"))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"calendarBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.calendarButtonIcon)},[a.createTextVNode(a.toDisplayString(e.calendarButtonIconContent)+" ",1),e.calendarButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",pe,"…"))],2)])],2)],10,me)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"beforeDateInput"),a.createElementVNode("input",{id:e.id,ref:e.refName,autocomplete:"off",autofocus:e.autofocus,class:a.normalizeClass(i.computedInputClass),"clear-button":e.clearButton,disabled:e.disabled,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,pattern:e.pattern,placeholder:e.placeholder,readonly:!e.typeable,required:e.required,tabindex:e.tabindex,type:e.inline?"hidden":"text",value:i.formattedValue,onBlur:t[1]||(t[1]=(...r)=>i.inputBlurred&&i.inputBlurred(...r)),onClick:t[2]||(t[2]=(...r)=>i.showCalendar&&i.showCalendar(...r)),onFocus:t[3]||(t[3]=(...r)=>i.showFocusCalendar&&i.showFocusCalendar(...r)),onKeydown:[t[4]||(t[4]=a.withKeys((...r)=>i.handleDelete&&i.handleDelete(...r),["delete"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownDown&&i.handleKeydownDown(...r),["prevent"]),["down"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownEnter&&i.handleKeydownEnter(...r),["prevent"]),["enter"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownEscape&&i.handleKeydownEscape(...r),["prevent"]),["esc"])),t[8]||(t[8]=a.withKeys(r=>i.handleKeydownSpace(r),["space"]))],onKeyup:[t[9]||(t[9]=(...r)=>i.keyUp&&i.keyUp(...r)),t[10]||(t[10]=a.withKeys(r=>i.handleKeyupSpace(r),["space"]))]},null,42,be),e.clearButton&&s.selectedDate?(a.openBlock(),a.createElementBlock("button",{key:1,class:a.normalizeClass(["vdp-datepicker__clear-button",{"btn input-group-append":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[11]||(t[11]=(...r)=>i.clearDate&&i.clearDate(...r))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"clearBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.clearButtonIcon)},[e.clearButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",De,"×"))],2)])],2)],10,ye)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"afterDateInput")],2)}const Ce=f(ge,[["render",we]]),Me={isDefined(e,t){return e&&typeof e[t]<"u"},hasArray(e,t){return e&&Array.isArray(e[t])},hasDate(e,t){return this.isDefined(e,t)&&this.utils.isValidDate(e[t])},dayMonthYear(e,t){const{utils:s}=this;if(!this.hasDate(e,t))return{day:void 0,month:void 0,year:void 0};const l=e[t];return{day:s.getDate(l),month:s.getMonth(l),year:s.getFullYear(l)}}},y=e=>({...Me,utils:e});class c{constructor(t,s){this._utils=t,this._disabledDates=s}get config(){const t=this._disabledDates,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to")};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}daysInMonth(t){const s=this._utils,n=s.getMonth(t),l=s.getFullYear(t);return s.daysInMonth(l,n)}isDateDisabledVia(t){const s=this._disabledDates,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:l}=s,i=y(this._utils);return l.some(r=>{const u=i.isDefined(r,"from"),o=i.isDefined(r,"to");return u&&o&&t<r.to&&t>r.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(l=>this._utils.compareDates(t,l)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isMonthDisabledVia(t){const{from:s,has:n,to:l}=this.config,i=this._utils.getMonth(t),r=this._utils.getFullYear(t);return{to:()=>n.to&&r<l.year?!0:n.to&&i<l.month&&r<=l.year,from:()=>n.from&&r>s.year?!0:n.from&&i>s.month&&r>=s.year}}isYearDisabledVia(t){const{from:s,has:n,to:l}=this.config,i=this._utils.getFullYear(t);return{to:()=>n.to&&i<l.year,from:()=>n.from&&i>s.year}}isDateDisabled(t){const s=this.isDateDisabledVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isMonthDisabled(t){const s=this.isMonthDisabledVia(t);if(s.to()||s.from())return!0;for(let n=1;n<=this.daysInMonth(t);n++){const l=new Date(t);if(l.setDate(n),!this.isDateDisabled(l))return!1}return!0}isYearDisabled(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const l=new Date(t);if(l.setMonth(n),!this.isMonthDisabled(l))return!1}return!0}getEarliestPossibleDate(t){if(!t)return null;const s=this._utils;if(this.isDateDisabled(t)){const n=new Date(s.getFullYear(t),s.getMonth(t),s.getDate(t)+1);return this.getEarliestPossibleDate(n)}return t}getLatestPossibleDate(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const l=new Date(t);if(l.setMonth(n),!this.isMonthDisabled(l))return!1}return!0}}const Se={data(){return{focus:{delay:0,refs:[]},navElements:[],navElementsFocusedIndex:0,resetTabbableCell:!1,tabbableCell:null}},computed:{fallbackElementsToFocus(){const e=["tabbableCell","prev","next"];return this.typeable&&e.unshift("input"),e},tabbableCellId(){return this.tabbableCell&&Number(this.tabbableCell.getAttribute("data-id"))}},methods:{getCellDate(e){switch(this.view){case"month":return new Date(this.utils.setDate(e,1));case"year":return new Date(this.utils.setMonth(new Date(this.utils.setDate(e,1)),0));default:return e}},applyFocus(){const e=[...this.focus.refs,...this.fallbackElementsToFocus];for(let t=0;t<e.length;t++){const s=this.getElementByRef(e[t]);if(s&&s.getAttribute("disabled")===null){s.focus(),this.setNavElementsFocusedIndex();break}}},getActiveCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell"),s=this.hasClass(e,this.view);return t&&s&&!this.resetTabbableCell?e:null},getActiveElement(){return document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement},getCellId(e){if(!e||!this.$refs.picker.$refs.cells)return null;const t=this.getCellDate(e),{cells:s}=this.$refs.picker.$refs.cells;for(let n=0;n<s.length;n++)if(s[n].timestamp===t.valueOf())return n;return null},getElementByRef(e){return e==="tabbableCell"?this.tabbableCell:e==="input"?this.$refs.dateInput&&this.$refs.dateInput.$refs[this.refName]:e==="calendarButton"?this.$refs.dateInput&&this.$refs.dateInput.$refs.calendarButton:this.$refs.picker&&this.$refs.picker.$refs.pickerHeader&&this.$refs.picker.$refs.pickerHeader.$refs[e]},getElementsFromSlot(e){if(!this.hasSlot(e))return[];if(e==="beforeCalendarHeader")return this.getFocusableElements(this.$refs.view.children[0]);const t=e.indexOf("beforeCalendarHeader")>-1,s=this.$refs.picker.$el,n=t?0:s.children.length-1;return this.getFocusableElements(s.children[n])},getElementsFromHeader(){if(!this.$refs.picker.$refs.pickerHeader)return[];const t=this.$refs.picker.$refs.pickerHeader.$el.querySelectorAll("button:enabled");return[...Array.prototype.slice.call(t)]},getFocusableElements(e){if(!e)return[];const t=e.querySelectorAll('button:enabled:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]):not([type=hidden]), select:enabled:not([tabindex="-1"]), textarea:enabled:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])');return[...Array.prototype.slice.call(t)]},getInputField(){return!this.typeable||this.inline?null:this.$refs.dateInput.$refs[this.refName]},getTypedCell(){if(!this.typeable)return null;const e=this.getCellId(this.latestValidTypedDate);return e?this.$refs.picker.$refs.cells.$el.children[e]:null},hasSlot(e){return!!this.$slots[e]},reviewFocus(){this.tabbableCell=null,this.resetTabbableCell=!0,this.$nextTick(()=>{this.setNavElements(),setTimeout(()=>{this.applyFocus()},this.focus.delay),this.resetTabbableCell=!1})},setFocus(e){this.focus.refs=e,this.applyFocus()},setNavElements(){if(!this.view)return;this.updateTabbableCell();const e=this.ucFirst(this.view);this.navElements=[this.getInputField(),this.getElementsFromSlot("beforeCalendarHeader"),this.getElementsFromSlot(`beforeCalendarHeader${e}`),this.getElementsFromHeader(),this.tabbableCell].filter(t=>!!t).reduce((t,s)=>t.concat(s),[])},setNavElementsFocusedIndex(){const e=this.getActiveElement();for(let t=0;t<this.navElements.length;t++)if(e===this.navElements[t]){this.navElementsFocusedIndex=t;return}this.navElementsFocusedIndex=0},setTabbableCell(){if(!this.$refs.picker||!this.$refs.picker.$refs.cells)return;const e=this.$refs.picker.$refs.cells.$el;this.tabbableCell=this.getActiveCell()||this.getTypedCell()||e.querySelector("button.selected:not(.muted):enabled")||e.querySelector("button.today:not(.muted):enabled")||e.querySelector("button.cell:not(.muted):enabled")},updateTabbableCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell");(!this.tabbableCell||t)&&this.setTabbableCell()}}},ke={props:{bootstrapStyling:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,required:!0},isPreviousDisabled:{type:Boolean,required:!0},isRtl:{type:Boolean,required:!0},isUpDisabled:{type:Boolean,default:!1},nextViewUp:{type:String,default:null},upButtonClasses:{type:String}},emits:{focusInput:null,pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>["day","month","year"].includes(e)},computed:{leftButton(){return[this.isRtl?"next":"prev"]},rightButton(){return[this.isRtl?"prev":"next"]}},methods:{arrowLeftPrev(){if(this.isRtl){this.$emit("setFocus",["up","next","tabbableCell"]);return}this.goToPreviousPage()},arrowRightPrev(){if(this.isRtl){this.goToPreviousPage();return}this.$emit("setFocus",["up","next","tabbableCell"])},arrowLeftNext(){if(this.isRtl){this.goToNextPage();return}this.$emit("setFocus",["up","prev","tabbableCell"])},arrowRightNext(){if(this.isRtl){this.$emit("setFocus",["up","prev","tabbableCell"]);return}this.goToNextPage()},focusInput(){this.$emit("focusInput")},focusTabbableCell(){this.$emit("setFocus",["tabbableCell"])},focusLeftButton(){this.$emit("setFocus",this.leftButton)},focusRightButton(){this.$emit("setFocus",this.rightButton)},goToNextPage(){this.$emit("pageChange",{incrementBy:1,focusRefs:["next"]})},goToPreviousPage(){this.$emit("pageChange",{incrementBy:-1,focusRefs:["prev"]})},selectUpButton(){this.isUpDisabled||this.$emit("setView",this.nextViewUp)}}},ve=["disabled"],Pe={key:1,ref:"up"},Te=["disabled"];function Fe(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("header",null,[a.createElementVNode("button",{ref:"prev",class:a.normalizeClass(["prev",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isPreviousDisabled,type:"button",onClick:t[0]||(t[0]=r=>s.isRtl?i.goToNextPage():i.goToPreviousPage()),onKeydown:[t[1]||(t[1]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[2]||(t[2]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[3]||(t[3]=a.withKeys(a.withModifiers((...r)=>i.arrowLeftPrev&&i.arrowLeftPrev(...r),["prevent"]),["left"])),t[4]||(t[4]=a.withKeys(a.withModifiers((...r)=>i.arrowRightPrev&&i.arrowRightPrev(...r),["prevent"]),["right"]))]},"<",42,ve),s.isUpDisabled?(a.openBlock(),a.createElementBlock("span",Pe,[a.renderSlot(e.$slots,"default")],512)):(a.openBlock(),a.createElementBlock("button",{key:0,ref:"up",class:a.normalizeClass([s.upButtonClasses,"up",{btn:s.bootstrapStyling}]),type:"button",onClick:t[5]||(t[5]=(...r)=>i.selectUpButton&&i.selectUpButton(...r)),onKeydown:[t[6]||(t[6]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[8]||(t[8]=a.withKeys(a.withModifiers((...r)=>i.focusLeftButton&&i.focusLeftButton(...r),["prevent"]),["left"])),t[9]||(t[9]=a.withKeys(a.withModifiers((...r)=>i.focusRightButton&&i.focusRightButton(...r),["prevent"]),["right"]))]},[a.renderSlot(e.$slots,"default")],34)),a.createElementVNode("button",{ref:"next",class:a.normalizeClass(["next",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isNextDisabled,type:"button",onClick:t[10]||(t[10]=r=>s.isRtl?i.goToPreviousPage():i.goToNextPage()),onKeydown:[t[11]||(t[11]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[12]||(t[12]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[13]||(t[13]=a.withKeys(a.withModifiers((...r)=>i.arrowLeftNext&&i.arrowLeftNext(...r),["prevent"]),["left"])),t[14]||(t[14]=a.withKeys(a.withModifiers((...r)=>i.arrowRightNext&&i.arrowRightNext(...r),["prevent"]),["right"]))]},">",42,Te)])}const C=f(ke,[["render",Fe]]),Ne={name:"PickerCells",props:{bootstrapStyling:{type:Boolean,default:!1},cells:{type:Array,required:!0},isRtl:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!0},tabbableCellId:{type:Number,default:null},view:{type:String,validator:e=>["day","month","year"].includes(e),required:!0}},emits:{arrow(e){return typeof e=="object"},select(e){return typeof e=="object"}},computed:{columns(){return this.view==="day"?7:3}},methods:{cellClasses(e){return["cell",this.view,{blank:e.date==="",btn:this.bootstrapStyling,disabled:e.isDisabled,"highlight-start":e.isHighlightStart,"highlight-end":e.isHighlightEnd,highlighted:e.isHighlighted,muted:e.isPreviousMonth||e.isNextMonth,sat:e.isSaturday,sun:e.isSunday,selected:this.showEdgeDates?e.isSelected:e.isSelected&&!e.isPreviousMonth&&!e.isNextMonth,today:this.showEdgeDates?e.isToday:e.isToday&&!e.isPreviousMonth&&!e.isNextMonth,weekend:e.isWeekend}]},handleArrow(e,t){this.$emit("arrow",{cellId:e,delta:t})}}},Ve={class:"picker-cells"},Be=["data-id","disabled","onClick","onKeypress","onKeydown"];function Ee(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("div",Ve,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.cells,(r,u)=>(a.openBlock(),a.createElementBlock("button",{key:r.timestamp,class:a.normalizeClass(i.cellClasses(r)),"data-id":u,disabled:r.isDisabled,type:"button",onClick:o=>e.$emit("select",r),onKeypress:[a.withKeys(o=>e.$emit("select",r),["enter"]),a.withKeys(o=>e.$emit("select",r),["space"])],onKeydown:[a.withKeys(a.withModifiers(o=>i.handleArrow(u,-i.columns),["prevent"]),["up"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,i.columns),["prevent"]),["down"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?1:-1),["prevent"]),["left"]),a.withKeys(a.withModifiers(o=>i.handleArrow(u,s.isRtl?-1:1),["prevent"]),["right"])]},[a.renderSlot(e.$slots,"default",{cell:r})],42,Be))),128))])}const M=f(Ne,[["render",Ee]]),S={props:{bootstrapStyling:{type:Boolean,default:!1},calendarClass:[String,Object,Array],calendarStyle:{type:Object},disabledDates:{type:Object},isTypeable:{type:Boolean,default:!1},isUpDisabled:{type:Boolean,default:!1},language:{type:Object},pageDate:{type:Date,default:null},selectedDate:{type:Date,default:null},slideDuration:{type:Number,default:250},tabbableCellId:{type:Number,default:null},useUtc:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:{select:e=>typeof e=="object",selectedDisabled:e=>typeof e=="object",setFocus:e=>e===["input"]},data(){return{utils:h(this.useUtc,this.language)}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)}},computed:{disabledConfig(){return this.disabledDates?new c(this.utils,this.disabledDates).config:{has:{from:!1,to:!1}}},earliestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getEarliestPossibleDate(this.disabledDates.to):null},isRtl(){return F.indexOf(this.language)!==-1},latestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getLatestPossibleDate(this.disabledDates.from):null},pageYear(){return this.utils.getFullYear(this.pageDate)}},methods:{addMoreSteps(e){return e.stepsRemaining<=0&&Math.abs(e.delta)>1?Math.abs(e.delta):e.stepsRemaining},changePageAndSetFocus(e){const{delta:t}=e;t>0&&this.isNextDisabled||t<0&&this.isPreviousDisabled||(this.changePage({incrementBy:Math.sign(t),focusRefs:["arrow-to-cell"]}),this.$nextTick(()=>{this.setFocusOnNewPage(e)}))},focusInput(){this.isTypeable&&this.$emit("setFocus",["input"])},getElement({currentElement:e,delta:t,stepsRemaining:s}){const n=this.getElementSibling(e,t),l={currentElement:n,delta:t,stepsRemaining:s-1};return n?this.isBeyondPossibleDate(l)?this.firstOrLastPossibleDate(l):this.isMutedOrDisabled(n)?(l.stepsRemaining=this.addMoreSteps(l),this.getElement(l)):s>1&&l.currentElement?this.getElement(l):n:this.changePageAndSetFocus(l)},getElementSibling(e,t){return t>0?e.nextElementSibling:e.previousElementSibling},getFirstOrLastElement(e){const t=e>0,s=this.$refs.cells.$el.children;return t?s[0]:s[s.length-1]},firstOrLastPossibleDate({currentElement:e,delta:t}){return t>0?this.getElementSibling(e,-1):this.getElementSibling(e,1)},handleArrow({delta:e}){const t=document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement,s=Math.abs(e),n={currentElement:t,delta:e,stepsRemaining:s};this.setFocusToAvailableCell(n)},select(e){e.isDisabled?this.$emit("selectedDisabled",e):this.$emit("select",e)},isBeyondPossibleDate({currentElement:e,delta:t}){return t>0&&this.latestPossibleDate?this.isDatePossible(e,t):t<0&&this.earliestPossibleDate?this.isDatePossible(e,t):!1},isDatePossible(e,t){const s=e.getAttribute("data-id"),n=new Date(this.cells[s].timestamp);return t>0?n>this.latestPossibleDate:n<this.earliestPossibleDate},isMutedOrDisabled(e){const t=e.classList.value.split(" ").includes("muted"),s=e.disabled;return t||s},setFocusOnNewPage({delta:e,stepsRemaining:t}){const s=this.getFirstOrLastElement(e),n={currentElement:s,delta:e,stepsRemaining:t};if(t<=0){if(this.isMutedOrDisabled(s)){n.stepsRemaining=Math.abs(n.delta),setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration);return}setTimeout(()=>{s.focus()},this.slideDuration);return}setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration)},setFocusToAvailableCell(e){const t=this.getElement(e);t&&t.focus()}}};class k{constructor(t,s,n){this._utils=t,this._disabledDates=s,this._highlighted=n}get config(){const t=this._highlighted,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to"),includeDisabled:s.isDefined(t,"includeDisabled")&&t.includeDisabled};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}isDateDisabled(t){const s=this._utils,n=this._disabledDates;return new c(s,n).isDateDisabled(t)}isHighlightingNotPossible(t){return!this.config.has.includeDisabled&&this.isDateDisabled(t)}isDateHighlightedVia(t){const s=this._highlighted,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:l}=s,i=y(this._utils);return l.some(r=>{const u=i.isDefined(r,"from"),o=i.isDefined(r,"to");return u&&o&&t<=r.to&&t>=r.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(l=>this._utils.compareDates(t,l)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isDateHighlighted(t){if(this.isHighlightingNotPossible(t))return!1;const s=this.isDateHighlightedVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isHighlightStart(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].from.valueOf()===t.valueOf())return!0;return!1}isHighlightEnd(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].to.valueOf()===t.valueOf())return!0;return!1}}const Oe={name:"PickerDay",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{dayCellContent:{type:Function,default:e=>e.date},firstDayOfWeek:{type:String},highlighted:{type:Object,default(){return{}}},mondayFirst:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!1},showFullMonthName:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean,default:!1}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="month"},computed:{currMonthName(){return this.showFullMonthName?this.utils.getMonthName(this.pageMonth):this.utils.getMonthNameAbbr(this.pageMonth)},currYearName(){const e=w[this.language]||"";return`${this.pageYear}${e}`},days(){const e=[],t=this.daysFromPrevMonth+this.daysInMonth+this.daysFromNextMonth,s=this.firstDayCellDate();for(let n=0;n<t;n++)e.push(this.makeDay(s)),this.utils.setDate(s,this.utils.getDate(s)+1);return e},daysFromNextMonth(){const e=this.daysFromPrevMonth+this.daysInMonth;return Math.ceil(e/7)*7-e},daysFromPrevMonth(){const e=this.utils.getDay(this.pageDate);return(7-this.firstDayOfWeekNumber+e)%7},daysInMonth(){return this.utils.getDaysInMonth(this.pageDate)},daysOfWeek(){return this.utils.getDaysStartingOn(this.firstDayOfWeekNumber,this.twoLetterAbbr)},firstDayOfWeekNumber(){return this.mondayFirst?1:this.firstDayOfWeek?this.utils.getDayFromAbbr(this.firstDayOfWeek):0},firstOfNextMonth(){const e=new Date(this.pageDate);return new Date(this.utils.setMonth(e,this.utils.getMonth(e)+1))},isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.month<=this.pageMonth&&this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.month>=this.pageMonth&&this.disabledConfig.to.year>=this.pageYear:!1},pageMonth(){return this.utils.getMonth(this.pageDate)},pageTitleDay(){return fe.indexOf(this.language.code)!==-1?`${this.currYearName} ${this.currMonthName}`:`${this.currMonthName} ${this.currYearName}`}},methods:{firstDayCellDate(){const e=new Date(this.pageDate);return new Date(this.utils.setDate(e,1-this.daysFromPrevMonth))},changeMonth({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setMonth(s,this.utils.getMonth(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeMonth({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeMonth({incrementBy:e,focusRefs:t})},isSelectedDate(e){return this.selectedDate&&this.utils.compareDates(this.selectedDate,e)},isDisabledDate(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},isHighlightedDate(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isDateHighlighted(e):!1},isHighlightStart(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightStart(e):!1},isHighlightEnd(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightEnd(e):!1},makeDay(e){const{utils:t}=this,s=t.getDay(e),n=e>=this.firstOfNextMonth,l=e<this.pageDate,i=s===6,r=s===0;return{date:this.showEdgeDates||!(l||n)?t.getDate(e):"",timestamp:e.getTime(),isSelected:this.isSelectedDate(e),isDisabled:this.isDisabledDate(e),isHighlighted:this.isHighlightedDate(e),isHighlightStart:this.isHighlightStart(e),isHighlightEnd:this.isHighlightEnd(e),isToday:t.compareDates(e,new Date),isWeekend:i||r,isSaturday:i,isSunday:r,isPreviousMonth:l,isNextMonth:n}}}};function Ie(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"month","up-button-classes":"day__month_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleDay),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createElementVNode("div",{class:a.normalizeClass({"flex-rtl":e.isRtl})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysOfWeek,o=>(a.openBlock(),a.createElementBlock("span",{class:"cell day-header",key:o.timestamp},a.toDisplayString(o),1))),128)),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.days,"is-rtl":e.isRtl,"show-edge-dates":s.showEdgeDates,"tabbable-cell-id":e.tabbableCellId,view:"day",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(s.dayCellContent(o)),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","show-edge-dates","tabbable-cell-id"])],2)],38)),[[a.vShow,e.visible]])}const Ae=f(Oe,[["render",Ie]]),Ye={name:"PickerMonth",components:{PickerHeader:C,PickerCells:M},mixins:[S],emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="year"},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageYear:!1},months(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(e.getUTCFullYear(),0,e.getUTCDate())):new Date(e.getFullYear(),0,e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<12;n++)t.push({month:this.utils.getMonthName(s),timestamp:s.getTime(),isDisabled:this.isDisabledMonth(s),isSelected:this.isSelectedMonth(s),isToday:this.isTodayMonth(s)}),this.utils.setMonth(s,this.utils.getMonth(s)+1);return t},pageTitleMonth(){const e=w[this.language]||"";return`${this.pageYear}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e,focusRefs:t})},isSelectedMonth(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)&&this.utils.getMonth(this.selectedDate)===this.utils.getMonth(e)},isDisabledMonth(e){return this.disabledDates?new c(this.utils,this.disabledDates).isMonthDisabled(e):!1},isTodayMonth(e){const{utils:t}=this,s=new Date(t.setDate(t.getNewDateObject(),1));return t.compareDates(e,s)}}};function Ue(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"year","up-button-classes":"month__year_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleMonth),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.months,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"month",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.month),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const xe=f(Ye,[["render",Ue]]),He={name:"PickerYear",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{highlighted:{type:Object,default(){return{}}}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t))},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageDecadeEnd:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageDecadeStart:!1},pageDecadeStart(){return Math.floor(this.pageYear/10)*10},pageDecadeEnd(){return this.pageDecadeStart+10-1},years(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(Math.floor(e.getUTCFullYear()/10)*10,e.getUTCMonth(),e.getUTCDate())):new Date(Math.floor(e.getFullYear()/10)*10,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<10;n++)t.push({year:this.utils.getFullYear(s),timestamp:s.getTime(),isDisabled:this.isDisabledYear(s),isSelected:this.isSelectedYear(s),isToday:this.isTodayYear(s)}),this.utils.setFullYear(s,this.utils.getFullYear(s)+1);return t},pageTitleYear(){const e=w[this.language]||"";return`${this.pageDecadeStart} - ${this.pageDecadeEnd}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e*10,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e*10,focusRefs:t})},isSelectedYear(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)},isDisabledYear(e){return this.disabledDates?new c(this.utils,this.disabledDates).isYearDisabled(e):!1},isTodayYear(e){const{utils:t}=this,s=t.getFullYear(t.getNewDateObject());return t.getFullYear(e)===s}}};function We(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),u=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[4]||(t[4]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":!0,onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleYear),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","onFocusInput"]),a.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.years,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"year",onArrow:t[2]||(t[2]=o=>e.handleArrow(o)),onSelect:t[3]||(t[3]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.year),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const $e=f(He,[["render",We]]),ze="",Le={name:"DatePicker",components:{DateInput:Ce,PickerDay:Ae,PickerMonth:xe,PickerYear:$e},mixins:[N,Se],props:{calendarClass:{type:[String,Object,Array],default:""},dayCellContent:{type:Function},disabledDates:{type:Object},firstDayOfWeek:{type:String},fullMonthName:{type:Boolean},highlighted:{type:Object},initialView:{type:String,default:""},language:{type:Object,default(){return b}},maximumView:{type:String,default:"year"},minimumView:{type:String,default:"day"},mondayFirst:{type:Boolean},openDate:{validator:e=>T.validateDateInput(e)},parseTypedDate:{type:Function},showEdgeDates:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean},value:{validator:e=>T.validateDateInput(e)},wrapperClass:{type:[String,Object,Array],default:""}},emits:{changedMonth:e=>typeof e=="object",changedYear:e=>typeof e=="object",changedDecade:e=>typeof e=="object",cleared:null,closed:null,input:e=>e instanceof Date||e===null,opened:null,selected:e=>e instanceof Date||e===null,selectedDisabled:e=>typeof e=="object"},data(){const e=this.openDate?new Date(this.openDate):new Date,t=h(this.useUtc,this.language);return{calendarHeight:0,latestValidTypedDate:null,pageTimestamp:t.setDate(e,1),selectedDate:null,slideDuration:250,resetTypedDate:new Date,utils:t,view:""}},watch:{disabledDates:{handler(){const e=this.selectedDate||this.parseValue(this.value);if(e){if(this.isDateDisabled(e)&&e){this.setDate(null);return}this.dateHasChanged(e)&&this.setDate(e)}},deep:!0},initialView(){this.isOpen&&this.setInitialView()},language(e){this.utils=h(this.useUtc,e)},latestValidTypedDate(e){this.setPageDate(e)},useUtc(e){this.utils=h(e,this.language)},value(e){this.setValue(e)},openDate(){this.setPageDate()}},computed:{computedInitialView(){return this.initialView?this.initialView:this.minimumView},computedOpenDate(){const e=this.parseValue(this.openDate),t=this.utils.getNewDateObject(e),s=this.selectedDate||t;return this.minimumView==="day"?s:new Date(this.utils.setDate(s,1))},calendarStyle(){return{position:this.isInline?"static":void 0}},isInline(){return!!this.inline},isOpen(){return this.view!==""},isRtl(){return F.indexOf(this.language)!==-1},isUpDisabled(){return!this.allowedToShowView(this.nextView.up)},nextView(){const e=["day","month","year"],t=i=>i===this.view,s=e.findIndex(t),n=i=>i<=0?void 0:e[i-1];return{up:(i=>{if(!(i<0))return i===e.length-1?"decade":e[i+1]})(s),down:n(s)}},pageDate(){return new Date(this.pageTimestamp)},picker(){const e=this.view||this.computedInitialView;return`Picker${this.ucFirst(e)}`}},methods:{resetDefaultPageDate(){if(this.selectedDate===null){this.setPageDate();return}this.setPageDate(this.selectedDate)},open(){if(this.disabled||this.isInline)return!1;this.setInitialView(),this.reviewFocus(),this.$emit("opened")},parseValue(e){if(typeof e=="string"||typeof e=="number"){const t=new Date(e);return this.utils.isValidDate(t)?t:null}return this.utils.isValidDate(e)?e:null},selectTypedDate(e){this.setDate(e.getTime()),this.reviewFocus(),this.isOpen&&this.close()},setInitialView(){const e=this.computedInitialView;if(!this.allowedToShowView(e))throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`);this.setView(e)},allowedToShowView(e){const t=["day","month","year"],s=t.indexOf(this.minimumView),n=t.indexOf(this.maximumView),l=t.indexOf(e);return l>=s&&l<=n},setDate(e){const t=new Date(e);this.selectedDate=t,this.setPageDate(t),this.$emit("selected",t),this.$emit("input",t)},clearDate(){this.selectedDate=null,this.setPageDate(),this.$emit("selected",null),this.$emit("input",null),this.focus.refs=["input"],this.close(),this.$emit("cleared")},handleSelect(e){if(this.allowedToShowView(this.nextView.down)){this.showNextViewDown(e);return}this.$refs.dateInput.typedDate="",this.setDate(e.timestamp),this.focus.delay=e.isNextMonth?this.slideDuration:0,this.focus.refs=this.isInline?["tabbableCell"]:["input"],this.close(),this.reviewFocus(),this.resetTypedDate=new Date},selectDisabledDate(e){this.$emit("selectedDisabled",e)},setValue(e){if(typeof e=="string"||typeof e=="number"){const t=this.utils.parseDate(e,this.format);e=isNaN(t.valueOf())?null:t}this.selectedDate=e||null,this.setPageDate(e),this.typeable&&(this.latestValidTypedDate=e||this.computedOpenDate)},setView(e){this.allowedToShowView(e)&&(this.view=e)},setPageDate(e){e||(this.openDate?e=new Date(this.openDate):e=new Date),this.pageTimestamp=this.utils.setDate(new Date(e),1)},setTypedDate(e){const t=new Date(this.pageDate);if(this.latestValidTypedDate=e||this.computedOpenDate,this.setPageDate(e),this.isPageChange(t)){this.handlePageChange({focusRefs:[],pageDate:this.pageDate});return}this.setTabbableCell()},close(){this.isInline||(this.view="",this.reviewFocus(),this.$emit("closed"))},handlePageChange({focusRefs:e,pageDate:t}){this.setPageDate(t),this.focus.refs=e,this.focus.delay=this.slideDuration||250,this.reviewFocus(),this.$emit(`changed${this.ucFirst(this.nextView.up)}`,t)},hasClass(e,t){return e&&e.className.split(" ").includes(t)},isPageChange(e){return this.isOpen?e.valueOf()!==this.pageDate.valueOf():!1},init(){this.typeable&&(this.latestValidTypedDate=this.selectedDate||this.computedOpenDate),this.value&&this.setValue(this.value),this.isInline&&this.setInitialView()},isDateDisabled(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},showNextViewDown(e){this.setPageDate(new Date(e.timestamp)),this.$emit(`changed${this.ucFirst(this.view)}`,e),this.setView(this.nextView.down)},ucFirst(e){return e[0].toUpperCase()+e.substring(1)}},mounted(){this.init()}};function Re(e,t,s,n,l,i){const r=a.resolveComponent("date-input");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vdp-datepicker",[s.wrapperClass,i.isRtl?"rtl":""]])},[a.createVNode(r,{id:e.id,ref:"dateInput",autofocus:e.autofocus,"bootstrap-styling":e.bootstrapStyling,"calendar-button":e.calendarButton,"calendar-button-icon":e.calendarButtonIcon,"calendar-button-icon-content":e.calendarButtonIconContent,"clear-button":e.clearButton,"clear-button-icon":e.clearButtonIcon,disabled:e.disabled,format:e.format,inline:e.inline,"input-class":e.inputClass,"is-open":i.isOpen,language:s.language,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,"parse-typed-date":s.parseTypedDate,pattern:e.pattern,placeholder:e.placeholder,"ref-name":e.refName,required:e.required,"reset-typed-date":l.resetTypedDate,"selected-date":l.selectedDate,"show-calendar-on-focus":e.showCalendarOnFocus,tabindex:e.tabindex,typeable:e.typeable,"use-utc":e.useUtc,onClearDate:i.clearDate,onCloseCalendar:i.close,onOpen:i.open,onSelectTypedDate:i.selectTypedDate,onSetFocus:t[0]||(t[0]=u=>e.setFocus(u)),onTypedDate:i.setTypedDate},{calendarBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"calendarBtn")]),beforeDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeDateInput")]),clearBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"clearBtn")]),afterDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"afterDateInput")]),_:3},8,["id","autofocus","bootstrap-styling","calendar-button","calendar-button-icon","calendar-button-icon-content","clear-button","clear-button-icon","disabled","format","inline","input-class","is-open","language","maxlength","name","open-date","parse-typed-date","pattern","placeholder","ref-name","required","reset-typed-date","selected-date","show-calendar-on-focus","tabindex","typeable","use-utc","onClearDate","onCloseCalendar","onOpen","onSelectTypedDate","onTypedDate"]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.picker),{ref:"picker","bootstrap-styling":e.bootstrapStyling,calendarClass:s.calendarClass,calendarStyle:i.calendarStyle,dayCellContent:s.dayCellContent,disabledDates:s.disabledDates,firstDayOfWeek:s.firstDayOfWeek,highlighted:s.highlighted,"is-typeable":e.typeable,"is-up-disabled":i.isUpDisabled,language:s.language,mondayFirst:s.mondayFirst,pageDate:i.pageDate,selectedDate:l.selectedDate,showEdgeDates:s.showEdgeDates,showFullMonthName:s.fullMonthName,"slide-duration":l.slideDuration,"tabbable-cell-id":e.tabbableCellId,twoLetterAbbr:s.twoLetterAbbr,"use-utc":e.useUtc,visible:i.isOpen,onPageChange:i.handlePageChange,onSelect:i.handleSelect,onSetFocus:t[1]||(t[1]=u=>e.setFocus(u)),onSetView:i.setView,onSelectedDisabled:i.selectDisabledDate},{beforeCalendarHeader:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeCalendarHeader")]),_:3},40,["bootstrap-styling","calendarClass","calendarStyle","dayCellContent","disabledDates","firstDayOfWeek","highlighted","is-typeable","is-up-disabled","language","mondayFirst","pageDate","selectedDate","showEdgeDates","showFullMonthName","slide-duration","tabbable-cell-id","twoLetterAbbr","use-utc","visible","onPageChange","onSelect","onSetView","onSelectedDisabled"]))],2)}return f(Le,[["render",Re]])}(dateFns,Vue);

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

(function(d,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("date-fns"),require("vue")):typeof define=="function"&&define.amd?define(["date-fns","vue"],i):(d=typeof globalThis<"u"?globalThis:d||self,d.vuejsDatepicker=i(d.dateFns,d.Vue))})(this,function(d,i){"use strict";/*!
* vuejs-datepicker v4.1.3
(function(u,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("date-fns"),require("vue")):typeof define=="function"&&define.amd?define(["date-fns","vue"],a):(u=typeof globalThis<"u"?globalThis:u||self,u.vuejsDatepicker=a(u.dateFns,u.Vue))})(this,function(u,a){"use strict";/*!
* vuejs-datepicker v4.1.4
* (c) 2023-2023 Wesley Hobbie
* Released under the MIT License.
*/function D(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):e.defaultWidth,n=e.formats[s]||e.formats[e.defaultWidth];return n}}function m(e){return function(t,s){var n=s!=null&&s.context?String(s.context):"standalone",r;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=s!=null&&s.width?String(s.width):a;r=e.formattingValues[l]||e.formattingValues[a]}else{var u=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;r=e.values[o]||e.values[u]}var g=e.argumentCallback?e.argumentCallback(t):t;return r[g]}}function p(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;var l=a[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(u)?B(u,function(v){return v.test(l)}):V(u,function(v){return v.test(l)}),g;g=e.valueCallback?e.valueCallback(o):o,g=s.valueCallback?s.valueCallback(g):g;var Ke=t.slice(l.length);return{value:g,rest:Ke}}}function V(e,t){for(var s in e)if(e.hasOwnProperty(s)&&t(e[s]))return s}function B(e,t){for(var s=0;s<e.length;s++)if(t(e[s]))return s}function E(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var r=n[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=s.valueCallback?s.valueCallback(l):l;var u=t.slice(r.length);return{value:l,rest:u}}}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},I=function(t,s,n){var r,a=O[t];return typeof a=="string"?r=a:s===1?r=a.one:r=a.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const A=I;var Y={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},H={date:D({formats:Y,defaultWidth:"full"}),time:D({formats:U,defaultWidth:"full"}),dateTime:D({formats:x,defaultWidth:"full"})};const $=H;var W={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L=function(t,s,n,r){return W[t]};const R=L;var K={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},j={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},q={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},J={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Q=function(t,s){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},G={ordinalNumber:Q,era:m({values:K,defaultWidth:"wide"}),quarter:m({values:j,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:m({values:z,defaultWidth:"wide"}),day:m({values:q,defaultWidth:"wide"}),dayPeriod:m({values:J,defaultWidth:"wide",formattingValues:X,defaultFormattingWidth:"wide"})};const Z=G;var _=/^(\d+)(th|st|nd|rd)?/i,ee=/\d+/i,te={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},se={any:[/^b/i,/^(a|c)/i]},ie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ae={any:[/1/i,/2/i,/3/i,/4/i]},ne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},re={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},le={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ue={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},de={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:E({matchPattern:_,parsePattern:ee,valueCallback:function(t){return parseInt(t,10)}}),era:p({matchPatterns:te,defaultMatchWidth:"wide",parsePatterns:se,defaultParseWidth:"any"}),quarter:p({matchPatterns:ie,defaultMatchWidth:"wide",parsePatterns:ae,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:p({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:re,defaultParseWidth:"any"}),day:p({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:ue,defaultMatchWidth:"any",parsePatterns:de,defaultParseWidth:"any"})},ce={code:"en-US",formatDistance:A,formatLong:$,formatRelative:R,localize:Z,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};const b=ce,P={useUtc:!1,language:b,getFullYear(e){return this.useUtc?e.getUTCFullYear():e.getFullYear()},getMonth(e){return this.useUtc?e.getUTCMonth():e.getMonth()},getDaysInMonth(e){return this.daysInMonth(this.getFullYear(e),this.getMonth(e))},getDate(e){return this.useUtc?e.getUTCDate():e.getDate()},getDay(e){return this.useUtc?e.getUTCDay():e.getDay()},getHours(e){return this.useUtc?e.getUTCHours():e.getHours()},getMinutes(e){return this.useUtc?e.getUTCMinutes():e.getMinutes()},setFullYear(e,t){return this.useUtc?e.setUTCFullYear(t):e.setFullYear(t)},setMonth(e,t){return this.useUtc?e.setUTCMonth(t):e.setMonth(t)},setDate(e,t){return this.useUtc?e.setUTCDate(t):e.setDate(t)},compareDates(e,t){const s=new Date(e.getTime()),n=new Date(t.getTime());return this.useUtc?(s.setUTCHours(0,0,0,0),n.setUTCHours(0,0,0,0)):(s.setHours(0,0,0,0),n.setHours(0,0,0,0)),s.getTime()===n.getTime()},isValidDate(e){return Object.prototype.toString.call(e)!=="[object Date]"?!1:!isNaN(e.getTime())},getDayNameAbbr(e){if(typeof e!="object")throw TypeError("Invalid Type");return d.format(e,"ccc",{locale:this.language})},getDayFromAbbr(e){const t=new Date,s=[0,1,2,3,4,5,6];let n=s.map(r=>d.format(d.setDay(t,r),"ccc",{locale:b}));for(let r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase())return r;if(this.language!==b){n=s.map(r=>d.format(d.setDay(t,r),"ccc",{locale:this.language}));for(let r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase())return r}throw TypeError("Invalid week day")},getMonthName(e){if(typeof e=="object")return d.format(e,"LLLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLLL",{locale:this.language});throw TypeError("Invalid type")},getMonthNameAbbr(e){if(typeof e=="object")return d.format(e,"LLL",{locale:this.language});if(typeof e=="number")return d.format(d.setMonth(new Date,e),"LLL",{locale:this.language});throw TypeError("Invalid type")},daysInMonth(e,t){return/8|3|5|10/.test(t)?30:t===1?!(e%4)&&e%100||!(e%400)?29:28:31},getNthSuffix(e){switch(e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},getDaysStartingOn(e,t=!1){const s=new Date,n=[0,1,2,3,4,5,6];let r="ccc";return t&&(r="cccccc"),n.map(a=>d.format(d.setDay(s,a+e),r,{locale:this.language}))},formatDate(e,t){return d.format(e,t,{locale:this.language})},parseDate(e,t="yyyy-MM-dd"){if(typeof e=="string")return d.parse(e,t,new Date,{locale:this.language});if(typeof e=="number")return d.toDate(e)},validateDateInput(e){return e===null||e instanceof Date||typeof e=="string"||typeof e=="number"},resetDateTime(e){return new Date(this.useUtc?e.setUTCHours(0,0,0,0):e.setHours(0,0,0,0))},getNewDateObject(e){return e?this.resetDateTime(new Date(e)):this.resetDateTime(new Date)}},h=(e=!1,t=b)=>({...P,useUtc:e,language:t}),T={...P},F=["dv","fa","ha","he","kwh","ks","ku","ps","ur","yi"],fe=["ja","lt","mn","ko"],w={zh:"年",ja:"年",ko:"년"},N={props:{autofocus:{type:Boolean,default:!1},bootstrapStyling:{type:Boolean,default:!1},clearButton:{type:Boolean,default:!1},clearButtonIcon:{type:String,default:null},calendarButton:{type:Boolean,default:!1},calendarButtonIcon:{type:String,default:null},calendarButtonIconContent:{type:String,default:null},disabled:{type:Boolean,default:!1},format:{type:[String,Function],default:"dd MMM yyyy"},id:{type:String,default:null},inline:{type:Boolean,default:!1},inputClass:{type:[String,Object,Array],default:null},maxlength:{type:[Number,String],default:null},name:{type:String,default:null},pattern:{type:String,default:null},placeholder:{type:String,default:null},refName:{type:String,default:""},required:{type:Boolean,default:!1},showCalendarOnFocus:{type:Boolean,default:!1},tabindex:{type:[Number,String],default:null},typeable:{type:Boolean,default:!1},useUtc:{type:Boolean,default:!1}}},f=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ge={name:"DateInput",mixins:[N],props:{isOpen:{type:Boolean,default:!1},language:{type:Object},openDate:Date,parseTypedDate:Function,resetTypedDate:[Date],selectedDate:{type:Date,default:null}},emits:{clearDate:null,closeCalendar:null,open:null,selectTypedDate:e=>e===null||e instanceof Date,setFocus:e=>e.every(t=>["calendarButton","input","prev","up","next","tabbableCell"].includes(t)),typedDate:e=>e===null||e instanceof Date},data(){return{input:null,typedDate:!1,utils:h(this.useUtc,this.language)}},computed:{formattedValue(){return this.selectedDate?this.typedDate?this.typedDate:typeof this.format=="function"?this.format(this.selectedDate):this.utils.formatDate(this.selectedDate,this.format):null},computedInputClass(){return this.bootstrapStyling?typeof this.inputClass=="string"?[this.inputClass,"form-control"].join(" "):{"form-control":!0,...this.inputClass}:this.inputClass}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)},resetTypedDate(){this.typedDate=!1}},mounted(){this.input=this.$el.querySelector("input")},methods:{showCalendar(){this.showCalendarOnFocus||this.toggle()},showFocusCalendar(){this.showCalendarOnFocus&&!this.isOpen&&this.$emit("open")},handleKeydownDown(){this.isOpen||this.$emit("open"),this.typeable&&this.$emit("setFocus",["prev","up","next","tabbableCell"])},handleKeydownEnter(){if(!this.typeable)return;if(!this.input.value){this.$emit("selectTypedDate",null);return}const e=this.getTypedDate(this.input.value);isNaN(e)||(this.typedDate=this.input.value,this.$emit("selectTypedDate",e))},handleKeydownEscape(){this.$emit("closeCalendar")},keyUp(e){if(!(!this.typeable||["Control","Escape","Shift","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))){if(!this.input.value){this.$emit("typedDate",null);return}if(this.typeable){const t=this.getTypedDate(this.input.value);isNaN(t)||(this.typedDate=this.input.value,this.$emit("typedDate",t))}}},inputBlurred(){this.typeable&&isNaN(this.getTypedDate(this.input.value))&&(this.clearDate(),this.input.value=null,this.typedDate=null)},clearDate(){this.$emit("clearDate")},getTypedDate(e){return typeof this.parseTypedDate=="function"?this.parseTypedDate(e):this.utils.parseDate(e,typeof this.format=="string"?this.format:void 0)},toggle(e){this.isOpen&&this.$emit("setFocus",[e||"input"]),this.$emit(this.isOpen?"closeCalendar":"open")}}},me=["disabled"],pe={key:0},be=["id","autofocus","clear-button","disabled","maxlength","name","open-date","pattern","placeholder","readonly","required","tabindex","type","value"],ye=["disabled"],De={key:0};function we(e,t,s,n,r,a){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass({"input-group":e.bootstrapStyling})},[e.calendarButton?(i.openBlock(),i.createElementBlock("button",{key:0,ref:"calendarButton",class:i.normalizeClass(["vdp-datepicker__calendar-button",{"btn input-group-prepend":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[0]||(t[0]=l=>a.toggle("calendarButton"))},[i.createElementVNode("span",{class:i.normalizeClass({"input-group-text":e.bootstrapStyling})},[i.renderSlot(e.$slots,"calendarBtn",{},()=>[i.createElementVNode("i",{class:i.normalizeClass(e.calendarButtonIcon)},[i.createTextVNode(i.toDisplayString(e.calendarButtonIconContent)+" ",1),e.calendarButtonIcon?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",pe,"…"))],2)])],2)],10,me)):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"beforeDateInput"),i.createElementVNode("input",{id:e.id,ref:e.refName,autocomplete:"off",autofocus:e.autofocus,class:i.normalizeClass(a.computedInputClass),"clear-button":e.clearButton,disabled:e.disabled,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,pattern:e.pattern,placeholder:e.placeholder,readonly:!e.typeable,required:e.required,tabindex:e.tabindex,type:e.inline?"hidden":"text",value:a.formattedValue,onBlur:t[1]||(t[1]=(...l)=>a.inputBlurred&&a.inputBlurred(...l)),onClick:t[2]||(t[2]=(...l)=>a.showCalendar&&a.showCalendar(...l)),onFocus:t[3]||(t[3]=(...l)=>a.showFocusCalendar&&a.showFocusCalendar(...l)),onKeydown:[t[4]||(t[4]=i.withKeys(i.withModifiers((...l)=>a.handleKeydownDown&&a.handleKeydownDown(...l),["prevent"]),["down"])),t[5]||(t[5]=i.withKeys(i.withModifiers((...l)=>a.handleKeydownEnter&&a.handleKeydownEnter(...l),["prevent"]),["enter"])),t[6]||(t[6]=i.withKeys(i.withModifiers((...l)=>a.handleKeydownEscape&&a.handleKeydownEscape(...l),["prevent"]),["esc"]))],onKeyup:t[7]||(t[7]=(...l)=>a.keyUp&&a.keyUp(...l))},null,42,be),e.clearButton&&s.selectedDate?(i.openBlock(),i.createElementBlock("button",{key:1,class:i.normalizeClass(["vdp-datepicker__clear-button",{"btn input-group-append":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[8]||(t[8]=(...l)=>a.clearDate&&a.clearDate(...l))},[i.createElementVNode("span",{class:i.normalizeClass({"input-group-text":e.bootstrapStyling})},[i.renderSlot(e.$slots,"clearBtn",{},()=>[i.createElementVNode("i",{class:i.normalizeClass(e.clearButtonIcon)},[e.clearButtonIcon?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",De,"×"))],2)])],2)],10,ye)):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"afterDateInput")],2)}const Ce=f(ge,[["render",we]]),Me={isDefined(e,t){return e&&typeof e[t]<"u"},hasArray(e,t){return e&&Array.isArray(e[t])},hasDate(e,t){return this.isDefined(e,t)&&this.utils.isValidDate(e[t])},dayMonthYear(e,t){const{utils:s}=this;if(!this.hasDate(e,t))return{day:void 0,month:void 0,year:void 0};const r=e[t];return{day:s.getDate(r),month:s.getMonth(r),year:s.getFullYear(r)}}},y=e=>({...Me,utils:e});class c{constructor(t,s){this._utils=t,this._disabledDates=s}get config(){const t=this._disabledDates,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to")};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}daysInMonth(t){const s=this._utils,n=s.getMonth(t),r=s.getFullYear(t);return s.daysInMonth(r,n)}isDateDisabledVia(t){const s=this._disabledDates,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:r}=s,a=y(this._utils);return r.some(l=>{const u=a.isDefined(l,"from"),o=a.isDefined(l,"to");return u&&o&&t<l.to&&t>l.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(r=>this._utils.compareDates(t,r)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isMonthDisabledVia(t){const{from:s,has:n,to:r}=this.config,a=this._utils.getMonth(t),l=this._utils.getFullYear(t);return{to:()=>n.to&&l<r.year?!0:n.to&&a<r.month&&l<=r.year,from:()=>n.from&&l>s.year?!0:n.from&&a>s.month&&l>=s.year}}isYearDisabledVia(t){const{from:s,has:n,to:r}=this.config,a=this._utils.getFullYear(t);return{to:()=>n.to&&a<r.year,from:()=>n.from&&a>s.year}}isDateDisabled(t){const s=this.isDateDisabledVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isMonthDisabled(t){const s=this.isMonthDisabledVia(t);if(s.to()||s.from())return!0;for(let n=1;n<=this.daysInMonth(t);n++){const r=new Date(t);if(r.setDate(n),!this.isDateDisabled(r))return!1}return!0}isYearDisabled(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const r=new Date(t);if(r.setMonth(n),!this.isMonthDisabled(r))return!1}return!0}getEarliestPossibleDate(t){if(!t)return null;const s=this._utils;if(this.isDateDisabled(t)){const n=new Date(s.getFullYear(t),s.getMonth(t),s.getDate(t)+1);return this.getEarliestPossibleDate(n)}return t}getLatestPossibleDate(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const r=new Date(t);if(r.setMonth(n),!this.isMonthDisabled(r))return!1}return!0}}const Se={data(){return{focus:{delay:0,refs:[]},navElements:[],navElementsFocusedIndex:0,resetTabbableCell:!1,tabbableCell:null}},computed:{fallbackElementsToFocus(){const e=["tabbableCell","prev","next"];return this.typeable&&e.unshift("input"),e},tabbableCellId(){return this.tabbableCell&&Number(this.tabbableCell.getAttribute("data-id"))}},methods:{getCellDate(e){switch(this.view){case"month":return new Date(this.utils.setDate(e,1));case"year":return new Date(this.utils.setMonth(new Date(this.utils.setDate(e,1)),0));default:return e}},applyFocus(){const e=[...this.focus.refs,...this.fallbackElementsToFocus];for(let t=0;t<e.length;t++){const s=this.getElementByRef(e[t]);if(s&&s.getAttribute("disabled")===null){s.focus(),this.setNavElementsFocusedIndex();break}}},getActiveCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell"),s=this.hasClass(e,this.view);return t&&s&&!this.resetTabbableCell?e:null},getActiveElement(){return document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement},getCellId(e){if(!e||!this.$refs.picker.$refs.cells)return null;const t=this.getCellDate(e),{cells:s}=this.$refs.picker.$refs.cells;for(let n=0;n<s.length;n++)if(s[n].timestamp===t.valueOf())return n;return null},getElementByRef(e){return e==="tabbableCell"?this.tabbableCell:e==="input"?this.$refs.dateInput&&this.$refs.dateInput.$refs[this.refName]:e==="calendarButton"?this.$refs.dateInput&&this.$refs.dateInput.$refs.calendarButton:this.$refs.picker&&this.$refs.picker.$refs.pickerHeader&&this.$refs.picker.$refs.pickerHeader.$refs[e]},getElementsFromSlot(e){if(!this.hasSlot(e))return[];if(e==="beforeCalendarHeader")return this.getFocusableElements(this.$refs.view.children[0]);const t=e.indexOf("beforeCalendarHeader")>-1,s=this.$refs.picker.$el,n=t?0:s.children.length-1;return this.getFocusableElements(s.children[n])},getElementsFromHeader(){if(!this.$refs.picker.$refs.pickerHeader)return[];const t=this.$refs.picker.$refs.pickerHeader.$el.querySelectorAll("button:enabled");return[...Array.prototype.slice.call(t)]},getFocusableElements(e){if(!e)return[];const t=e.querySelectorAll('button:enabled:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]):not([type=hidden]), select:enabled:not([tabindex="-1"]), textarea:enabled:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])');return[...Array.prototype.slice.call(t)]},getInputField(){return!this.typeable||this.inline?null:this.$refs.dateInput.$refs[this.refName]},getTypedCell(){if(!this.typeable)return null;const e=this.getCellId(this.latestValidTypedDate);return e?this.$refs.picker.$refs.cells.$el.children[e]:null},hasSlot(e){return!!this.$slots[e]},reviewFocus(){this.tabbableCell=null,this.resetTabbableCell=!0,this.$nextTick(()=>{this.setNavElements(),setTimeout(()=>{this.applyFocus()},this.focus.delay),this.resetTabbableCell=!1})},setFocus(e){this.focus.refs=e,this.applyFocus()},setNavElements(){if(!this.view)return;this.updateTabbableCell();const e=this.ucFirst(this.view);this.navElements=[this.getInputField(),this.getElementsFromSlot("beforeCalendarHeader"),this.getElementsFromSlot(`beforeCalendarHeader${e}`),this.getElementsFromHeader(),this.tabbableCell].filter(t=>!!t).reduce((t,s)=>t.concat(s),[])},setNavElementsFocusedIndex(){const e=this.getActiveElement();for(let t=0;t<this.navElements.length;t++)if(e===this.navElements[t]){this.navElementsFocusedIndex=t;return}this.navElementsFocusedIndex=0},setTabbableCell(){if(!this.$refs.picker||!this.$refs.picker.$refs.cells)return;const e=this.$refs.picker.$refs.cells.$el;this.tabbableCell=this.getActiveCell()||this.getTypedCell()||e.querySelector("button.selected:not(.muted):enabled")||e.querySelector("button.today:not(.muted):enabled")||e.querySelector("button.cell:not(.muted):enabled")},updateTabbableCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell");(!this.tabbableCell||t)&&this.setTabbableCell()}}},ke={props:{bootstrapStyling:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,required:!0},isPreviousDisabled:{type:Boolean,required:!0},isRtl:{type:Boolean,required:!0},isUpDisabled:{type:Boolean,default:!1},nextViewUp:{type:String,default:null},upButtonClasses:{type:String}},emits:{focusInput:null,pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>["day","month","year"].includes(e)},computed:{leftButton(){return[this.isRtl?"next":"prev"]},rightButton(){return[this.isRtl?"prev":"next"]}},methods:{arrowLeftPrev(){if(this.isRtl){this.$emit("setFocus",["up","next","tabbableCell"]);return}this.goToPreviousPage()},arrowRightPrev(){if(this.isRtl){this.goToPreviousPage();return}this.$emit("setFocus",["up","next","tabbableCell"])},arrowLeftNext(){if(this.isRtl){this.goToNextPage();return}this.$emit("setFocus",["up","prev","tabbableCell"])},arrowRightNext(){if(this.isRtl){this.$emit("setFocus",["up","prev","tabbableCell"]);return}this.goToNextPage()},focusInput(){this.$emit("focusInput")},focusTabbableCell(){this.$emit("setFocus",["tabbableCell"])},focusLeftButton(){this.$emit("setFocus",this.leftButton)},focusRightButton(){this.$emit("setFocus",this.rightButton)},goToNextPage(){this.$emit("pageChange",{incrementBy:1,focusRefs:["next"]})},goToPreviousPage(){this.$emit("pageChange",{incrementBy:-1,focusRefs:["prev"]})},selectUpButton(){this.isUpDisabled||this.$emit("setView",this.nextViewUp)}}},ve=["disabled"],Pe={key:1,ref:"up"},Te=["disabled"];function Fe(e,t,s,n,r,a){return i.openBlock(),i.createElementBlock("header",null,[i.createElementVNode("button",{ref:"prev",class:i.normalizeClass(["prev",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isPreviousDisabled,type:"button",onClick:t[0]||(t[0]=l=>s.isRtl?a.goToNextPage():a.goToPreviousPage()),onKeydown:[t[1]||(t[1]=i.withKeys(i.withModifiers((...l)=>a.focusTabbableCell&&a.focusTabbableCell(...l),["prevent"]),["down"])),t[2]||(t[2]=i.withKeys(i.withModifiers((...l)=>a.focusInput&&a.focusInput(...l),["prevent"]),["up"])),t[3]||(t[3]=i.withKeys(i.withModifiers((...l)=>a.arrowLeftPrev&&a.arrowLeftPrev(...l),["prevent"]),["left"])),t[4]||(t[4]=i.withKeys(i.withModifiers((...l)=>a.arrowRightPrev&&a.arrowRightPrev(...l),["prevent"]),["right"]))]},"<",42,ve),s.isUpDisabled?(i.openBlock(),i.createElementBlock("span",Pe,[i.renderSlot(e.$slots,"default")],512)):(i.openBlock(),i.createElementBlock("button",{key:0,ref:"up",class:i.normalizeClass([s.upButtonClasses,"up",{btn:s.bootstrapStyling}]),type:"button",onClick:t[5]||(t[5]=(...l)=>a.selectUpButton&&a.selectUpButton(...l)),onKeydown:[t[6]||(t[6]=i.withKeys(i.withModifiers((...l)=>a.focusTabbableCell&&a.focusTabbableCell(...l),["prevent"]),["down"])),t[7]||(t[7]=i.withKeys(i.withModifiers((...l)=>a.focusInput&&a.focusInput(...l),["prevent"]),["up"])),t[8]||(t[8]=i.withKeys(i.withModifiers((...l)=>a.focusLeftButton&&a.focusLeftButton(...l),["prevent"]),["left"])),t[9]||(t[9]=i.withKeys(i.withModifiers((...l)=>a.focusRightButton&&a.focusRightButton(...l),["prevent"]),["right"]))]},[i.renderSlot(e.$slots,"default")],34)),i.createElementVNode("button",{ref:"next",class:i.normalizeClass(["next",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isNextDisabled,type:"button",onClick:t[10]||(t[10]=l=>s.isRtl?a.goToPreviousPage():a.goToNextPage()),onKeydown:[t[11]||(t[11]=i.withKeys(i.withModifiers((...l)=>a.focusTabbableCell&&a.focusTabbableCell(...l),["prevent"]),["down"])),t[12]||(t[12]=i.withKeys(i.withModifiers((...l)=>a.focusInput&&a.focusInput(...l),["prevent"]),["up"])),t[13]||(t[13]=i.withKeys(i.withModifiers((...l)=>a.arrowLeftNext&&a.arrowLeftNext(...l),["prevent"]),["left"])),t[14]||(t[14]=i.withKeys(i.withModifiers((...l)=>a.arrowRightNext&&a.arrowRightNext(...l),["prevent"]),["right"]))]},">",42,Te)])}const C=f(ke,[["render",Fe]]),Ne={name:"PickerCells",props:{bootstrapStyling:{type:Boolean,default:!1},cells:{type:Array,required:!0},isRtl:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!0},tabbableCellId:{type:Number,default:null},view:{type:String,validator:e=>["day","month","year"].includes(e),required:!0}},emits:{arrow(e){return typeof e=="object"},select(e){return typeof e=="object"}},computed:{columns(){return this.view==="day"?7:3}},methods:{cellClasses(e){return["cell",this.view,{blank:e.date==="",btn:this.bootstrapStyling,disabled:e.isDisabled,"highlight-start":e.isHighlightStart,"highlight-end":e.isHighlightEnd,highlighted:e.isHighlighted,muted:e.isPreviousMonth||e.isNextMonth,sat:e.isSaturday,sun:e.isSunday,selected:this.showEdgeDates?e.isSelected:e.isSelected&&!e.isPreviousMonth&&!e.isNextMonth,today:this.showEdgeDates?e.isToday:e.isToday&&!e.isPreviousMonth&&!e.isNextMonth,weekend:e.isWeekend}]},handleArrow(e,t){this.$emit("arrow",{cellId:e,delta:t})}}},Ve={class:"picker-cells"},Be=["data-id","disabled","onClick","onKeypress","onKeydown"];function Ee(e,t,s,n,r,a){return i.openBlock(),i.createElementBlock("div",Ve,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.cells,(l,u)=>(i.openBlock(),i.createElementBlock("button",{key:l.timestamp,class:i.normalizeClass(a.cellClasses(l)),"data-id":u,disabled:l.isDisabled,type:"button",onClick:o=>e.$emit("select",l),onKeypress:[i.withKeys(o=>e.$emit("select",l),["enter"]),i.withKeys(o=>e.$emit("select",l),["space"])],onKeydown:[i.withKeys(i.withModifiers(o=>a.handleArrow(u,-a.columns),["prevent"]),["up"]),i.withKeys(i.withModifiers(o=>a.handleArrow(u,a.columns),["prevent"]),["down"]),i.withKeys(i.withModifiers(o=>a.handleArrow(u,s.isRtl?1:-1),["prevent"]),["left"]),i.withKeys(i.withModifiers(o=>a.handleArrow(u,s.isRtl?-1:1),["prevent"]),["right"])]},[i.renderSlot(e.$slots,"default",{cell:l})],42,Be))),128))])}const M=f(Ne,[["render",Ee]]),S={props:{bootstrapStyling:{type:Boolean,default:!1},calendarClass:[String,Object,Array],calendarStyle:{type:Object},disabledDates:{type:Object},isTypeable:{type:Boolean,default:!1},isUpDisabled:{type:Boolean,default:!1},language:{type:Object},pageDate:{type:Date,default:null},selectedDate:{type:Date,default:null},slideDuration:{type:Number,default:250},tabbableCellId:{type:Number,default:null},useUtc:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:{select:e=>typeof e=="object",selectedDisabled:e=>typeof e=="object",setFocus:e=>e===["input"]},data(){return{utils:h(this.useUtc,this.language)}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)}},computed:{disabledConfig(){return this.disabledDates?new c(this.utils,this.disabledDates).config:{has:{from:!1,to:!1}}},earliestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getEarliestPossibleDate(this.disabledDates.to):null},isRtl(){return F.indexOf(this.language)!==-1},latestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getLatestPossibleDate(this.disabledDates.from):null},pageYear(){return this.utils.getFullYear(this.pageDate)}},methods:{addMoreSteps(e){return e.stepsRemaining<=0&&Math.abs(e.delta)>1?Math.abs(e.delta):e.stepsRemaining},changePageAndSetFocus(e){const{delta:t}=e;t>0&&this.isNextDisabled||t<0&&this.isPreviousDisabled||(this.changePage({incrementBy:Math.sign(t),focusRefs:["arrow-to-cell"]}),this.$nextTick(()=>{this.setFocusOnNewPage(e)}))},focusInput(){this.isTypeable&&this.$emit("setFocus",["input"])},getElement({currentElement:e,delta:t,stepsRemaining:s}){const n=this.getElementSibling(e,t),r={currentElement:n,delta:t,stepsRemaining:s-1};return n?this.isBeyondPossibleDate(r)?this.firstOrLastPossibleDate(r):this.isMutedOrDisabled(n)?(r.stepsRemaining=this.addMoreSteps(r),this.getElement(r)):s>1&&r.currentElement?this.getElement(r):n:this.changePageAndSetFocus(r)},getElementSibling(e,t){return t>0?e.nextElementSibling:e.previousElementSibling},getFirstOrLastElement(e){const t=e>0,s=this.$refs.cells.$el.children;return t?s[0]:s[s.length-1]},firstOrLastPossibleDate({currentElement:e,delta:t}){return t>0?this.getElementSibling(e,-1):this.getElementSibling(e,1)},handleArrow({delta:e}){const t=document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement,s=Math.abs(e),n={currentElement:t,delta:e,stepsRemaining:s};this.setFocusToAvailableCell(n)},select(e){e.isDisabled?this.$emit("selectedDisabled",e):this.$emit("select",e)},isBeyondPossibleDate({currentElement:e,delta:t}){return t>0&&this.latestPossibleDate?this.isDatePossible(e,t):t<0&&this.earliestPossibleDate?this.isDatePossible(e,t):!1},isDatePossible(e,t){const s=e.getAttribute("data-id"),n=new Date(this.cells[s].timestamp);return t>0?n>this.latestPossibleDate:n<this.earliestPossibleDate},isMutedOrDisabled(e){const t=e.classList.value.split(" ").includes("muted"),s=e.disabled;return t||s},setFocusOnNewPage({delta:e,stepsRemaining:t}){const s=this.getFirstOrLastElement(e),n={currentElement:s,delta:e,stepsRemaining:t};if(t<=0){if(this.isMutedOrDisabled(s)){n.stepsRemaining=Math.abs(n.delta),setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration);return}setTimeout(()=>{s.focus()},this.slideDuration);return}setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration)},setFocusToAvailableCell(e){const t=this.getElement(e);t&&t.focus()}}};class k{constructor(t,s,n){this._utils=t,this._disabledDates=s,this._highlighted=n}get config(){const t=this._highlighted,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to"),includeDisabled:s.isDefined(t,"includeDisabled")&&t.includeDisabled};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}isDateDisabled(t){const s=this._utils,n=this._disabledDates;return new c(s,n).isDateDisabled(t)}isHighlightingNotPossible(t){return!this.config.has.includeDisabled&&this.isDateDisabled(t)}isDateHighlightedVia(t){const s=this._highlighted,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:r}=s,a=y(this._utils);return r.some(l=>{const u=a.isDefined(l,"from"),o=a.isDefined(l,"to");return u&&o&&t<=l.to&&t>=l.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(r=>this._utils.compareDates(t,r)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isDateHighlighted(t){if(this.isHighlightingNotPossible(t))return!1;const s=this.isDateHighlightedVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isHighlightStart(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].from.valueOf()===t.valueOf())return!0;return!1}isHighlightEnd(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].to.valueOf()===t.valueOf())return!0;return!1}}const Oe={name:"PickerDay",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{dayCellContent:{type:Function,default:e=>e.date},firstDayOfWeek:{type:String},highlighted:{type:Object,default(){return{}}},mondayFirst:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!1},showFullMonthName:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean,default:!1}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="month"},computed:{currMonthName(){return this.showFullMonthName?this.utils.getMonthName(this.pageMonth):this.utils.getMonthNameAbbr(this.pageMonth)},currYearName(){const e=w[this.language]||"";return`${this.pageYear}${e}`},days(){const e=[],t=this.daysFromPrevMonth+this.daysInMonth+this.daysFromNextMonth,s=this.firstDayCellDate();for(let n=0;n<t;n++)e.push(this.makeDay(s)),this.utils.setDate(s,this.utils.getDate(s)+1);return e},daysFromNextMonth(){const e=this.daysFromPrevMonth+this.daysInMonth;return Math.ceil(e/7)*7-e},daysFromPrevMonth(){const e=this.utils.getDay(this.pageDate);return(7-this.firstDayOfWeekNumber+e)%7},daysInMonth(){return this.utils.getDaysInMonth(this.pageDate)},daysOfWeek(){return this.utils.getDaysStartingOn(this.firstDayOfWeekNumber,this.twoLetterAbbr)},firstDayOfWeekNumber(){return this.mondayFirst?1:this.firstDayOfWeek?this.utils.getDayFromAbbr(this.firstDayOfWeek):0},firstOfNextMonth(){const e=new Date(this.pageDate);return new Date(this.utils.setMonth(e,this.utils.getMonth(e)+1))},isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.month<=this.pageMonth&&this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.month>=this.pageMonth&&this.disabledConfig.to.year>=this.pageYear:!1},pageMonth(){return this.utils.getMonth(this.pageDate)},pageTitleDay(){return fe.indexOf(this.language.code)!==-1?`${this.currYearName} ${this.currMonthName}`:`${this.currMonthName} ${this.currYearName}`}},methods:{firstDayCellDate(){const e=new Date(this.pageDate);return new Date(this.utils.setDate(e,1-this.daysFromPrevMonth))},changeMonth({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setMonth(s,this.utils.getMonth(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeMonth({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeMonth({incrementBy:e,focusRefs:t})},isSelectedDate(e){return this.selectedDate&&this.utils.compareDates(this.selectedDate,e)},isDisabledDate(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},isHighlightedDate(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isDateHighlighted(e):!1},isHighlightStart(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightStart(e):!1},isHighlightEnd(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightEnd(e):!1},makeDay(e){const{utils:t}=this,s=t.getDay(e),n=e>=this.firstOfNextMonth,r=e<this.pageDate,a=s===6,l=s===0;return{date:this.showEdgeDates||!(r||n)?t.getDate(e):"",timestamp:e.getTime(),isSelected:this.isSelectedDate(e),isDisabled:this.isDisabledDate(e),isHighlighted:this.isHighlightedDate(e),isHighlightStart:this.isHighlightStart(e),isHighlightEnd:this.isHighlightEnd(e),isToday:t.compareDates(e,new Date),isWeekend:a||l,isSaturday:a,isSunday:l,isPreviousMonth:r,isNextMonth:n}}}};function Ie(e,t,s,n,r,a){const l=i.resolveComponent("picker-header"),u=i.resolveComponent("picker-cells");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:i.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=i.withModifiers(()=>{},["prevent"]))},[i.renderSlot(e.$slots,"beforeCalendarHeader"),i.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":a.isNextDisabled,"is-previous-disabled":a.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"month","up-button-classes":"day__month_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>a.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.pageTitleDay),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),i.createElementVNode("div",{class:i.normalizeClass({"flex-rtl":e.isRtl})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.daysOfWeek,o=>(i.openBlock(),i.createElementBlock("span",{class:"cell day-header",key:o.timestamp},i.toDisplayString(o),1))),128)),i.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:a.days,"is-rtl":e.isRtl,"show-edge-dates":s.showEdgeDates,"tabbable-cell-id":e.tabbableCellId,view:"day",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:i.withCtx(({cell:o})=>[i.createTextVNode(i.toDisplayString(s.dayCellContent(o)),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","show-edge-dates","tabbable-cell-id"])],2)],38)),[[i.vShow,e.visible]])}const Ae=f(Oe,[["render",Ie]]),Ye={name:"PickerMonth",components:{PickerHeader:C,PickerCells:M},mixins:[S],emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="year"},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageYear:!1},months(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(e.getUTCFullYear(),0,e.getUTCDate())):new Date(e.getFullYear(),0,e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<12;n++)t.push({month:this.utils.getMonthName(s),timestamp:s.getTime(),isDisabled:this.isDisabledMonth(s),isSelected:this.isSelectedMonth(s),isToday:this.isTodayMonth(s)}),this.utils.setMonth(s,this.utils.getMonth(s)+1);return t},pageTitleMonth(){const e=w[this.language]||"";return`${this.pageYear}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e,focusRefs:t})},isSelectedMonth(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)&&this.utils.getMonth(this.selectedDate)===this.utils.getMonth(e)},isDisabledMonth(e){return this.disabledDates?new c(this.utils,this.disabledDates).isMonthDisabled(e):!1},isTodayMonth(e){const{utils:t}=this,s=new Date(t.setDate(t.getNewDateObject(),1));return t.compareDates(e,s)}}};function Ue(e,t,s,n,r,a){const l=i.resolveComponent("picker-header"),u=i.resolveComponent("picker-cells");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:i.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=i.withModifiers(()=>{},["prevent"]))},[i.renderSlot(e.$slots,"beforeCalendarHeader"),i.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":a.isNextDisabled,"is-previous-disabled":a.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"year","up-button-classes":"month__year_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>a.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.pageTitleMonth),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),i.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:a.months,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"month",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:i.withCtx(({cell:o})=>[i.createTextVNode(i.toDisplayString(o.month),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[i.vShow,e.visible]])}const xe=f(Ye,[["render",Ue]]),He={name:"PickerYear",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{highlighted:{type:Object,default(){return{}}}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t))},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageDecadeEnd:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageDecadeStart:!1},pageDecadeStart(){return Math.floor(this.pageYear/10)*10},pageDecadeEnd(){return this.pageDecadeStart+10-1},years(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(Math.floor(e.getUTCFullYear()/10)*10,e.getUTCMonth(),e.getUTCDate())):new Date(Math.floor(e.getFullYear()/10)*10,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<10;n++)t.push({year:this.utils.getFullYear(s),timestamp:s.getTime(),isDisabled:this.isDisabledYear(s),isSelected:this.isSelectedYear(s),isToday:this.isTodayYear(s)}),this.utils.setFullYear(s,this.utils.getFullYear(s)+1);return t},pageTitleYear(){const e=w[this.language]||"";return`${this.pageDecadeStart} - ${this.pageDecadeEnd}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e*10,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e*10,focusRefs:t})},isSelectedYear(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)},isDisabledYear(e){return this.disabledDates?new c(this.utils,this.disabledDates).isYearDisabled(e):!1},isTodayYear(e){const{utils:t}=this,s=t.getFullYear(t.getNewDateObject());return t.getFullYear(e)===s}}};function $e(e,t,s,n,r,a){const l=i.resolveComponent("picker-header"),u=i.resolveComponent("picker-cells");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:i.normalizeStyle(e.calendarStyle),onMousedown:t[4]||(t[4]=i.withModifiers(()=>{},["prevent"]))},[i.renderSlot(e.$slots,"beforeCalendarHeader"),i.createVNode(l,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":a.isNextDisabled,"is-previous-disabled":a.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":!0,onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>a.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.pageTitleYear),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","onFocusInput"]),i.createVNode(u,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:a.years,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"year",onArrow:t[2]||(t[2]=o=>e.handleArrow(o)),onSelect:t[3]||(t[3]=o=>e.select(o))},{default:i.withCtx(({cell:o})=>[i.createTextVNode(i.toDisplayString(o.year),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[i.vShow,e.visible]])}const We=f(He,[["render",$e]]),ze="",Le={name:"DatePicker",components:{DateInput:Ce,PickerDay:Ae,PickerMonth:xe,PickerYear:We},mixins:[N,Se],props:{calendarClass:{type:[String,Object,Array],default:""},dayCellContent:{type:Function},disabledDates:{type:Object},firstDayOfWeek:{type:String},fullMonthName:{type:Boolean},highlighted:{type:Object},initialView:{type:String,default:""},language:{type:Object,default(){return b}},maximumView:{type:String,default:"year"},minimumView:{type:String,default:"day"},mondayFirst:{type:Boolean},openDate:{validator:e=>T.validateDateInput(e)},parseTypedDate:{type:Function},showEdgeDates:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean},value:{validator:e=>T.validateDateInput(e)},wrapperClass:{type:[String,Object,Array],default:""}},emits:{changedMonth:e=>typeof e=="object",changedYear:e=>typeof e=="object",changedDecade:e=>typeof e=="object",cleared:null,closed:null,input:e=>e instanceof Date||e===null,opened:null,selected:e=>e instanceof Date||e===null,selectedDisabled:e=>typeof e=="object"},data(){const e=this.openDate?new Date(this.openDate):new Date,t=h(this.useUtc,this.language);return{calendarHeight:0,latestValidTypedDate:null,pageTimestamp:t.setDate(e,1),selectedDate:null,slideDuration:250,resetTypedDate:new Date,utils:t,view:""}},watch:{disabledDates:{handler(){const e=this.selectedDate||this.parseValue(this.value);if(e){if(this.isDateDisabled(e)&&e){this.setDate(null);return}this.dateHasChanged(e)&&this.setDate(e)}},deep:!0},initialView(){this.isOpen&&this.setInitialView()},language(e){this.utils=h(this.useUtc,e)},latestValidTypedDate(e){this.setPageDate(e)},useUtc(e){this.utils=h(e,this.language)},value(e){this.setValue(e)},openDate(){this.setPageDate()}},computed:{computedInitialView(){return this.initialView?this.initialView:this.minimumView},computedOpenDate(){const e=this.parseValue(this.openDate),t=this.utils.getNewDateObject(e),s=this.selectedDate||t;return this.minimumView==="day"?s:new Date(this.utils.setDate(s,1))},calendarStyle(){return{position:this.isInline?"static":void 0}},isInline(){return!!this.inline},isOpen(){return this.view!==""},isRtl(){return F.indexOf(this.language)!==-1},isUpDisabled(){return!this.allowedToShowView(this.nextView.up)},nextView(){const e=["day","month","year"],t=a=>a===this.view,s=e.findIndex(t),n=a=>a<=0?void 0:e[a-1];return{up:(a=>{if(!(a<0))return a===e.length-1?"decade":e[a+1]})(s),down:n(s)}},pageDate(){return new Date(this.pageTimestamp)},picker(){const e=this.view||this.computedInitialView;return`Picker${this.ucFirst(e)}`}},methods:{resetDefaultPageDate(){if(this.selectedDate===null){this.setPageDate();return}this.setPageDate(this.selectedDate)},open(){if(this.disabled||this.isInline)return!1;this.setInitialView(),this.reviewFocus(),this.$emit("opened")},parseValue(e){if(typeof e=="string"||typeof e=="number"){const t=new Date(e);return this.utils.isValidDate(t)?t:null}return this.utils.isValidDate(e)?e:null},selectTypedDate(e){this.setDate(e.getTime()),this.reviewFocus(),this.isOpen&&this.close()},setInitialView(){const e=this.computedInitialView;if(!this.allowedToShowView(e))throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`);this.setView(e)},allowedToShowView(e){const t=["day","month","year"],s=t.indexOf(this.minimumView),n=t.indexOf(this.maximumView),r=t.indexOf(e);return r>=s&&r<=n},setDate(e){const t=new Date(e);this.selectedDate=t,this.setPageDate(t),this.$emit("selected",t),this.$emit("input",t)},clearDate(){this.selectedDate=null,this.setPageDate(),this.$emit("selected",null),this.$emit("input",null),this.focus.refs=["input"],this.close(),this.$emit("cleared")},handleSelect(e){if(this.allowedToShowView(this.nextView.down)){this.showNextViewDown(e);return}this.$refs.dateInput.typedDate="",this.setDate(e.timestamp),this.focus.delay=e.isNextMonth?this.slideDuration:0,this.focus.refs=this.isInline?["tabbableCell"]:["input"],this.close(),this.reviewFocus(),this.resetTypedDate=new Date},selectDisabledDate(e){this.$emit("selectedDisabled",e)},setValue(e){if(typeof e=="string"||typeof e=="number"){const t=this.utils.parseDate(e,this.format);e=isNaN(t.valueOf())?null:t}this.selectedDate=e||null,this.setPageDate(e),this.typeable&&(this.latestValidTypedDate=e||this.computedOpenDate)},setView(e){this.allowedToShowView(e)&&(this.view=e)},setPageDate(e){e||(this.openDate?e=new Date(this.openDate):e=new Date),this.pageTimestamp=this.utils.setDate(new Date(e),1)},setTypedDate(e){const t=new Date(this.pageDate);if(this.latestValidTypedDate=e||this.computedOpenDate,this.setPageDate(e),this.isPageChange(t)){this.handlePageChange({focusRefs:[],pageDate:this.pageDate});return}this.setTabbableCell()},close(){this.isInline||(this.view="",this.isClickOutside?this.isClickOutside=!1:this.reviewFocus(),this.$emit("closed"))},handlePageChange({focusRefs:e,pageDate:t}){this.setPageDate(t),this.focus.refs=e,this.focus.delay=this.slideDuration||250,this.reviewFocus(),this.$emit(`changed${this.ucFirst(this.nextView.up)}`,t)},hasClass(e,t){return e&&e.className.split(" ").includes(t)},isPageChange(e){return this.isOpen?e.valueOf()!==this.pageDate.valueOf():!1},init(){this.typeable&&(this.latestValidTypedDate=this.selectedDate||this.computedOpenDate),this.value&&this.setValue(this.value),this.isInline&&this.setInitialView()},isDateDisabled(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},showNextViewDown(e){this.setPageDate(new Date(e.timestamp)),this.$emit(`changed${this.ucFirst(this.view)}`,e),this.setView(this.nextView.down)},ucFirst(e){return e[0].toUpperCase()+e.substring(1)}},mounted(){this.init()}};function Re(e,t,s,n,r,a){const l=i.resolveComponent("date-input");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vdp-datepicker",[s.wrapperClass,a.isRtl?"rtl":""]])},[i.createVNode(l,{id:e.id,ref:"dateInput",autofocus:e.autofocus,"bootstrap-styling":e.bootstrapStyling,"calendar-button":e.calendarButton,"calendar-button-icon":e.calendarButtonIcon,"calendar-button-icon-content":e.calendarButtonIconContent,"clear-button":e.clearButton,"clear-button-icon":e.clearButtonIcon,disabled:e.disabled,format:e.format,inline:e.inline,"input-class":e.inputClass,"is-open":a.isOpen,language:s.language,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,"parse-typed-date":s.parseTypedDate,pattern:e.pattern,placeholder:e.placeholder,"ref-name":e.refName,required:e.required,"reset-typed-date":r.resetTypedDate,"selected-date":r.selectedDate,"show-calendar-on-focus":e.showCalendarOnFocus,tabindex:e.tabindex,typeable:e.typeable,"use-utc":e.useUtc,onClearDate:a.clearDate,onCloseCalendar:a.close,onOpen:a.open,onSelectTypedDate:a.selectTypedDate,onSetFocus:t[0]||(t[0]=u=>e.setFocus(u)),onTypedDate:a.setTypedDate},{calendarBtn:i.withCtx(()=>[i.renderSlot(e.$slots,"calendarBtn")]),beforeDateInput:i.withCtx(()=>[i.renderSlot(e.$slots,"beforeDateInput")]),clearBtn:i.withCtx(()=>[i.renderSlot(e.$slots,"clearBtn")]),afterDateInput:i.withCtx(()=>[i.renderSlot(e.$slots,"afterDateInput")]),_:3},8,["id","autofocus","bootstrap-styling","calendar-button","calendar-button-icon","calendar-button-icon-content","clear-button","clear-button-icon","disabled","format","inline","input-class","is-open","language","maxlength","name","open-date","parse-typed-date","pattern","placeholder","ref-name","required","reset-typed-date","selected-date","show-calendar-on-focus","tabindex","typeable","use-utc","onClearDate","onCloseCalendar","onOpen","onSelectTypedDate","onTypedDate"]),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.picker),{ref:"picker","bootstrap-styling":e.bootstrapStyling,calendarClass:s.calendarClass,calendarStyle:a.calendarStyle,dayCellContent:s.dayCellContent,disabledDates:s.disabledDates,firstDayOfWeek:s.firstDayOfWeek,highlighted:s.highlighted,"is-typeable":e.typeable,"is-up-disabled":a.isUpDisabled,language:s.language,mondayFirst:s.mondayFirst,pageDate:a.pageDate,selectedDate:r.selectedDate,showEdgeDates:s.showEdgeDates,showFullMonthName:s.fullMonthName,"slide-duration":r.slideDuration,"tabbable-cell-id":e.tabbableCellId,twoLetterAbbr:s.twoLetterAbbr,"use-utc":e.useUtc,visible:a.isOpen,onPageChange:a.handlePageChange,onSelect:a.handleSelect,onSetFocus:t[1]||(t[1]=u=>e.setFocus(u)),onSetView:a.setView,onSelectedDisabled:a.selectDisabledDate},{beforeCalendarHeader:i.withCtx(()=>[i.renderSlot(e.$slots,"beforeCalendarHeader")]),_:3},40,["bootstrap-styling","calendarClass","calendarStyle","dayCellContent","disabledDates","firstDayOfWeek","highlighted","is-typeable","is-up-disabled","language","mondayFirst","pageDate","selectedDate","showEdgeDates","showFullMonthName","slide-duration","tabbable-cell-id","twoLetterAbbr","use-utc","visible","onPageChange","onSelect","onSetView","onSelectedDisabled"]))],2)}return f(Le,[["render",Re]])});
*/function D(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):e.defaultWidth,n=e.formats[s]||e.formats[e.defaultWidth];return n}}function m(e){return function(t,s){var n=s!=null&&s.context?String(s.context):"standalone",l;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,r=s!=null&&s.width?String(s.width):i;l=e.formattingValues[r]||e.formattingValues[i]}else{var d=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;l=e.values[o]||e.values[d]}var g=e.argumentCallback?e.argumentCallback(t):t;return l[g]}}function p(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s.width,l=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(l);if(!i)return null;var r=i[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(d)?B(d,function(v){return v.test(r)}):V(d,function(v){return v.test(r)}),g;g=e.valueCallback?e.valueCallback(o):o,g=s.valueCallback?s.valueCallback(g):g;var Ke=t.slice(r.length);return{value:g,rest:Ke}}}function V(e,t){for(var s in e)if(e.hasOwnProperty(s)&&t(e[s]))return s}function B(e,t){for(var s=0;s<e.length;s++)if(t(e[s]))return s}function E(e){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var l=n[0],i=t.match(e.parsePattern);if(!i)return null;var r=e.valueCallback?e.valueCallback(i[0]):i[0];r=s.valueCallback?s.valueCallback(r):r;var d=t.slice(l.length);return{value:r,rest:d}}}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},I=function(t,s,n){var l,i=O[t];return typeof i=="string"?l=i:s===1?l=i.one:l=i.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+l:l+" ago":l};const A=I;var Y={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},H={date:D({formats:Y,defaultWidth:"full"}),time:D({formats:U,defaultWidth:"full"}),dateTime:D({formats:x,defaultWidth:"full"})};const W=H;var $={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L=function(t,s,n,l){return $[t]};const R=L;var K={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},j={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},q={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},J={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},X={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Q=function(t,s){var n=Number(t),l=n%100;if(l>20||l<10)switch(l%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},G={ordinalNumber:Q,era:m({values:K,defaultWidth:"wide"}),quarter:m({values:j,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:m({values:z,defaultWidth:"wide"}),day:m({values:q,defaultWidth:"wide"}),dayPeriod:m({values:J,defaultWidth:"wide",formattingValues:X,defaultFormattingWidth:"wide"})};const Z=G;var _=/^(\d+)(th|st|nd|rd)?/i,ee=/\d+/i,te={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},se={any:[/^b/i,/^(a|c)/i]},ae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ie={any:[/1/i,/2/i,/3/i,/4/i]},ne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},re={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},le={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},de={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ue={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:E({matchPattern:_,parsePattern:ee,valueCallback:function(t){return parseInt(t,10)}}),era:p({matchPatterns:te,defaultMatchWidth:"wide",parsePatterns:se,defaultParseWidth:"any"}),quarter:p({matchPatterns:ae,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:p({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:re,defaultParseWidth:"any"}),day:p({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:de,defaultMatchWidth:"any",parsePatterns:ue,defaultParseWidth:"any"})},ce={code:"en-US",formatDistance:A,formatLong:W,formatRelative:R,localize:Z,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};const b=ce,P={useUtc:!1,language:b,getFullYear(e){return this.useUtc?e.getUTCFullYear():e.getFullYear()},getMonth(e){return this.useUtc?e.getUTCMonth():e.getMonth()},getDaysInMonth(e){return this.daysInMonth(this.getFullYear(e),this.getMonth(e))},getDate(e){return this.useUtc?e.getUTCDate():e.getDate()},getDay(e){return this.useUtc?e.getUTCDay():e.getDay()},getHours(e){return this.useUtc?e.getUTCHours():e.getHours()},getMinutes(e){return this.useUtc?e.getUTCMinutes():e.getMinutes()},setFullYear(e,t){return this.useUtc?e.setUTCFullYear(t):e.setFullYear(t)},setMonth(e,t){return this.useUtc?e.setUTCMonth(t):e.setMonth(t)},setDate(e,t){return this.useUtc?e.setUTCDate(t):e.setDate(t)},compareDates(e,t){const s=new Date(e.getTime()),n=new Date(t.getTime());return this.useUtc?(s.setUTCHours(0,0,0,0),n.setUTCHours(0,0,0,0)):(s.setHours(0,0,0,0),n.setHours(0,0,0,0)),s.getTime()===n.getTime()},isValidDate(e){return Object.prototype.toString.call(e)!=="[object Date]"?!1:!isNaN(e.getTime())},getDayNameAbbr(e){if(typeof e!="object")throw TypeError("Invalid Type");return u.format(e,"ccc",{locale:this.language})},getDayFromAbbr(e){const t=new Date,s=[0,1,2,3,4,5,6];let n=s.map(l=>u.format(u.setDay(t,l),"ccc",{locale:b}));for(let l=0;l<n.length;l++)if(e.toLowerCase()===n[l].toLowerCase())return l;if(this.language!==b){n=s.map(l=>u.format(u.setDay(t,l),"ccc",{locale:this.language}));for(let l=0;l<n.length;l++)if(e.toLowerCase()===n[l].toLowerCase())return l}throw TypeError("Invalid week day")},getMonthName(e){if(typeof e=="object")return u.format(e,"LLLL",{locale:this.language});if(typeof e=="number")return u.format(u.setMonth(new Date,e),"LLLL",{locale:this.language});throw TypeError("Invalid type")},getMonthNameAbbr(e){if(typeof e=="object")return u.format(e,"LLL",{locale:this.language});if(typeof e=="number")return u.format(u.setMonth(new Date,e),"LLL",{locale:this.language});throw TypeError("Invalid type")},daysInMonth(e,t){return/8|3|5|10/.test(t)?30:t===1?!(e%4)&&e%100||!(e%400)?29:28:31},getNthSuffix(e){switch(e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},getDaysStartingOn(e,t=!1){const s=new Date,n=[0,1,2,3,4,5,6];let l="ccc";return t&&(l="cccccc"),n.map(i=>u.format(u.setDay(s,i+e),l,{locale:this.language}))},formatDate(e,t){return u.format(e,t,{locale:this.language})},parseDate(e,t="yyyy-MM-dd"){if(typeof e=="string")return u.parse(e,t,new Date,{locale:this.language});if(typeof e=="number")return u.toDate(e)},validateDateInput(e){return e===null||e instanceof Date||typeof e=="string"||typeof e=="number"},resetDateTime(e){return new Date(this.useUtc?e.setUTCHours(0,0,0,0):e.setHours(0,0,0,0))},getNewDateObject(e){return e?this.resetDateTime(new Date(e)):this.resetDateTime(new Date)}},h=(e=!1,t=b)=>({...P,useUtc:e,language:t}),T={...P},F=["dv","fa","ha","he","kwh","ks","ku","ps","ur","yi"],fe=["ja","lt","mn","ko"],w={zh:"年",ja:"年",ko:"년"},N={props:{autofocus:{type:Boolean,default:!1},bootstrapStyling:{type:Boolean,default:!1},clearButton:{type:Boolean,default:!1},clearButtonIcon:{type:String,default:null},calendarButton:{type:Boolean,default:!1},calendarButtonIcon:{type:String,default:null},calendarButtonIconContent:{type:String,default:null},disabled:{type:Boolean,default:!1},format:{type:[String,Function],default:"dd MMM yyyy"},id:{type:String,default:null},inline:{type:Boolean,default:!1},inputClass:{type:[String,Object,Array],default:null},maxlength:{type:[Number,String],default:null},name:{type:String,default:null},pattern:{type:String,default:null},placeholder:{type:String,default:null},refName:{type:String,default:""},required:{type:Boolean,default:!1},showCalendarOnFocus:{type:Boolean,default:!1},tabindex:{type:[Number,String],default:null},typeable:{type:Boolean,default:!1},useUtc:{type:Boolean,default:!1}}},f=(e,t)=>{const s=e.__vccOpts||e;for(const[n,l]of t)s[n]=l;return s},ge={name:"DateInput",mixins:[N],props:{isOpen:{type:Boolean,default:!1},language:{type:Object},openDate:Date,parseTypedDate:Function,resetTypedDate:[Date],selectedDate:{type:Date,default:null}},emits:{clearDate:null,closeCalendar:null,open:null,selectTypedDate:e=>e===null||e instanceof Date,setFocus:e=>e.every(t=>["calendarButton","input","prev","up","next","tabbableCell"].includes(t)),typedDate:e=>e===null||e instanceof Date},data(){return{input:null,typedDate:!1,utils:h(this.useUtc,this.language)}},computed:{formattedValue(){return this.selectedDate?this.typedDate?this.typedDate:typeof this.format=="function"?this.format(this.selectedDate):this.utils.formatDate(this.selectedDate,this.format):null},computedInputClass(){return this.bootstrapStyling?typeof this.inputClass=="string"?[this.inputClass,"form-control"].join(" "):{"form-control":!0,...this.inputClass}:this.inputClass}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)},resetTypedDate(){this.typedDate=!1}},mounted(){this.input=this.$el.querySelector("input")},methods:{showCalendar(){this.showCalendarOnFocus||this.toggle()},showFocusCalendar(){this.showCalendarOnFocus&&!this.isOpen&&this.$emit("open")},handleKeydownDown(){this.isOpen||this.$emit("open"),this.typeable&&this.$emit("setFocus",["prev","up","next","tabbableCell"])},handleKeydownEnter(){if(!this.typeable)return;if(!this.input.value){this.$emit("selectTypedDate",null);return}const e=this.getTypedDate(this.input.value);isNaN(e)||(this.typedDate=this.input.value,this.$emit("selectTypedDate",e))},handleKeydownEscape(){this.$emit("closeCalendar")},handleKeydownSpace(e){this.typeable||e.preventDefault()},keyUp(e){if(!(!this.typeable||["Control","Escape","Shift","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))){if(!this.input.value){this.$emit("typedDate",null);return}if(this.typeable){const t=this.getTypedDate(this.input.value);isNaN(t)||(this.typedDate=this.input.value,this.$emit("typedDate",t))}}},handleKeyupSpace(e){if(this.typeable){this.input.value===""&&this.toggle();return}e.preventDefault(),this.toggle()},inputBlurred(){this.typeable&&isNaN(this.getTypedDate(this.input.value))&&(this.clearDate(),this.input.value=null,this.typedDate=null)},handleDelete(){!this.typeable&&this.selectedDate&&this.clearDate()},clearDate(){this.$emit("clearDate")},getTypedDate(e){return typeof this.parseTypedDate=="function"?this.parseTypedDate(e):this.utils.parseDate(e,typeof this.format=="string"?this.format:void 0)},toggle(e){this.isOpen&&this.$emit("setFocus",[e||"input"]),this.$emit(this.isOpen?"closeCalendar":"open")}}},me=["disabled"],pe={key:0},be=["id","autofocus","clear-button","disabled","maxlength","name","open-date","pattern","placeholder","readonly","required","tabindex","type","value"],ye=["disabled"],De={key:0};function we(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"input-group":e.bootstrapStyling})},[e.calendarButton?(a.openBlock(),a.createElementBlock("button",{key:0,ref:"calendarButton",class:a.normalizeClass(["vdp-datepicker__calendar-button",{"btn input-group-prepend":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[0]||(t[0]=r=>i.toggle("calendarButton"))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"calendarBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.calendarButtonIcon)},[a.createTextVNode(a.toDisplayString(e.calendarButtonIconContent)+" ",1),e.calendarButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",pe,"…"))],2)])],2)],10,me)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"beforeDateInput"),a.createElementVNode("input",{id:e.id,ref:e.refName,autocomplete:"off",autofocus:e.autofocus,class:a.normalizeClass(i.computedInputClass),"clear-button":e.clearButton,disabled:e.disabled,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,pattern:e.pattern,placeholder:e.placeholder,readonly:!e.typeable,required:e.required,tabindex:e.tabindex,type:e.inline?"hidden":"text",value:i.formattedValue,onBlur:t[1]||(t[1]=(...r)=>i.inputBlurred&&i.inputBlurred(...r)),onClick:t[2]||(t[2]=(...r)=>i.showCalendar&&i.showCalendar(...r)),onFocus:t[3]||(t[3]=(...r)=>i.showFocusCalendar&&i.showFocusCalendar(...r)),onKeydown:[t[4]||(t[4]=a.withKeys((...r)=>i.handleDelete&&i.handleDelete(...r),["delete"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownDown&&i.handleKeydownDown(...r),["prevent"]),["down"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownEnter&&i.handleKeydownEnter(...r),["prevent"]),["enter"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...r)=>i.handleKeydownEscape&&i.handleKeydownEscape(...r),["prevent"]),["esc"])),t[8]||(t[8]=a.withKeys(r=>i.handleKeydownSpace(r),["space"]))],onKeyup:[t[9]||(t[9]=(...r)=>i.keyUp&&i.keyUp(...r)),t[10]||(t[10]=a.withKeys(r=>i.handleKeyupSpace(r),["space"]))]},null,42,be),e.clearButton&&s.selectedDate?(a.openBlock(),a.createElementBlock("button",{key:1,class:a.normalizeClass(["vdp-datepicker__clear-button",{"btn input-group-append":e.bootstrapStyling}]),disabled:e.disabled,onClick:t[11]||(t[11]=(...r)=>i.clearDate&&i.clearDate(...r))},[a.createElementVNode("span",{class:a.normalizeClass({"input-group-text":e.bootstrapStyling})},[a.renderSlot(e.$slots,"clearBtn",{},()=>[a.createElementVNode("i",{class:a.normalizeClass(e.clearButtonIcon)},[e.clearButtonIcon?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",De,"×"))],2)])],2)],10,ye)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"afterDateInput")],2)}const Ce=f(ge,[["render",we]]),Me={isDefined(e,t){return e&&typeof e[t]<"u"},hasArray(e,t){return e&&Array.isArray(e[t])},hasDate(e,t){return this.isDefined(e,t)&&this.utils.isValidDate(e[t])},dayMonthYear(e,t){const{utils:s}=this;if(!this.hasDate(e,t))return{day:void 0,month:void 0,year:void 0};const l=e[t];return{day:s.getDate(l),month:s.getMonth(l),year:s.getFullYear(l)}}},y=e=>({...Me,utils:e});class c{constructor(t,s){this._utils=t,this._disabledDates=s}get config(){const t=this._disabledDates,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to")};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}daysInMonth(t){const s=this._utils,n=s.getMonth(t),l=s.getFullYear(t);return s.daysInMonth(l,n)}isDateDisabledVia(t){const s=this._disabledDates,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:l}=s,i=y(this._utils);return l.some(r=>{const d=i.isDefined(r,"from"),o=i.isDefined(r,"to");return d&&o&&t<r.to&&t>r.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(l=>this._utils.compareDates(t,l)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isMonthDisabledVia(t){const{from:s,has:n,to:l}=this.config,i=this._utils.getMonth(t),r=this._utils.getFullYear(t);return{to:()=>n.to&&r<l.year?!0:n.to&&i<l.month&&r<=l.year,from:()=>n.from&&r>s.year?!0:n.from&&i>s.month&&r>=s.year}}isYearDisabledVia(t){const{from:s,has:n,to:l}=this.config,i=this._utils.getFullYear(t);return{to:()=>n.to&&i<l.year,from:()=>n.from&&i>s.year}}isDateDisabled(t){const s=this.isDateDisabledVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isMonthDisabled(t){const s=this.isMonthDisabledVia(t);if(s.to()||s.from())return!0;for(let n=1;n<=this.daysInMonth(t);n++){const l=new Date(t);if(l.setDate(n),!this.isDateDisabled(l))return!1}return!0}isYearDisabled(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const l=new Date(t);if(l.setMonth(n),!this.isMonthDisabled(l))return!1}return!0}getEarliestPossibleDate(t){if(!t)return null;const s=this._utils;if(this.isDateDisabled(t)){const n=new Date(s.getFullYear(t),s.getMonth(t),s.getDate(t)+1);return this.getEarliestPossibleDate(n)}return t}getLatestPossibleDate(t){const s=this.isYearDisabledVia(t);if(s.to()||s.from())return!0;for(let n=0;n<12;n++){const l=new Date(t);if(l.setMonth(n),!this.isMonthDisabled(l))return!1}return!0}}const Se={data(){return{focus:{delay:0,refs:[]},navElements:[],navElementsFocusedIndex:0,resetTabbableCell:!1,tabbableCell:null}},computed:{fallbackElementsToFocus(){const e=["tabbableCell","prev","next"];return this.typeable&&e.unshift("input"),e},tabbableCellId(){return this.tabbableCell&&Number(this.tabbableCell.getAttribute("data-id"))}},methods:{getCellDate(e){switch(this.view){case"month":return new Date(this.utils.setDate(e,1));case"year":return new Date(this.utils.setMonth(new Date(this.utils.setDate(e,1)),0));default:return e}},applyFocus(){const e=[...this.focus.refs,...this.fallbackElementsToFocus];for(let t=0;t<e.length;t++){const s=this.getElementByRef(e[t]);if(s&&s.getAttribute("disabled")===null){s.focus(),this.setNavElementsFocusedIndex();break}}},getActiveCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell"),s=this.hasClass(e,this.view);return t&&s&&!this.resetTabbableCell?e:null},getActiveElement(){return document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement},getCellId(e){if(!e||!this.$refs.picker.$refs.cells)return null;const t=this.getCellDate(e),{cells:s}=this.$refs.picker.$refs.cells;for(let n=0;n<s.length;n++)if(s[n].timestamp===t.valueOf())return n;return null},getElementByRef(e){return e==="tabbableCell"?this.tabbableCell:e==="input"?this.$refs.dateInput&&this.$refs.dateInput.$refs[this.refName]:e==="calendarButton"?this.$refs.dateInput&&this.$refs.dateInput.$refs.calendarButton:this.$refs.picker&&this.$refs.picker.$refs.pickerHeader&&this.$refs.picker.$refs.pickerHeader.$refs[e]},getElementsFromSlot(e){if(!this.hasSlot(e))return[];if(e==="beforeCalendarHeader")return this.getFocusableElements(this.$refs.view.children[0]);const t=e.indexOf("beforeCalendarHeader")>-1,s=this.$refs.picker.$el,n=t?0:s.children.length-1;return this.getFocusableElements(s.children[n])},getElementsFromHeader(){if(!this.$refs.picker.$refs.pickerHeader)return[];const t=this.$refs.picker.$refs.pickerHeader.$el.querySelectorAll("button:enabled");return[...Array.prototype.slice.call(t)]},getFocusableElements(e){if(!e)return[];const t=e.querySelectorAll('button:enabled:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]):not([type=hidden]), select:enabled:not([tabindex="-1"]), textarea:enabled:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])');return[...Array.prototype.slice.call(t)]},getInputField(){return!this.typeable||this.inline?null:this.$refs.dateInput.$refs[this.refName]},getTypedCell(){if(!this.typeable)return null;const e=this.getCellId(this.latestValidTypedDate);return e?this.$refs.picker.$refs.cells.$el.children[e]:null},hasSlot(e){return!!this.$slots[e]},reviewFocus(){this.tabbableCell=null,this.resetTabbableCell=!0,this.$nextTick(()=>{this.setNavElements(),setTimeout(()=>{this.applyFocus()},this.focus.delay),this.resetTabbableCell=!1})},setFocus(e){this.focus.refs=e,this.applyFocus()},setNavElements(){if(!this.view)return;this.updateTabbableCell();const e=this.ucFirst(this.view);this.navElements=[this.getInputField(),this.getElementsFromSlot("beforeCalendarHeader"),this.getElementsFromSlot(`beforeCalendarHeader${e}`),this.getElementsFromHeader(),this.tabbableCell].filter(t=>!!t).reduce((t,s)=>t.concat(s),[])},setNavElementsFocusedIndex(){const e=this.getActiveElement();for(let t=0;t<this.navElements.length;t++)if(e===this.navElements[t]){this.navElementsFocusedIndex=t;return}this.navElementsFocusedIndex=0},setTabbableCell(){if(!this.$refs.picker||!this.$refs.picker.$refs.cells)return;const e=this.$refs.picker.$refs.cells.$el;this.tabbableCell=this.getActiveCell()||this.getTypedCell()||e.querySelector("button.selected:not(.muted):enabled")||e.querySelector("button.today:not(.muted):enabled")||e.querySelector("button.cell:not(.muted):enabled")},updateTabbableCell(){const e=this.getActiveElement(),t=this.hasClass(e,"cell");(!this.tabbableCell||t)&&this.setTabbableCell()}}},ke={props:{bootstrapStyling:{type:Boolean,default:!1},isNextDisabled:{type:Boolean,required:!0},isPreviousDisabled:{type:Boolean,required:!0},isRtl:{type:Boolean,required:!0},isUpDisabled:{type:Boolean,default:!1},nextViewUp:{type:String,default:null},upButtonClasses:{type:String}},emits:{focusInput:null,pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>["day","month","year"].includes(e)},computed:{leftButton(){return[this.isRtl?"next":"prev"]},rightButton(){return[this.isRtl?"prev":"next"]}},methods:{arrowLeftPrev(){if(this.isRtl){this.$emit("setFocus",["up","next","tabbableCell"]);return}this.goToPreviousPage()},arrowRightPrev(){if(this.isRtl){this.goToPreviousPage();return}this.$emit("setFocus",["up","next","tabbableCell"])},arrowLeftNext(){if(this.isRtl){this.goToNextPage();return}this.$emit("setFocus",["up","prev","tabbableCell"])},arrowRightNext(){if(this.isRtl){this.$emit("setFocus",["up","prev","tabbableCell"]);return}this.goToNextPage()},focusInput(){this.$emit("focusInput")},focusTabbableCell(){this.$emit("setFocus",["tabbableCell"])},focusLeftButton(){this.$emit("setFocus",this.leftButton)},focusRightButton(){this.$emit("setFocus",this.rightButton)},goToNextPage(){this.$emit("pageChange",{incrementBy:1,focusRefs:["next"]})},goToPreviousPage(){this.$emit("pageChange",{incrementBy:-1,focusRefs:["prev"]})},selectUpButton(){this.isUpDisabled||this.$emit("setView",this.nextViewUp)}}},ve=["disabled"],Pe={key:1,ref:"up"},Te=["disabled"];function Fe(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("header",null,[a.createElementVNode("button",{ref:"prev",class:a.normalizeClass(["prev",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isPreviousDisabled,type:"button",onClick:t[0]||(t[0]=r=>s.isRtl?i.goToNextPage():i.goToPreviousPage()),onKeydown:[t[1]||(t[1]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[2]||(t[2]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[3]||(t[3]=a.withKeys(a.withModifiers((...r)=>i.arrowLeftPrev&&i.arrowLeftPrev(...r),["prevent"]),["left"])),t[4]||(t[4]=a.withKeys(a.withModifiers((...r)=>i.arrowRightPrev&&i.arrowRightPrev(...r),["prevent"]),["right"]))]},"<",42,ve),s.isUpDisabled?(a.openBlock(),a.createElementBlock("span",Pe,[a.renderSlot(e.$slots,"default")],512)):(a.openBlock(),a.createElementBlock("button",{key:0,ref:"up",class:a.normalizeClass([s.upButtonClasses,"up",{btn:s.bootstrapStyling}]),type:"button",onClick:t[5]||(t[5]=(...r)=>i.selectUpButton&&i.selectUpButton(...r)),onKeydown:[t[6]||(t[6]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[8]||(t[8]=a.withKeys(a.withModifiers((...r)=>i.focusLeftButton&&i.focusLeftButton(...r),["prevent"]),["left"])),t[9]||(t[9]=a.withKeys(a.withModifiers((...r)=>i.focusRightButton&&i.focusRightButton(...r),["prevent"]),["right"]))]},[a.renderSlot(e.$slots,"default")],34)),a.createElementVNode("button",{ref:"next",class:a.normalizeClass(["next",{btn:s.bootstrapStyling,rtl:s.isRtl}]),disabled:s.isNextDisabled,type:"button",onClick:t[10]||(t[10]=r=>s.isRtl?i.goToPreviousPage():i.goToNextPage()),onKeydown:[t[11]||(t[11]=a.withKeys(a.withModifiers((...r)=>i.focusTabbableCell&&i.focusTabbableCell(...r),["prevent"]),["down"])),t[12]||(t[12]=a.withKeys(a.withModifiers((...r)=>i.focusInput&&i.focusInput(...r),["prevent"]),["up"])),t[13]||(t[13]=a.withKeys(a.withModifiers((...r)=>i.arrowLeftNext&&i.arrowLeftNext(...r),["prevent"]),["left"])),t[14]||(t[14]=a.withKeys(a.withModifiers((...r)=>i.arrowRightNext&&i.arrowRightNext(...r),["prevent"]),["right"]))]},">",42,Te)])}const C=f(ke,[["render",Fe]]),Ne={name:"PickerCells",props:{bootstrapStyling:{type:Boolean,default:!1},cells:{type:Array,required:!0},isRtl:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!0},tabbableCellId:{type:Number,default:null},view:{type:String,validator:e=>["day","month","year"].includes(e),required:!0}},emits:{arrow(e){return typeof e=="object"},select(e){return typeof e=="object"}},computed:{columns(){return this.view==="day"?7:3}},methods:{cellClasses(e){return["cell",this.view,{blank:e.date==="",btn:this.bootstrapStyling,disabled:e.isDisabled,"highlight-start":e.isHighlightStart,"highlight-end":e.isHighlightEnd,highlighted:e.isHighlighted,muted:e.isPreviousMonth||e.isNextMonth,sat:e.isSaturday,sun:e.isSunday,selected:this.showEdgeDates?e.isSelected:e.isSelected&&!e.isPreviousMonth&&!e.isNextMonth,today:this.showEdgeDates?e.isToday:e.isToday&&!e.isPreviousMonth&&!e.isNextMonth,weekend:e.isWeekend}]},handleArrow(e,t){this.$emit("arrow",{cellId:e,delta:t})}}},Ve={class:"picker-cells"},Be=["data-id","disabled","onClick","onKeypress","onKeydown"];function Ee(e,t,s,n,l,i){return a.openBlock(),a.createElementBlock("div",Ve,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.cells,(r,d)=>(a.openBlock(),a.createElementBlock("button",{key:r.timestamp,class:a.normalizeClass(i.cellClasses(r)),"data-id":d,disabled:r.isDisabled,type:"button",onClick:o=>e.$emit("select",r),onKeypress:[a.withKeys(o=>e.$emit("select",r),["enter"]),a.withKeys(o=>e.$emit("select",r),["space"])],onKeydown:[a.withKeys(a.withModifiers(o=>i.handleArrow(d,-i.columns),["prevent"]),["up"]),a.withKeys(a.withModifiers(o=>i.handleArrow(d,i.columns),["prevent"]),["down"]),a.withKeys(a.withModifiers(o=>i.handleArrow(d,s.isRtl?1:-1),["prevent"]),["left"]),a.withKeys(a.withModifiers(o=>i.handleArrow(d,s.isRtl?-1:1),["prevent"]),["right"])]},[a.renderSlot(e.$slots,"default",{cell:r})],42,Be))),128))])}const M=f(Ne,[["render",Ee]]),S={props:{bootstrapStyling:{type:Boolean,default:!1},calendarClass:[String,Object,Array],calendarStyle:{type:Object},disabledDates:{type:Object},isTypeable:{type:Boolean,default:!1},isUpDisabled:{type:Boolean,default:!1},language:{type:Object},pageDate:{type:Date,default:null},selectedDate:{type:Date,default:null},slideDuration:{type:Number,default:250},tabbableCellId:{type:Number,default:null},useUtc:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:{select:e=>typeof e=="object",selectedDisabled:e=>typeof e=="object",setFocus:e=>e===["input"]},data(){return{utils:h(this.useUtc,this.language)}},watch:{language(e){this.utils=h(this.useUtc,e)},useUtc(e){this.utils=h(e,this.language)}},computed:{disabledConfig(){return this.disabledDates?new c(this.utils,this.disabledDates).config:{has:{from:!1,to:!1}}},earliestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getEarliestPossibleDate(this.disabledDates.to):null},isRtl(){return F.indexOf(this.language)!==-1},latestPossibleDate(){return this.disabledDates?new c(this.utils,this.disabledDates).getLatestPossibleDate(this.disabledDates.from):null},pageYear(){return this.utils.getFullYear(this.pageDate)}},methods:{addMoreSteps(e){return e.stepsRemaining<=0&&Math.abs(e.delta)>1?Math.abs(e.delta):e.stepsRemaining},changePageAndSetFocus(e){const{delta:t}=e;t>0&&this.isNextDisabled||t<0&&this.isPreviousDisabled||(this.changePage({incrementBy:Math.sign(t),focusRefs:["arrow-to-cell"]}),this.$nextTick(()=>{this.setFocusOnNewPage(e)}))},focusInput(){this.isTypeable&&this.$emit("setFocus",["input"])},getElement({currentElement:e,delta:t,stepsRemaining:s}){const n=this.getElementSibling(e,t),l={currentElement:n,delta:t,stepsRemaining:s-1};return n?this.isBeyondPossibleDate(l)?this.firstOrLastPossibleDate(l):this.isMutedOrDisabled(n)?(l.stepsRemaining=this.addMoreSteps(l),this.getElement(l)):s>1&&l.currentElement?this.getElement(l):n:this.changePageAndSetFocus(l)},getElementSibling(e,t){return t>0?e.nextElementSibling:e.previousElementSibling},getFirstOrLastElement(e){const t=e>0,s=this.$refs.cells.$el.children;return t?s[0]:s[s.length-1]},firstOrLastPossibleDate({currentElement:e,delta:t}){return t>0?this.getElementSibling(e,-1):this.getElementSibling(e,1)},handleArrow({delta:e}){const t=document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement,s=Math.abs(e),n={currentElement:t,delta:e,stepsRemaining:s};this.setFocusToAvailableCell(n)},select(e){e.isDisabled?this.$emit("selectedDisabled",e):this.$emit("select",e)},isBeyondPossibleDate({currentElement:e,delta:t}){return t>0&&this.latestPossibleDate?this.isDatePossible(e,t):t<0&&this.earliestPossibleDate?this.isDatePossible(e,t):!1},isDatePossible(e,t){const s=e.getAttribute("data-id"),n=new Date(this.cells[s].timestamp);return t>0?n>this.latestPossibleDate:n<this.earliestPossibleDate},isMutedOrDisabled(e){const t=e.classList.value.split(" ").includes("muted"),s=e.disabled;return t||s},setFocusOnNewPage({delta:e,stepsRemaining:t}){const s=this.getFirstOrLastElement(e),n={currentElement:s,delta:e,stepsRemaining:t};if(t<=0){if(this.isMutedOrDisabled(s)){n.stepsRemaining=Math.abs(n.delta),setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration);return}setTimeout(()=>{s.focus()},this.slideDuration);return}setTimeout(()=>{this.setFocusToAvailableCell(n)},this.slideDuration)},setFocusToAvailableCell(e){const t=this.getElement(e);t&&t.focus()}}};class k{constructor(t,s,n){this._utils=t,this._disabledDates=s,this._highlighted=n}get config(){const t=this._highlighted,s=y(this._utils),n={customPredictor:s.isDefined(t,"customPredictor"),daysOfMonth:s.hasArray(t,"daysOfMonth"),daysOfWeek:s.hasArray(t,"days"),from:s.hasDate(t,"from"),ranges:s.hasArray(t,"ranges"),specificDates:s.hasArray(t,"dates"),to:s.hasDate(t,"to"),includeDisabled:s.isDefined(t,"includeDisabled")&&t.includeDisabled};return{to:s.dayMonthYear(t,"to"),from:s.dayMonthYear(t,"from"),has:n}}isDateDisabled(t){const s=this._utils,n=this._disabledDates;return new c(s,n).isDateDisabled(t)}isHighlightingNotPossible(t){return!this.config.has.includeDisabled&&this.isDateDisabled(t)}isDateHighlightedVia(t){const s=this._highlighted,{has:n}=this.config;return{to:()=>n.to&&t<s.to,from:()=>n.from&&t>s.from,range:()=>{if(!n.ranges)return!1;const{ranges:l}=s,i=y(this._utils);return l.some(r=>{const d=i.isDefined(r,"from"),o=i.isDefined(r,"to");return d&&o&&t<=r.to&&t>=r.from})},customPredictor:()=>n.customPredictor&&s.customPredictor(t),specificDate:()=>n.specificDates?s.dates.some(l=>this._utils.compareDates(t,l)):!1,daysOfWeek:()=>n.daysOfWeek?s.days.indexOf(this._utils.getDay(t))!==-1:!1,daysOfMonth:()=>n.daysOfMonth?s.daysOfMonth.indexOf(this._utils.getDate(t))!==-1:!1}}isDateHighlighted(t){if(this.isHighlightingNotPossible(t))return!1;const s=this.isDateHighlightedVia(t);return s.to()||s.from()||s.range()||s.specificDate()||s.daysOfWeek()||s.daysOfMonth()||s.customPredictor()}isHighlightStart(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].from.valueOf()===t.valueOf())return!0;return!1}isHighlightEnd(t){if(!this.config.has.ranges||!this.isDateHighlighted(t))return!1;for(let s=0;s<this._highlighted.ranges.length;s+=1)if(this._highlighted.ranges[s].to.valueOf()===t.valueOf())return!0;return!1}}const Oe={name:"PickerDay",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{dayCellContent:{type:Function,default:e=>e.date},firstDayOfWeek:{type:String},highlighted:{type:Object,default(){return{}}},mondayFirst:{type:Boolean,default:!1},showEdgeDates:{type:Boolean,default:!1},showFullMonthName:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean,default:!1}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="month"},computed:{currMonthName(){return this.showFullMonthName?this.utils.getMonthName(this.pageMonth):this.utils.getMonthNameAbbr(this.pageMonth)},currYearName(){const e=w[this.language]||"";return`${this.pageYear}${e}`},days(){const e=[],t=this.daysFromPrevMonth+this.daysInMonth+this.daysFromNextMonth,s=this.firstDayCellDate();for(let n=0;n<t;n++)e.push(this.makeDay(s)),this.utils.setDate(s,this.utils.getDate(s)+1);return e},daysFromNextMonth(){const e=this.daysFromPrevMonth+this.daysInMonth;return Math.ceil(e/7)*7-e},daysFromPrevMonth(){const e=this.utils.getDay(this.pageDate);return(7-this.firstDayOfWeekNumber+e)%7},daysInMonth(){return this.utils.getDaysInMonth(this.pageDate)},daysOfWeek(){return this.utils.getDaysStartingOn(this.firstDayOfWeekNumber,this.twoLetterAbbr)},firstDayOfWeekNumber(){return this.mondayFirst?1:this.firstDayOfWeek?this.utils.getDayFromAbbr(this.firstDayOfWeek):0},firstOfNextMonth(){const e=new Date(this.pageDate);return new Date(this.utils.setMonth(e,this.utils.getMonth(e)+1))},isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.month<=this.pageMonth&&this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.month>=this.pageMonth&&this.disabledConfig.to.year>=this.pageYear:!1},pageMonth(){return this.utils.getMonth(this.pageDate)},pageTitleDay(){return fe.indexOf(this.language.code)!==-1?`${this.currYearName} ${this.currMonthName}`:`${this.currMonthName} ${this.currYearName}`}},methods:{firstDayCellDate(){const e=new Date(this.pageDate);return new Date(this.utils.setDate(e,1-this.daysFromPrevMonth))},changeMonth({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setMonth(s,this.utils.getMonth(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeMonth({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeMonth({incrementBy:e,focusRefs:t})},isSelectedDate(e){return this.selectedDate&&this.utils.compareDates(this.selectedDate,e)},isDisabledDate(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},isHighlightedDate(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isDateHighlighted(e):!1},isHighlightStart(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightStart(e):!1},isHighlightEnd(e){return this.highlighted?new k(this.utils,this.disabledDates,this.highlighted).isHighlightEnd(e):!1},makeDay(e){const{utils:t}=this,s=t.getDay(e),n=e>=this.firstOfNextMonth,l=e<this.pageDate,i=s===6,r=s===0;return{date:this.showEdgeDates||!(l||n)?t.getDate(e):"",timestamp:e.getTime(),isSelected:this.isSelectedDate(e),isDisabled:this.isDisabledDate(e),isHighlighted:this.isHighlightedDate(e),isHighlightStart:this.isHighlightStart(e),isHighlightEnd:this.isHighlightEnd(e),isToday:t.compareDates(e,new Date),isWeekend:i||r,isSaturday:i,isSunday:r,isPreviousMonth:l,isNextMonth:n}}}};function Ie(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),d=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"month","up-button-classes":"day__month_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleDay),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createElementVNode("div",{class:a.normalizeClass({"flex-rtl":e.isRtl})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysOfWeek,o=>(a.openBlock(),a.createElementBlock("span",{class:"cell day-header",key:o.timestamp},a.toDisplayString(o),1))),128)),a.createVNode(d,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.days,"is-rtl":e.isRtl,"show-edge-dates":s.showEdgeDates,"tabbable-cell-id":e.tabbableCellId,view:"day",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(s.dayCellContent(o)),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","show-edge-dates","tabbable-cell-id"])],2)],38)),[[a.vShow,e.visible]])}const Ae=f(Oe,[["render",Ie]]),Ye={name:"PickerMonth",components:{PickerHeader:C,PickerCells:M},mixins:[S],emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t)),setView:e=>e==="year"},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageYear:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageYear:!1},months(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(e.getUTCFullYear(),0,e.getUTCDate())):new Date(e.getFullYear(),0,e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<12;n++)t.push({month:this.utils.getMonthName(s),timestamp:s.getTime(),isDisabled:this.isDisabledMonth(s),isSelected:this.isSelectedMonth(s),isToday:this.isTodayMonth(s)}),this.utils.setMonth(s,this.utils.getMonth(s)+1);return t},pageTitleMonth(){const e=w[this.language]||"";return`${this.pageYear}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e,focusRefs:t})},isSelectedMonth(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)&&this.utils.getMonth(this.selectedDate)===this.utils.getMonth(e)},isDisabledMonth(e){return this.disabledDates?new c(this.utils,this.disabledDates).isMonthDisabled(e):!1},isTodayMonth(e){const{utils:t}=this,s=new Date(t.setDate(t.getNewDateObject(),1));return t.compareDates(e,s)}}};function Ue(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),d=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[5]||(t[5]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":e.isUpDisabled,"next-view-up":"year","up-button-classes":"month__year_btn",onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o)),onSetView:t[2]||(t[2]=o=>e.$emit("setView",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleMonth),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","is-up-disabled","onFocusInput"]),a.createVNode(d,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.months,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"month",onArrow:t[3]||(t[3]=o=>e.handleArrow(o)),onSelect:t[4]||(t[4]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.month),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const xe=f(Ye,[["render",Ue]]),He={name:"PickerYear",components:{PickerHeader:C,PickerCells:M},mixins:[S],props:{highlighted:{type:Object,default(){return{}}}},emits:{pageChange:e=>typeof e=="object",setFocus:e=>e.every(t=>["input","prev","up","next","tabbableCell"].includes(t))},computed:{isNextDisabled(){return this.disabledConfig.has.from?this.disabledConfig.from.year<=this.pageDecadeEnd:!1},isPreviousDisabled(){return this.disabledConfig.has.to?this.disabledConfig.to.year>=this.pageDecadeStart:!1},pageDecadeStart(){return Math.floor(this.pageYear/10)*10},pageDecadeEnd(){return this.pageDecadeStart+10-1},years(){const e=this.pageDate,t=[],s=this.useUtc?new Date(Date.UTC(Math.floor(e.getUTCFullYear()/10)*10,e.getUTCMonth(),e.getUTCDate())):new Date(Math.floor(e.getFullYear()/10)*10,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());for(let n=0;n<10;n++)t.push({year:this.utils.getFullYear(s),timestamp:s.getTime(),isDisabled:this.isDisabledYear(s),isSelected:this.isSelectedYear(s),isToday:this.isTodayYear(s)}),this.utils.setFullYear(s,this.utils.getFullYear(s)+1);return t},pageTitleYear(){const e=w[this.language]||"";return`${this.pageDecadeStart} - ${this.pageDecadeEnd}${e}`}},methods:{changeYear({incrementBy:e,focusRefs:t}){const s=this.pageDate;this.utils.setFullYear(s,this.utils.getFullYear(s)+e),this.$emit("pageChange",{focusRefs:t,pageDate:s})},changePage({incrementBy:e,focusRefs:t}){e===1&&!this.isNextDisabled?this.changeYear({incrementBy:e*10,focusRefs:t}):e===-1&&!this.isPreviousDisabled&&this.changeYear({incrementBy:e*10,focusRefs:t})},isSelectedYear(e){return this.selectedDate&&this.utils.getFullYear(this.selectedDate)===this.utils.getFullYear(e)},isDisabledYear(e){return this.disabledDates?new c(this.utils,this.disabledDates).isYearDisabled(e):!1},isTodayYear(e){const{utils:t}=this,s=t.getFullYear(t.getNewDateObject());return t.getFullYear(e)===s}}};function We(e,t,s,n,l,i){const r=a.resolveComponent("picker-header"),d=a.resolveComponent("picker-cells");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.calendarClass,"vdp-datepicker__calendar"]),style:a.normalizeStyle(e.calendarStyle),onMousedown:t[4]||(t[4]=a.withModifiers(()=>{},["prevent"]))},[a.renderSlot(e.$slots,"beforeCalendarHeader"),a.createVNode(r,{ref:"pickerHeader","bootstrap-styling":e.bootstrapStyling,"is-next-disabled":i.isNextDisabled,"is-previous-disabled":i.isPreviousDisabled,"is-rtl":e.isRtl,"is-up-disabled":!0,onFocusInput:e.focusInput,onPageChange:t[0]||(t[0]=o=>i.changePage(o)),onSetFocus:t[1]||(t[1]=o=>e.$emit("setFocus",o))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.pageTitleYear),1)]),_:1},8,["bootstrap-styling","is-next-disabled","is-previous-disabled","is-rtl","onFocusInput"]),a.createVNode(d,{ref:"cells","bootstrap-styling":e.bootstrapStyling,cells:i.years,"is-rtl":e.isRtl,"tabbable-cell-id":e.tabbableCellId,view:"year",onArrow:t[2]||(t[2]=o=>e.handleArrow(o)),onSelect:t[3]||(t[3]=o=>e.select(o))},{default:a.withCtx(({cell:o})=>[a.createTextVNode(a.toDisplayString(o.year),1)]),_:1},8,["bootstrap-styling","cells","is-rtl","tabbable-cell-id"])],38)),[[a.vShow,e.visible]])}const $e=f(He,[["render",We]]),ze="",Le={name:"DatePicker",components:{DateInput:Ce,PickerDay:Ae,PickerMonth:xe,PickerYear:$e},mixins:[N,Se],props:{calendarClass:{type:[String,Object,Array],default:""},dayCellContent:{type:Function},disabledDates:{type:Object},firstDayOfWeek:{type:String},fullMonthName:{type:Boolean},highlighted:{type:Object},initialView:{type:String,default:""},language:{type:Object,default(){return b}},maximumView:{type:String,default:"year"},minimumView:{type:String,default:"day"},mondayFirst:{type:Boolean},openDate:{validator:e=>T.validateDateInput(e)},parseTypedDate:{type:Function},showEdgeDates:{type:Boolean,default:!1},twoLetterAbbr:{type:Boolean},value:{validator:e=>T.validateDateInput(e)},wrapperClass:{type:[String,Object,Array],default:""}},emits:{changedMonth:e=>typeof e=="object",changedYear:e=>typeof e=="object",changedDecade:e=>typeof e=="object",cleared:null,closed:null,input:e=>e instanceof Date||e===null,opened:null,selected:e=>e instanceof Date||e===null,selectedDisabled:e=>typeof e=="object"},data(){const e=this.openDate?new Date(this.openDate):new Date,t=h(this.useUtc,this.language);return{calendarHeight:0,latestValidTypedDate:null,pageTimestamp:t.setDate(e,1),selectedDate:null,slideDuration:250,resetTypedDate:new Date,utils:t,view:""}},watch:{disabledDates:{handler(){const e=this.selectedDate||this.parseValue(this.value);if(e){if(this.isDateDisabled(e)&&e){this.setDate(null);return}this.dateHasChanged(e)&&this.setDate(e)}},deep:!0},initialView(){this.isOpen&&this.setInitialView()},language(e){this.utils=h(this.useUtc,e)},latestValidTypedDate(e){this.setPageDate(e)},useUtc(e){this.utils=h(e,this.language)},value(e){this.setValue(e)},openDate(){this.setPageDate()}},computed:{computedInitialView(){return this.initialView?this.initialView:this.minimumView},computedOpenDate(){const e=this.parseValue(this.openDate),t=this.utils.getNewDateObject(e),s=this.selectedDate||t;return this.minimumView==="day"?s:new Date(this.utils.setDate(s,1))},calendarStyle(){return{position:this.isInline?"static":void 0}},isInline(){return!!this.inline},isOpen(){return this.view!==""},isRtl(){return F.indexOf(this.language)!==-1},isUpDisabled(){return!this.allowedToShowView(this.nextView.up)},nextView(){const e=["day","month","year"],t=i=>i===this.view,s=e.findIndex(t),n=i=>i<=0?void 0:e[i-1];return{up:(i=>{if(!(i<0))return i===e.length-1?"decade":e[i+1]})(s),down:n(s)}},pageDate(){return new Date(this.pageTimestamp)},picker(){const e=this.view||this.computedInitialView;return`Picker${this.ucFirst(e)}`}},methods:{resetDefaultPageDate(){if(this.selectedDate===null){this.setPageDate();return}this.setPageDate(this.selectedDate)},open(){if(this.disabled||this.isInline)return!1;this.setInitialView(),this.reviewFocus(),this.$emit("opened")},parseValue(e){if(typeof e=="string"||typeof e=="number"){const t=new Date(e);return this.utils.isValidDate(t)?t:null}return this.utils.isValidDate(e)?e:null},selectTypedDate(e){this.setDate(e.getTime()),this.reviewFocus(),this.isOpen&&this.close()},setInitialView(){const e=this.computedInitialView;if(!this.allowedToShowView(e))throw new Error(`initialView '${this.initialView}' cannot be rendered based on minimum '${this.minimumView}' and maximum '${this.maximumView}'`);this.setView(e)},allowedToShowView(e){const t=["day","month","year"],s=t.indexOf(this.minimumView),n=t.indexOf(this.maximumView),l=t.indexOf(e);return l>=s&&l<=n},setDate(e){const t=new Date(e);this.selectedDate=t,this.setPageDate(t),this.$emit("selected",t),this.$emit("input",t)},clearDate(){this.selectedDate=null,this.setPageDate(),this.$emit("selected",null),this.$emit("input",null),this.focus.refs=["input"],this.close(),this.$emit("cleared")},handleSelect(e){if(this.allowedToShowView(this.nextView.down)){this.showNextViewDown(e);return}this.$refs.dateInput.typedDate="",this.setDate(e.timestamp),this.focus.delay=e.isNextMonth?this.slideDuration:0,this.focus.refs=this.isInline?["tabbableCell"]:["input"],this.close(),this.reviewFocus(),this.resetTypedDate=new Date},selectDisabledDate(e){this.$emit("selectedDisabled",e)},setValue(e){if(typeof e=="string"||typeof e=="number"){const t=this.utils.parseDate(e,this.format);e=isNaN(t.valueOf())?null:t}this.selectedDate=e||null,this.setPageDate(e),this.typeable&&(this.latestValidTypedDate=e||this.computedOpenDate)},setView(e){this.allowedToShowView(e)&&(this.view=e)},setPageDate(e){e||(this.openDate?e=new Date(this.openDate):e=new Date),this.pageTimestamp=this.utils.setDate(new Date(e),1)},setTypedDate(e){const t=new Date(this.pageDate);if(this.latestValidTypedDate=e||this.computedOpenDate,this.setPageDate(e),this.isPageChange(t)){this.handlePageChange({focusRefs:[],pageDate:this.pageDate});return}this.setTabbableCell()},close(){this.isInline||(this.view="",this.reviewFocus(),this.$emit("closed"))},handlePageChange({focusRefs:e,pageDate:t}){this.setPageDate(t),this.focus.refs=e,this.focus.delay=this.slideDuration||250,this.reviewFocus(),this.$emit(`changed${this.ucFirst(this.nextView.up)}`,t)},hasClass(e,t){return e&&e.className.split(" ").includes(t)},isPageChange(e){return this.isOpen?e.valueOf()!==this.pageDate.valueOf():!1},init(){this.typeable&&(this.latestValidTypedDate=this.selectedDate||this.computedOpenDate),this.value&&this.setValue(this.value),this.isInline&&this.setInitialView()},isDateDisabled(e){return this.disabledDates?new c(this.utils,this.disabledDates).isDateDisabled(e):!1},showNextViewDown(e){this.setPageDate(new Date(e.timestamp)),this.$emit(`changed${this.ucFirst(this.view)}`,e),this.setView(this.nextView.down)},ucFirst(e){return e[0].toUpperCase()+e.substring(1)}},mounted(){this.init()}};function Re(e,t,s,n,l,i){const r=a.resolveComponent("date-input");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vdp-datepicker",[s.wrapperClass,i.isRtl?"rtl":""]])},[a.createVNode(r,{id:e.id,ref:"dateInput",autofocus:e.autofocus,"bootstrap-styling":e.bootstrapStyling,"calendar-button":e.calendarButton,"calendar-button-icon":e.calendarButtonIcon,"calendar-button-icon-content":e.calendarButtonIconContent,"clear-button":e.clearButton,"clear-button-icon":e.clearButtonIcon,disabled:e.disabled,format:e.format,inline:e.inline,"input-class":e.inputClass,"is-open":i.isOpen,language:s.language,maxlength:e.maxlength,name:e.name,"open-date":s.openDate,"parse-typed-date":s.parseTypedDate,pattern:e.pattern,placeholder:e.placeholder,"ref-name":e.refName,required:e.required,"reset-typed-date":l.resetTypedDate,"selected-date":l.selectedDate,"show-calendar-on-focus":e.showCalendarOnFocus,tabindex:e.tabindex,typeable:e.typeable,"use-utc":e.useUtc,onClearDate:i.clearDate,onCloseCalendar:i.close,onOpen:i.open,onSelectTypedDate:i.selectTypedDate,onSetFocus:t[0]||(t[0]=d=>e.setFocus(d)),onTypedDate:i.setTypedDate},{calendarBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"calendarBtn")]),beforeDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeDateInput")]),clearBtn:a.withCtx(()=>[a.renderSlot(e.$slots,"clearBtn")]),afterDateInput:a.withCtx(()=>[a.renderSlot(e.$slots,"afterDateInput")]),_:3},8,["id","autofocus","bootstrap-styling","calendar-button","calendar-button-icon","calendar-button-icon-content","clear-button","clear-button-icon","disabled","format","inline","input-class","is-open","language","maxlength","name","open-date","parse-typed-date","pattern","placeholder","ref-name","required","reset-typed-date","selected-date","show-calendar-on-focus","tabindex","typeable","use-utc","onClearDate","onCloseCalendar","onOpen","onSelectTypedDate","onTypedDate"]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.picker),{ref:"picker","bootstrap-styling":e.bootstrapStyling,calendarClass:s.calendarClass,calendarStyle:i.calendarStyle,dayCellContent:s.dayCellContent,disabledDates:s.disabledDates,firstDayOfWeek:s.firstDayOfWeek,highlighted:s.highlighted,"is-typeable":e.typeable,"is-up-disabled":i.isUpDisabled,language:s.language,mondayFirst:s.mondayFirst,pageDate:i.pageDate,selectedDate:l.selectedDate,showEdgeDates:s.showEdgeDates,showFullMonthName:s.fullMonthName,"slide-duration":l.slideDuration,"tabbable-cell-id":e.tabbableCellId,twoLetterAbbr:s.twoLetterAbbr,"use-utc":e.useUtc,visible:i.isOpen,onPageChange:i.handlePageChange,onSelect:i.handleSelect,onSetFocus:t[1]||(t[1]=d=>e.setFocus(d)),onSetView:i.setView,onSelectedDisabled:i.selectDisabledDate},{beforeCalendarHeader:a.withCtx(()=>[a.renderSlot(e.$slots,"beforeCalendarHeader")]),_:3},40,["bootstrap-styling","calendarClass","calendarStyle","dayCellContent","disabledDates","firstDayOfWeek","highlighted","is-typeable","is-up-disabled","language","mondayFirst","pageDate","selectedDate","showEdgeDates","showFullMonthName","slide-duration","tabbable-cell-id","twoLetterAbbr","use-utc","visible","onPageChange","onSelect","onSetView","onSelectedDisabled"]))],2)}return f(Le,[["render",Re]])});
{
"name": "@wslyhbb/vuejs-datepicker",
"version": "4.1.3",
"version": "4.1.4",
"publishConfig": {

@@ -12,3 +12,5 @@ "access": "public"

"date-picker",
"calendar"
"calendar",
"keyboard navigation",
"typeable"
],

@@ -15,0 +17,0 @@ "main": "dist/vuejs-datepicker.common.js",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc