@ecwenze1/vue-datepicker
Version:
A clean datepicker made with VueJs
6 lines • 87.3 kB
JavaScript
/*!
* Vue-datepicker v0.2.16
* (c) 2019-2022 Mathieu Stanowski
*/
import{clearAllBodyScrollLocks as t,disableBodyScroll as e,enableBodyScroll as n}from"body-scroll-lock";import i from"vue";import r from"dayjs";var a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},o={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:0,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"[".concat(t).concat(e[(n-20)%10]||e[n]||e[0],"]")},buttonValidate:"Ok",buttonCancel:"Cancel",rangeHeaderText:"From %d To %d"},s={name:"fr",weekdays:"Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Août_Septembre_Octobre_Novembre_Décembre".split("_"),weekStart:1,weekdaysShort:"Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),monthsShort:"Janv_Févr_Mars_Avr_Mai_Juin_Juil_Août_Sept_Oct_Nov_Déc".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},buttonValidate:"Ok",buttonCancel:"Annuler",rangeHeaderText:"Du %d Au %d"},c={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},ordinal:function(t){return"".concat(t,"º")},buttonValidate:"Ok",buttonCancel:"Anular",rangeHeaderText:"Del %d Al %d"},l={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),ordinal:function(t){return"".concat(t,".")},weekStart:1,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},buttonValidate:"Ok",buttonCancel:"Abbrechen",rangeHeaderText:"Vom %d Bis %d"},u={name:"he",weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א׳_ב׳_ג׳_ד׳_ה׳_ו_ש׳".split("_"),months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו_פבר_מרץ_אפר_מאי_יונ_יול_אוג_ספט_אוק_נוב_דצמ".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},buttonValidate:"אישור",buttonCancel:"ביטול",rangeHeaderText:"מתאריך %d עד תאריך %d"},h={name:"ru",weekdays:"Воскресенье_Понедельник_Вторник_Среда_Четверг_Пятница_Суббота".split("_"),weekdaysShort:"Вс_Пн_Вт_Ср_Чт_Пт_Сб".split("_"),weekdaysMin:"Вс_Пн_Вт_Ср_Чт_Пт_Сб".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(t){return t},buttonValidate:"Ок",buttonCancel:"Отмена",rangeHeaderText:"От %d До %d"},d={name:"sv",weekdays:"Söndag_Måndag_Tisdag_Onsdag_Torsdag_Fredag_Lördag".split("_"),weekdaysShort:"Sön_Mån_Tis_Ons_Tor_Fre_Lör".split("_"),weekdaysMin:"Sö_Må_Ti_On_To_Fr_Lö".split("_"),months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekStart:0,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"[".concat(t).concat(e[(n-20)%10]||e[n]||e[0],"]")},buttonValidate:"Ok",buttonCancel:"Avbryt",rangeHeaderText:"Från %d till %d"},p=Object.freeze({__proto__:null,fr:s,en:o,es:c,de:l,he:u,ru:h,sv:d}),f=["name","weekdays","weekdaysShort","weekdaysMin","weekStart","months","monthsShort","ordinal","formats","buttonCancel","buttonValidate","rangeHeaderText"],m={date:"DD MMMM YYYY",month:"MMMM YYYY",quarter:"YYYY-[Q]Q",year:"YYYY",range:"DD MMMM YYYY"},v={date:"YYYY-MM-DD",month:"YYYY-MM",quarter:"YYYY-Q",year:"YYYY",range:"YYYY-MM-DD"},y={date:"dddd DD MMMM",month:"MMMM",quarter:"[Q]Q",year:"YYYY",range:"DD MMMM YYYY"},g=1900,b=3e3,D="date",_="month",k="quarter",O="year",w=/(%d)+/,M=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34});function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function S(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?Y(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Y(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var x=i.extend({name:"Localable",props:{locale:{type:Object,default:function(){return{lang:void 0}}}},computed:{currentLocale:function(){var t=this.locale.lang;return S(S({},this.locale),{},{lang:this.getLocale(t)})}},methods:{getDefaultLang:function(){return(this.$vuedatepicker&&this.$vuedatepicker.lang||window.navigator.userLanguage||window.navigator.language||"en").substr(0,2)},isValidLocale:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.keys(t);return e.length>0&&e.every((function(t){return f.includes(t)}))},getLocale:function(t){return this.isValidLocale(t)?t:p[t]||this.getLocale(this.getDefaultLang())}}}),C=i.extend({name:"Mobile",props:{mobileBreakpoint:{type:[Number,String],default:576,validator:function(t){return!isNaN(Number(t))}}},data:function(){return{width:0,mobile:!1,resizeTimeout:void 0}},computed:{isMobile:function(){return this.mobile}},created:function(){var t=this;window&&(window.addEventListener("resize",this.onResize,{passive:!0}),this.$on("hook:destroyed",(function(){window.removeEventListener("resize",t.onResize,{passive:!0})})),this.update())},methods:{onResize:function(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.update,200)},update:function(){var t=this.getClientWidth();this.width=t,this.mobile=t<parseInt(this.mobileBreakpoint,10)},getClientWidth:function(){return"undefined"==typeof document?0:Math.max(document.documentElement.clientWidth,window.innerWidth||0)}}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $(t,e){return t(e={exports:{}},e.exports),e.exports}var L=$((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e})),j=["click"],P=[],T={instances:P,bind:E,update:function(t,e){JSON.stringify(e.value)!==JSON.stringify(e.oldValue)&&E(t,e)},unbind:H};function E(t,e){var n=e.value;H(t);var i=n,r="function"==typeof i,a="object"===L(i);if((r||a)&&!(!1===i.isActive)){var o=function(t){var e=t.el,n=t.handler;return{el:e,eventHandlers:j.map((function(t){return{event:t,handler:function(t){return function(t){var e=t.event,n=t.el,i=t.handler,r=e.path||(e.composedPath?e.composedPath():void 0);if(r?r.indexOf(n)<0:!n.contains(e.target))return i(e,n)}({event:t,el:e,handler:n})}}}))}}({el:t,handler:r?i:i.handler});o.eventHandlers.forEach((function(t){var e=t.event,n=t.handler;return setTimeout((function(){return document.addEventListener(e,n,!1)}),0)})),P.push(o)}}function H(t){var e=P.findIndex((function(e){return e.el===t}));-1!==e&&(P[e].eventHandlers.forEach((function(t){var e=t.event,n=t.handler;return document.removeEventListener(e,n,!1)})),P.splice(e,1))}var A={model:{prop:"value",event:"input"},props:{value:{type:Boolean,required:!1}},data:function(){return{isActive:!1}},watch:{value:{handler:function(t){this.isActive=t},immediate:!0},isActive:function(t){t!==this.value&&this.$emit("input",t)}}};function N(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=function r(a){n(a),t.removeEventListener(e,r,i)};t.addEventListener(e,r,i)}function B(t){var e=L(t);return"boolean"===e||"string"===e||t.nodeType===Node.ELEMENT_NODE}function F(t){if(null!=t&&""!==t)return isNaN(+t)?String(t):"".concat(Number(t),"px")}function I(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.$scopedSlots[e]?t.$scopedSlots[e]&&t.$scopedSlots[e](n):!t.$slots[e]||n&&!i?void 0:t.$slots[e]}function V(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return 0;var e=+window.getComputedStyle(t).getPropertyValue("z-index");return e||V(t.parentNode)}var z={mixins:[A],props:{activator:{default:void 0,validator:function(t){return["string","object"].includes(L(t))}},disabled:{type:Boolean,default:!1}},data:function(){return{activatorElement:void 0,activatorNode:[]}},watch:{activator:"resetActivator"},mounted:function(){var t,e,n,i=(e="activator",n=!0,(t=this).$slots[e]&&t.$scopedSlots[e]&&t.$scopedSlots[e].name?n?"v-slot":"scoped":t.$slots[e]?"normal":t.$scopedSlots[e]?"scoped":void 0);i&&["v-slot","normal"].includes(i)&&console.error('The activator slot must be bound, try \'<template v-slot:activator="{ on }"><button v-on="on">\'',this),this.getActivator()},methods:{resetActivator:function(){this.activatorElement=void 0,this.getActivator()},genActivator:function(){var t=I(this,"activator",Object.assign(this.getValueProxy(),{attrs:{role:"button","aria-haspopup":!0,"aria-expanded":String(this.isActive)}}))||[];return this.activatorNode=t,t},getActivator:function(t){if(this.activatorElement)return this.activatorElement;var e;if(this.activator){var n=document;e="string"==typeof this.activator?n.querySelector(this.activator):this.activator.$el?this.activator.$el:this.activator}else t?e=t.currentTarget||t.target:this.activatorNode.length&&(e=this.activatorNode[0].elm);return this.activatorElement=e,this.activatorElement},getContentSlot:function(){return I(this,"default",this.getValueProxy(),!0)},getValueProxy:function(){var t=this;return{get value(){return t.isActive},set value(e){t.isActive=e}}}}};var W=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i};var R=function(t){if(Array.isArray(t))return W(t)};var q=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)};var J=function(t,e){if(t){if("string"==typeof t)return W(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(t,e):void 0}};var X=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var Q=function(t){return R(t)||q(t)||J(t)||X()};function U(t,e){if(t){var n=function(t){var e=t.getBoundingClientRect();return{top:Math.round(e.top),left:Math.round(e.left),bottom:Math.round(e.bottom),right:Math.round(e.right),width:Math.round(e.width),height:Math.round(e.height)}}(t);if(!1!==e){var i=window.getComputedStyle(t);n.left=parseInt(i.marginLeft||0),n.top=parseInt(i.marginTop||0)}return n}}function Z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function G(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?Z(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var K={name:"VDMenu",mixins:[z,{name:"Detachable",mixins:[{name:"Bootable",data:function(){return{isBooted:!1}},computed:{hasContent:function(){return this.isBooted||this.isActive}},watch:{isActive:function(){this.isBooted=!0}},methods:{showLazyContent:function(t){return this.hasContent&&t?t():[this.$createElement()]}}}],props:{attach:{validator:B,default:!1},contentClass:{type:String,default:""}},data:function(){return{activatorNode:void 0,hasDetached:!1}},watch:{attach:function(){this.hasDetached=!1,this.initDetach()},hasContent:function(){this.$nextTick(this.initDetach)}},beforeMount:function(){var t=this;this.$nextTick((function(){t.activatorNode&&(Array.isArray(t.activatorNode)?t.activatorNode:[t.activatorNode]).forEach((function(e){if(e.elm&&t.$el.parentNode){var n=t.$el===t.$el.parentNode.firstChild?t.$el:t.$el.nextSibling;t.$el.parentNode.insertBefore(e.elm,n)}}))}))},mounted:function(){this.hasContent&&this.initDetach()},deactivated:function(){this.isActive=!1},beforeDestroy:function(){try{if(this.$refs.content&&this.$refs.content.parentNode&&this.$refs.content.parentNode.removeChild(this.$refs.content),this.activatorNode)(Array.isArray(this.activatorNode)?this.activatorNode:[this.activatorNode]).forEach((function(t){t.elm&&t.elm.parentNode&&t.elm.parentNode.removeChild(t.elm)}))}catch(t){console.error(t)}},methods:{initDetach:function(){var t;this._isDestroyed||!this.$refs.content||this.hasDetached||""===this.attach||!0===this.attach||((t=!1===this.attach?document.querySelector("#app")||document.querySelector("body"):"string"==typeof this.attach?document.querySelector(this.attach):this.attach)?(t.appendChild(this.$refs.content),this.hasDetached=!0):console.error("Unable to locate target '".concat(this.attach,"'"),this))}}},{name:"DynamicPosition",data:function(){return{activatorFixed:!1,dimensions:{activator:{top:0,left:0,bottom:0,right:0,width:0,height:0,offsetTop:0,scrollHeight:0,offsetLeft:0},content:{top:0,left:0,bottom:0,right:0,width:0,height:0,offsetTop:0,scrollHeight:0}},isContentActive:!1,pageWidth:0,pageYOffset:0}},computed:{isAttached:function(){return!1!==this.attach},computedLeft:function(){var t=this.dimensions,e=t.activator,n=t.content,i=(this.isAttached?e.offsetLeft:e.left)||0;return this.rtl?e.right-n.width:i},computedTop:function(){var t=this.dimensions.activator,e=t.height;return((this.isAttached?t.offsetTop:t.top+this.pageYOffset)||0)+e},hasActivator:function(){return Boolean(this.$slots.activator)||Boolean(this.$scopedSlots.activator)||Boolean(this.activator)}},watch:{disabled:function(t){t&&this.callDeactivate()},isActive:function(t){this.disabled||(t?this.callActivate():this.callDeactivate())}},methods:{activate:function(){},deactivate:function(){},callActivate:function(){this.activate()},callDeactivate:function(){this.isContentActive=!1,this.deactivate()},calcLeft:function(t){return F(this.isAttached?this.computedLeft:this.calcXOverflow(this.computedLeft,t))},calcTop:function(){return F(this.isAttached?this.computedTop:this.calcYOverflow(this.computedTop))},calcXOverflow:function(t,e){var n=t+e-this.pageWidth+12;return(t=(!this.left||this.right)&&n>0?Math.max(t-n,0):Math.max(t,12))+(window.pageXOffset||document.documentElement.scrollLeft)},calcYOverflow:function(t){var e=this.pageYOffset+(window.innerHeight||document.documentElement.clientHeight),n=this.dimensions,i=n.activator,r=(n.content||{}).height,a=e<t+r;return a&&i.top>r?t=this.pageYOffset+(i.top-r):a&&!this.allowOverflow?t=e-r-12:t<this.pageYOffset&&!this.allowOverflow&&(t=this.pageYOffset+12),t<12?12:t},detectOrigin:function(t,e){var n=parseInt(t.split("px")[0]),i=parseInt(e.split("px")[0]),r=this.dimensions.activator,a=[];return a.push(r.top<i-this.pageYOffset?"top":"bottom"),a.push(r.left===n?"left":"right"),this.origin||a.join(" ")},checkForPageYOffset:function(){this.pageYOffset=this.activatorFixed?0:window.pageYOffset||document.documentElement.scrollTop},checkActivatorFixed:function(){if(!this.isAttached){var t=this.getActivator();this.activatorFixed=function(t){for(var e=["fixed","sticky"],n=t;n;){if(e.includes(window.getComputedStyle(n).position))return!0;n=n.offsetParent}return!1}(t)}},sneakPeek:function(t){var e=this;requestAnimationFrame((function(){var n=e.$refs.content;n&&"none"===n.style.display?(n.style.display="inline-block",t(),n.style.display="none"):t()}))},startTransition:function(){var t=this;return new Promise((function(e){return requestAnimationFrame((function(){t.isContentActive=t.isActive,e()}))}))},updateDimensions:function(){var t=this;this.checkActivatorFixed(),this.checkForPageYOffset(),this.pageWidth=window.innerWidth||document.documentElement.clientWidth;var e={},n=this.getActivator();n&&(e.activator=U(n,this.attach),e.activator.offsetLeft=n.offsetLeft,this.isAttached?e.activator.offsetTop=n.offsetTop:e.activator.offsetTop=0,this.sneakPeek((function(){e.content=U(t.$refs.content,t.attach),t.dimensions=e})))}}},{data:function(){return{stackMinZIndex:1e3}},computed:{activeZIndex:function(){var t=this.$refs.content,e=this.isActive?this.getMaxZIndex()+2:V(t);return parseInt(e)}},methods:{getMaxZIndex:function(){var t=this.$el,e=Q(document.getElementsByClassName("menu__content--active")),n=[this.stackMinZIndex,V(t)].concat(Q(e.map((function(t){return V(t)}))));return Math.max.apply(Math,Q(n))}}}],directives:{Resize:{inserted:function(t,e){var n=e.value,i=e.options||{passive:!0},r=!1,a=function(){r||(r=!0,window.requestAnimationFrame(n),r=!1)};window.addEventListener("resize",a,i),Object.assign(t,{onResize:{resizeCallback:a,options:i,running:r}}),e.modifiers&&e.modifiers.quiet||a()},unbind:function(t){if(t.onResize){var e=t.onResize,n=e.resizeCallback,i=e.options;window.removeEventListener("resize",n,i),delete t.onResize}}}},props:{transition:{type:String,default:"menu-transition"},origin:{type:String,default:void 0},allowOverflow:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},minWidth:{type:[Number,String],default:void 0},maxWidth:{type:[Number,String],default:void 0},maxHeight:{type:[Number,String],default:"auto"},zIndex:{type:Number,default:void 0},bottomSheet:{type:Boolean,default:!1}},data:function(){return{resizeTimeout:0,defaultOffset:8}},computed:{styles:function(){return{maxHeight:this.calculedMenuMaxHeight,minWidth:this.calculedMenuWidth,maxWidth:this.calculedMaxWidth,top:this.calculedTop,left:this.calculedLeft,transformOrigin:this.detectedOrigin,zIndex:this.zIndex||this.activeZIndex}},calculedMenuMaxHeight:function(){return F(this.maxHeight)},calculedMaxWidth:function(){return F(this.maxWidth)},calculedMenuWidth:function(){if(this.minWidth)return F(this.minWidth);var t=Math.min(this.dimensions.activator.width,Math.max(this.pageWidth-24,0)),e=(parseInt(this.calculedMaxWidth)===1*this.calculedMaxWidth?this.calculedMaxWidth:parseInt((this.calculedMaxWidth||"").split("px")[0]))||t;return F(Math.min(e,t))},calculedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculedMenuWidth));return this.calcLeft(t)||"0"},calculedTop:function(){return this.calcTop()||"0"},detectedOrigin:function(){return this.detectOrigin(this.calculedLeft,this.calculedTop)}},mounted:function(){this.isActive&&this.callActivate()},methods:{activate:function(){var t=this;this.updateDimensions(),requestAnimationFrame((function(){t.startTransition().then((function(){t.$emit("transitionEnd")}))}))},callDeactivate:function(){this.isContentActive=!1},onResize:function(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.updateDimensions,100))},genTransition:function(){return this.$createElement("transition",{props:{name:this.transition}},[this.genContent()])},genContent:function(){var t={attrs:{role:this.$attrs.role||"menu"},staticClass:"vd-menu__content",class:G(G({},this.contentClass&&a({},this.contentClass,!0)),{},{"vd-menu__content--active":this.isActive,"vd-menu__content--fixed":this.activatorFixed,"vd-menu__content--bottomsheet":this.bottomSheet}),style:this.styles,directives:[{name:"show",value:this.isContentActive}],ref:"content",on:{click:function(t){return t.stopPropagation()}}};return this.$createElement("div",t,[this.hasContent&&this.getContentSlot()])}},render:function(t){var e=this;return t("div",{staticClass:"vd-menu",class:{"menu--attached":this.isAttached},directives:[{arg:"500",name:"resize",value:this.onResize}]},[!this.activator&&this.genActivator(),this.showLazyContent((function(){return[e.genTransition()]}))])}};function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function et(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?tt(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):tt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function nt(t){return Boolean(t)&&Boolean(t.match(/^(#|(rgb|hsl)a?\()/))}var it={props:{color:{type:String}},methods:{setBackgroundColor:function(t,e){return nt(t)?e?et(et({},e),{},{style:et(et({},e.style),{},{"background-color":"".concat(t),"border-color":"".concat(t)})}):{"background-color":"".concat(t),"border-color":"".concat(t)}:e},setTextColor:function(t,e){return nt(t)?e?et(et({},e),{},{style:et(et({},e.style),{},{color:"".concat(t)})}):{color:"".concat(t)}:e}}},rt={close:{path:"M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z",viewBox:"0 0 320 512"},calendarAlt:{path:"M400 64h-48V12c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v52H128V12c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM48 96h352c8.8 0 16 7.2 16 16v48H32v-48c0-8.8 7.2-16 16-16zm352 384H48c-8.8 0-16-7.2-16-16V192h384v272c0 8.8-7.2 16-16 16zM148 320h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm96 0h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm96 0h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-96 96h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-96 0h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm192 0h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12z",viewBox:"0 0 448 512"},chevronLeft:{path:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",viewBox:"0 0 24 24"},chevronRight:{path:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",viewBox:"0 0 24 24"}};function at(){for(var t=arguments,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=t[r];return i.extend({mixins:n})}function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function st(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?ot(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ot(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ct=at(it).extend({name:"VDIcon",inheritAttrs:!1,props:{size:{type:[Number,String]},disabled:{type:Boolean,default:!1}},computed:{hasClickListener:function(){return Boolean(this.$listeners.click)}},methods:{getIconName:function(){return this.$slots.default?this.$slots.default[0].text&&this.$slots.default[0].text.trim():""},getIcon:function(){var t=this.getIconName();return rt[t]||t},getDefaultData:function(){return{staticClass:"vd-icon",class:{"vd-icon--disabled":this.disabled,"vd-icon--link":this.hasClickListener},attrs:st({"aria-hidden":!this.hasClickListener,disabled:this.hasClickListener&&this.disabled,type:this.hasClickListener?"button":void 0},this.$attrs),on:this.$listeners}},renderSvgIcon:function(t,e){var n=this.hasClickListener?"button":"span",i=F(this.size),r=st(st({},this.getDefaultData()),{},{style:st({},i&&{fontSize:i,height:i,width:i})}),a={attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:t.viewBox,height:this.size||16,width:this.size||16,role:"img","aria-hidden":!0,"data-icon":this.getIconName()}};return e(n,this.setTextColor(this.color,r),[e("svg",a,[e("path",{attrs:{fill:"currentColor",d:t.path}})])])}},render:function(t){var e=this.getIcon();return this.renderSvgIcon(e,t)}}),lt=at(it).extend({name:"VDPickerCustomInput",inject:["VDPicker"],props:{clearable:{type:Boolean},closeOnClickOutside:{type:Boolean,default:!0},color:{type:String},date:{type:[Object,Date,String]},disabled:{type:Boolean,default:!1},id:{type:String},isDateDefined:{type:Boolean,default:!1},isMenuActive:{type:Boolean,default:!1},name:{type:String},noCalendarIcon:{type:Boolean,default:!1},placeholder:{type:String},tabindex:{type:[String,Number]}},computed:{classes:function(){return{"vd-picker__input--disabled":this.disabled,"vd-picker__input--is-active":this.isMenuActive,"vd-picker__input--no-date":!this.isDateDefined}},computedColor:function(){return this.disabled?"":this.isMenuActive?this.color:""},isDirty:function(){return this.isDateDefined}},methods:{onKeyDown:function(t){this.$emit("keydown",t)},clearableCallback:function(){this.$emit("clearDate")},genCalendarIcon:function(){var t=[];this.VDPicker.$slots["input-icon"]?t.push(this.VDPicker.$slots["input-icon"]):t.push(this.$createElement(ct,{props:{disabled:this.disabled}},["calendarAlt"]));var e=this.$createElement("div",{staticClass:"vd-picker__input-icon__wrapper"},t);return this.$createElement("div",{staticClass:"vd-picker__input-icon"},[e])},genInput:function(){return this.$createElement("input",{attrs:{id:this.id,name:this.name,disabled:this.disabled,"aria-disabled":this.disabled,placeholder:this.placeholder,tabindex:this.tabindex,role:"text",type:"text",readonly:!0,"aria-readonly":!0},domProps:{value:this.date},on:{keydown:this.onKeyDown},ref:"input"})},genClearIcon:function(){var t=this,e=this.isDirty?"close":"",n={attrs:{"aria-label":"clearable icon",color:this.color,disabled:this.disabled},on:{click:function(e){e.preventDefault(),e.stopPropagation(),t.clearableCallback()},mouseup:function(t){t.preventDefault(),t.stopPropagation()}}},i=this.$createElement("div",{staticClass:"vd-picker__input-clear__icon"},[this.$createElement(ct,n,e)]);return this.$createElement("div",{staticClass:"vd-picker__input-clear"},[i])}},render:function(t){return t("div",this.setTextColor(this.computedColor,{staticClass:"vd-picker__input",class:this.classes}),[!this.noCalendarIcon&&this.genCalendarIcon(),this.genInput(),this.clearable&&this.genClearIcon()])}}),ut=at(it,A).extend({name:"VDOverlay",props:{absolute:{type:Boolean,default:!1},color:{type:String,default:"rgba(93, 106, 137)"},opacity:{type:[Number,String],default:.84},value:{default:!0},zIndex:{type:[Number,String],default:void 0}},computed:{classes:function(){return{"vd-overlay--absolute":this.absolute,"vd-overlay--active":this.isActive}},styles:function(){return{zIndex:this.zIndex}},computedOpacity:function(){return Number(this.isActive?this.opacity:0)},overlayInner:function(){var t=this.setBackgroundColor(this.color,{staticClass:"vd-overlay__inner",style:{opacity:this.computedOpacity}});return this.$createElement("div",t)}},methods:{genContent:function(){return this.$createElement("div",{staticClass:"vd-overlay__content"},this.$slots.default)}},render:function(t){var e=[this.overlayInner];return this.isActive&&e.push(this.genContent()),t("div",{staticClass:"vd-overlay",class:this.classes,style:this.styles},e)}}),ht=i.extend(ut),dt=i.extend({name:"Overlayable",props:{overlayColor:{type:String,default:void 0},overlayOpacity:{type:[Number,String],default:void 0}},data:function(){return{overlay:void 0}},beforeDestroy:function(){this.removeOverlay()},methods:{scrollListener:function(t){if("keydown"===t.type){if(["INPUT","TEXTAREA","SELECT"].includes(t.target.tagName)||t.target.isContentEditable)return;var e=[M.up,M.pageup],n=[M.down,M.pagedown];if(e.includes(t.keyCode))t.deltaY=-1;else{if(!n.includes(t.keyCode))return;t.deltaY=1}}(t.target===this.overlay||"keydown"!==t.type&&t.target===document.body||this.checkPath(t))&&t.preventDefault()},hasScrollbar:function(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var e=window.getComputedStyle(t);return["auto","scroll"].includes(e.overflowY)&&t.scrollHeight>t.clientHeight},shouldScroll:function(t,e){return 0===t.scrollTop&&e<0||t.scrollTop+t.clientHeight===t.scrollHeight&&e>0},isInside:function(t,e){return t===e||null!==t&&t!==document.body&&this.isInside(t.parentNode,e)},checkPath:function(t){var e=t.path||this.composedPath(t),n=t.deltaY;if("keydown"===t.type&&e[0]===document.body){var i=this.$refs.dialog,r=window.getSelection()&&window.getSelection().anchorNode;return!(i&&this.hasScrollbar(i)&&this.isInside(r,i))||this.shouldScroll(i,n)}for(var a=0;a<e.length;a++){var o=e[a];if(o===document)return!0;if(o===document.documentElement)return!0;if(o===this.$refs.content)return!0;if(this.hasScrollbar(o))return this.shouldScroll(o,n)}return!0},composedPath:function(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;){if(e.push(n),"HTML"===n.tagName)return e.push(document),e.push(window),e;n=n.parentElement}return e},hideScroll:function(){window.addEventListener("wheel",this.scrollListener,{passive:!1}),window.addEventListener("keydown",this.scrollListener)},showScroll:function(){document.documentElement.classList.remove("overflow-y-hidden"),window.removeEventListener("wheel",this.scrollListener),window.removeEventListener("keydown",this.scrollListener)},createOverlay:function(){var t=new ht({propsData:{absolute:this.absolute,value:!1,color:this.overlayColor,opacity:this.overlayOpacity}});t.$mount();var e=document.querySelector("#app")||document.querySelector("body"),n=this.absolute?this.$el.parentNode:e;n&&n.insertBefore(t.$el,n.firstChild),this.overlay=t},genOverlay:function(){var t=this;return this.hideScroll(),this.overlay||this.createOverlay(),requestAnimationFrame((function(){t.overlay&&(void 0!==t.activeZIndex?t.overlay.zIndex=String(t.activeZIndex-1):t.$el&&(t.overlay.zIndex=V(t.$el)),t.overlay.value=!0)})),!0},removeOverlay:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.overlay&&(N(this.overlay.$el,"transitionend",(function(){t.overlay&&t.overlay.$el&&t.overlay.$el.parentNode&&!t.overlay.value&&(t.overlay.$el.parentNode.removeChild(t.overlay.$el),t.overlay.$destroy(),t.overlay=null)})),this.overlay.value=!1),e&&this.showScroll()}}});var pt=function(t){if(Array.isArray(t))return t};var ft=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}};var mt=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var vt=function(t,e){return pt(t)||ft(t,e)||J(t,e)||mt()},yt=$((function(t,e){t.exports=function(t,e,n){var i=e.prototype,r=i.format;n.en.ordinal=function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"},i.format=function(t){var e=this,n=this.$locale(),i=this.$utils(),a=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|gggg|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return i.s(e.week(),"w"===t?1:2,"0");case"k":case"kk":return i.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();default:return t}}));return r.bind(this)(a)}}})),gt=$((function(t,e){t.exports=function(t,e){e.prototype.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)}}})),bt=$((function(t,e){t.exports=function(t,e){e.prototype.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)}}})),Dt=$((function(t,e){t.exports=function(t,e,n){e.prototype.isToday=function(){var t=n();return this.format("YYYY-MM-DD")===t.format("YYYY-MM-DD")}}})),_t=$((function(t,e){var n,i;t.exports=(n="month",i="quarter",function(t,e){var r=e.prototype;r.quarter=function(t){return this.$utils().u(t)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(t-1))};var a=r.add;r.add=function(t,e){return t=Number(t),this.$utils().p(e)===i?this.add(3*t,n):a.bind(this)(t,e)};var o=r.startOf;r.startOf=function(t,e){var r=this.$utils(),a=!!r.u(e)||e;if(r.p(t)===i){var s=this.quarter()-1;return a?this.month(3*s).startOf(n).startOf("day"):this.month(3*s+2).endOf(n).endOf("day")}return o.bind(this)(t,e)}})})),kt=$((function(t,e){t.exports=function(t,e,n){var i=(new Date).getTimezoneOffset(),r=e.prototype;n.utc=function(t,n){return new e({date:t,utc:!0,format:n})},r.utc=function(){return n(this.toDate(),{locale:this.$L,utc:!0})},r.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var a=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var o=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else o.call(this)};var s=r.utcOffset;r.utcOffset=function(t){var e=this.$utils().u;if(e(t))return this.$u?0:e(this.$offset)?s.call(this):this.$offset;var n,r=Math.abs(t)<=16?60*t:t;return 0!==t?(n=this.local().add(r+i,"minute")).$offset=r:n=this.utc(),n};var c=r.format;r.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,e)},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+i;return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()}}})),Ot=$((function(t,e){t.exports=function(t,e){e.prototype.weekday=function(t){var e=this.$locale().weekStart||0,n=this.$W,i=(n<e?n+7:n)-e;return this.$utils().u(t)?i:this.subtract(i,"day").add(t,"day")}}})),wt=$((function(t,e){var n,i;t.exports=(n="week",i="year",function(t,e){var r=e.prototype;r.week=function(t){if(void 0===t&&(t=null),null!==t)return this.add(7*(t-this.week()),"day");var e=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var r=this.startOf(i).add(1,i).date(e),a=this.endOf(n);if(r.isBefore(a))return 1}var o=this.startOf(i).date(e).startOf(n).subtract(1,"millisecond"),s=this.diff(o,n,!0);return s<0?this.startOf("week").week():Math.ceil(s)},r.weeks=function(t){return void 0===t&&(t=null),this.week(t)}})}));function Mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"date";return v[t]}function Yt(t,e){var n=t.regexText,i=t.startDate,r=t.endDate,a=n.replace(w,"".concat(i).concat(e?"|":"")).replace(w,"".concat(r).concat(e?"|":""));return e?a.split("|"):a}function St(t){return 3*t}function xt(t,e){var n=e.range,i=e.locale,r=e.type;return n?{start:t&&null!=t.start?Et({date:t.start,locale:i}):void 0,end:t&&null!=t.end?Et({date:t.end,locale:i}):void 0}:null!=t?Et({date:t,locale:i,type:r}):void 0}function Ct(t){var e=t.date,n=t.min,i=t.max,r=t.type,a=void 0===r?"date":r,o=t.allowedFn,s=e.format(Mt(a));return(!o||o(s))&&(!n||Lt(s,n,a)||Pt(s,n,a))&&(!i||Lt(s,i,a)||jt(s,i,a))}function $t(t){var e=t.date,n=t.type,i=void 0===n?"date":n,r=t.locale;return Lt(Ht({date:e,locale:r,format:Mt(i)}),Ht({date:void 0,locale:r,format:Mt(i)}),"quarter"===i?"month":i)}function Lt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"date";return r(t,Mt(n)).isSame(r(e,Mt(n)),n)}function jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"day";if("year"===n)return Boolean(e)&&t<r(e,"YYYY-MM-DD").get(n);var i=r.isDayjs(t)?t:r(t).startOf("day");return Boolean(e)&&i.isBefore(r(e).startOf("day"),n)}function Pt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"day";if("year"===n)return Boolean(e)&&t>r(e,"YYYY-MM-DD").get(n);var i=r.isDayjs(t)?t:r(t).startOf("day");return Boolean(e)&&i.isAfter(r(e).startOf("day"),n)}function Tt(t,e,n){return Pt(t,e)&&jt(t,n)}function Et(t){var e=t.date,n=t.locale,i=void 0===n?{lang:o}:n,a=t.type;return"year"===(void 0===a?"date":a)?r(e).utc():r(e).locale(i.lang)}function Ht(t){var e=t.date,n=t.locale,i=t.format;return Et({date:e,locale:n}).format(i)}function At(t){var e=t.year,n=t.month;return Et({locale:t.locale}).year(e).month(n).startOf("month")}function Nt(t){var e=t.startDate,n=t.endDate,i=t.locale,r=t.interval,a=void 0===r?"day":r,o=Et({date:e,locale:i}),s=Et({date:n,locale:i}).diff(o,a);return Q(Array(s+1).keys()).map((function(t){return o.add(t,a)}))}function Bt(t){var e=t.headerFormat,n=t.locale,i=t.date,r=t.range,a=t.rangeHeaderText;if(r&&a){var o=It({dates:i,locale:n,format:e}).split(" ~ "),s=vt(o,2),c=Yt({regexText:a,startDate:s[0],endDate:s[1]},!0),l=vt(c,2),u=l[0],h=l[1];return[u.trim(),h.trim()]}return i?Ht({date:i,locale:n,format:e}):"--"}function Ft(t){var e=t.date,n=t.type,i=t.locale;if(e)return Ht({date:e,locale:i,format:Mt(n)})}function It(t){var e=t.dates,n=void 0===e?{}:e,i=t.locale,r=t.format,a=n.start,o=n.end;return a||o?!a&&o?"__ ~ ".concat(Et({date:o,locale:i}).startOf("day").format(r)):a&&!o?"".concat(Et({date:a,locale:i}).startOf("day").format(r)," ~ __"):"".concat(Et({date:a,locale:i}).startOf("day").format(r)," ~ ").concat(Et({date:o,locale:i}).startOf("day").format(r)):"__ ~ __"}r.extend(yt),r.extend(gt),r.extend(bt),r.extend(Dt),r.extend(_t),r.extend(kt),r.extend(Ot),r.extend(wt);var Vt=at(it).extend({name:"VDPickerControls",props:{pickerDate:{type:Object,required:!0},transitionName:{type:String},color:{type:String},mode:{type:String,default:"date"},min:{type:[String,Number,Date]},max:{type:[String,Number,Date]}},computed:{monthFormatted:function(){return this.pickerDate.getMonthFormatted()},yearFormatted:function(){return this.pickerDate.getYearFormatted()},isPreviousDateDisabled:function(){var t=["month","quarter"].includes(this.mode),e=parseInt(this.yearFormatted,10)-1;return jt(t?e:"".concat(this.yearFormatted,"-").concat(this.pickerDate.month),this.min,t?"year":"month")},isNextDateDisabled:function(){var t=["month","quarter"].includes(this.mode),e=parseInt(this.yearFormatted,10)+1;return Pt(t?e:"".concat(this.yearFormatted,"-").concat(this.pickerDate.month+2),this.max,t?"year":"month")}},methods:{onNavigationClick:function(t){this.$emit("on-navigation-click",t)},genPrevButton:function(){var t=this,e=this.$createElement(ct,"chevronLeft");return this.$createElement("button",{staticClass:"vd-picker__controls-prev",attrs:{disabled:this.isPreviousDateDisabled,type:"button"},on:{click:function(){return t.onNavigationClick("prev")}}},[e])},genNextButton:function(){var t=this,e=this.$createElement(ct,"chevronRight");return this.$createElement("button",{staticClass:"vd-picker__controls-next",attrs:{disabled:this.isNextDateDisabled,type:"button"},on:{click:function(){return t.onNavigationClick("next")}}},[e])},genSelectors:function(){return this.$createElement("div",{staticClass:"vd-picker__controls-wrapper"},["date"===this.mode&&this.genMonthSelector(),this.genYearSelector()])},genChildrenSelectors:function(t){var e=this,n=t.value,i=t.key,r=t.type;return this.$createElement("div",this.setTextColor(this.color,{key:i,staticClass:"vd-picker__controls-label"}),[this.$createElement("button",{attrs:{type:"button"},on:{click:function(){return e.$emit("update-mode",r)}}},[n])])},genMonthSelector:function(){var t=this;return this.$createElement("transition-group",{staticClass:"vd-picker__controls-month",props:{name:this.transitionName,tag:"span"}},[this.pickerDate.month].map((function(e){return t.genChildrenSelectors({value:t.monthFormatted,key:e,type:"month"})})))},genYearSelector:function(){var t=this;return this.$createElement("transition-group",{staticClass:"vd-picker__controls-year",class:{"vd-picker__controls-year--center":["month","quarter"].includes(this.mode)},props:{name:this.transitionName,tag:"span"}},[this.pickerDate.year].map((function(e){return t.genChildrenSelectors({value:t.yearFormatted,key:e,type:"year"})})))}},render:function(t){return t("div",{staticClass:"vd-picker__controls"},[this.genPrevButton(),this.genSelectors(),this.genNextButton()])}});function zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Wt(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?zt(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):zt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Rt=at(it).extend({name:"VDPickerHeader",props:{formattedHeaderYear:{type:String},formattedHeaderDate:{type:[Array,String]},color:{type:String},mode:{type:String},mutableDate:{type:[String,Object]},range:{type:Boolean},transitionName:{type:String},type:{tpye:Boolean}},computed:{classes:function(){return a({"vd-picker-header--range":this.range},"vd-picker-header--".concat(this.type),this.type)},year:function(){return this.mutableDate?this.formattedHeaderYear:"-"},dateFormatted:function(){return this.formattedHeaderDate},isDateVisible:function(){return!this.range&&"year"!==this.type}},methods:{genYear:function(){var t=this,e=this.$createElement("span",{staticClass:"vd-picker-header__year-button",on:{click:function(){return t.$emit("update-mode","year")}}},[this.year]),n={staticClass:"vd-picker-header__year",class:{"vd-picker-header__year--active":"year"===this.mode}};return this.$createElement("div",n,[e])},genDate:function(){var t=this,e=this.genTransitionGroup({date:this.dateFormatted,isActive:"year"!==this.mode,onClick:function(){return t.$emit("update-mode","date")}});return this.$createElement("div",{staticClass:"vd-picker-header__wrap"},[e])},genRangeDate:function(){var t=this.genTransitionGroup({date:this.dateFormatted[0],isActive:Boolean(this.mutableDate.start)}),e=this.genTransitionGroup({date:this.dateFormatted[1],isActive:Boolean(this.mutableDate.end)});return this.$createElement("div",{staticClass:"vd-picker-header__wrap"},[t,e])},genTransitionGroup:function(t){var e=this,n=t.date,i=t.isActive,r=t.onClick;return this.$createElement("transition-group",{staticClass:"vd-picker-header__date",class:{"vd-picker-header__date--active":i},props:{name:this.transitionName,tag:"div"}},[n].map((function(t){return function(t){return e.$createElement("span",{staticClass:"vd-picker-header__wrap-button",key:t,on:Wt({},r&&{click:r})},[t])}(t)})))}},render:function(t){return t("div",this.setBackgroundColor(this.color,{staticClass:"vd-picker-header",class:this.classes}),[!this.range&&this.genYear(),this.isDateVisible&&this.genDate(),this.range&&this.genRangeDate()])}});function qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Jt(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?qt(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):qt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Xt=at(it,x).extend({name:"VDPickerPresets",props:{rangePresets:{type:Array},mutableDate:{type:Object},minDate:{type:[String,Number,Date]},maxDate:{type:[String,Number,Date]},color:{type:String}},computed:{presetsFormatted:function(){var t=this;if(this.rangePresets)return this.rangePresets.map((function(e){return Jt(Jt({},e),{},{availableDates:(n={dates:e.dates,minDate:t.minDate,maxDate:t.maxDate,locale:t.currentLocale},i=n.dates,a=void 0===i?{}:i,o=n.minDate,s=n.maxDate,c=n.locale,l=a.start,u=a.end,h=o||Et({locale:c}).year(g),d=s||Et({locale:c}).year(b),Nt({startDate:l,endDate:u,locale:c}).filter((function(t){return t.isSameOrAfter(h,"day")&&t.isSameOrBefore(r(d,"day"))})))});var n,i,a,o,s,c,l,u,h,d})).splice(0,6)}},methods:{isPresetSelected:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.availableDates,n=void 0===e?[]:e;return!(0===n.length||!this.mutableDate)&&(Lt(n[0],this.mutableDate.start)&&Lt(n[n.length-1],this.mutableDate.end))},isPresetValid:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.availableDates,n=void 0===e?[]:e;return!!this.mutableDate&&n.length>0},setPresetDates:function(t){var e=t.availableDates;this.isPresetSelected({availableDates:e})||this.$emit("update-range",{start:e[0],end:e[e.length-1]})},genWrapper:function(){return this.$createElement("div",{staticClass:"vd-picker-presets__wrapper"},this.presetsFormatted.map(this.genButton))},genButton:function(t,e){var n=this,i=this.$createElement("div",this.setBackgroundColor(this.color,{staticClass:"vd-picker-preset__effect"})),r=this.$createElement("div",{staticClass:"vd-picker-preset__name",domProps:{innerHTML:t.name}});return this.$createElement("button",{key:e,staticClass:"vd-picker-preset",class:{"vd-picker-preset--selected":this.isPresetSelected(t),"vd-picker-preset--disabled":!this.isPresetValid(t)},attrs:{type:"button"},on:{click:function(){return n.setPresetDates(t)}}},[i,r])}},render:function(t){if(this.presetsFormatted)return t("div",{staticClass:"vd-picker-presets"},[this.genWrapper()])}});function Qt(t,e){var n=t.changedTouches[0];e.touchendX=n.clientX,e.touchendY=n.clientY,e.end&&e.end(Object.assign(t,e)),function(t){var e=t.touchstartX,n=t.touchendX,i=t.touchstartY,r=t.touchendY;t.offsetX=n-e,t.offsetY=r-i,Math.abs(t.offsetY)<.5*Math.abs(t.offsetX)&&(t.left&&n<e-16&&t.left(t),t.right&&n>e+16&&t.right(t)),Math.abs(t.offsetX)<.5*Math.abs(t.offsetY)&&(t.up&&r<i-16&&t.up(t),t.down&&r>i+16&&t.down(t))}(e)}function Ut(t){var e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:t.left,right:t.right,up:t.up,down:t.down,start:t.start,move:t.move,end:t.end};return{touchstart:function(t){return function(t,e){var n=t.changedTouches[0];e.touchstartX=n.clientX,e.touchstartY=n.clientY,e.start&&e.start(Object.assign(t,e))}(t,e)},touchend:function(t){return Qt(t,e)},touchmove:function(t){return function(t,e){var n=t.changedTouches[0];e.touchmoveX=n.clientX,e.touchmoveY=n.clientY,e.move&&e.move(Object.assign(t,e))}(t,e)}}}var Zt={inserted:function(t,e,n){var i=e.value,r=i.parent?t.parentElement:t,a=i.options||{passive:!0};if(r){var o=Ut(e.value);r._touchHandlers=Object(r._touchHandlers),r._touchHandlers[n.context._uid]=o,Object.keys(o).forEach((function(t){r.addEventListener(t,o[t],a)}))}},unbind:function(t,e,n){var i=e.value.parent?t.parentElement:t;if(i&&i._touchHandlers){var r=i._touchHandlers[n.context._uid];Object.keys(r).forEach((function(t){i.removeEventListener(t,r[t])})),delete i._touchHandlers[n.context._uid]}}};function Gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var Kt=at(it,x).extend({name:"VDPickerTableDay",inject:["VDPicker"],props:{allowedDates:{type:Function},color:{type:String},day:{type:Object,required:!0},maxDate:{type:[String,Number,Date]},minDate:{type:[String,Number,Date]},mutableDate:{type:[String,Object]},range:{type:Boolean},rangeCurrentHoveredDay:{type:String,default:void 0},highlightDate:{type:[Date,Object],default:void 0}},computed:{classes:function(){return{"vd-picker__table-day--selected":this.isSelected&&!this.isDisabled,"vd-picker__table-day--between":this.range&&this.isBetween||this.isHighlightBetween,"vd-picker__table-day--in-range":this.range&&this.isInRange,"vd-picker__table-day--first":this.range&&this.firstInRange||this.firstInHighlightRange&&!this.isDisabled,"vd-picker__table-day--last":this.range&&this.lastInRange&&Boolean(this.mutableDate.end)||this.lastInHighlightRange&&!this.isDisabled,"vd-picker__table-day--select-start":this.range&&!this.mutableDate.start,"vd-picker__table-day--select-end":this.range&&this.mutableDate.start&&!this.mutableDate.end,"vd-picker__table-day--disabled":this.isDisabled}},formattedDay:function(){return this.day.format("D")},isCurrent:function(){return $t({date:this.day,type:"date",locale:this.currentLocale})},isSelected:function(){return this.range?[].concat(Q(this.mutableDate.start?[this.mutableDate.start.startOf("day").unix()]:[]),Q(this.mutableDate.end?[this.mutableDate.end.startOf("day").unix()]:[])).includes(this.day.unix()):this.highlightDate?[].concat(Q(this.highlightDate.start?[this.highlightDate.start.startOf("day").unix()]:[]),Q(this.highlightDate.end?[this.highlightDate.end.startOf("day").unix()]:[])).includes(this.day.unix()):this.mutableDate&&this.mutableDate.startOf("day").unix()===this.day.unix()},isBetween:function(){return!(!this.mutableDate.start&&!this.mutableDate.end)&&Tt(this.day,this.mutableDate.start,this.mutableDate.end)},isInRange:function(){return!!this.rangeCurrentHoveredDay&&(jt(this.rangeCurrentHoveredDay,this.mutableDate.end)?Tt(this.day,this.rangeCurrentHoveredDay,this.mutableDate.end):Tt(this.day,this.mutableDate.start,this.rangeCurrentHoveredDay))},firstInRange:function(){return this.mutableDate.start&&this.mutableDate.start.startOf("day").unix()===this.day.unix()},lastInRange:function(){return this.mutableDate.end&&this.mutableDate.end.startOf("day").unix()===this.day.unix()},isHighlightBetween:function(){return!(!this.highlightDate||!this.highlightDate.start&&!this.highlightDate.end)&&Tt(this.day,this.highlightDate.start,this.highlightDate.end)},firstInHighlightRange:function(){return!!this.highlightDate&&(this.highlightDate.start&&this.highlightDate.start.startOf("day").unix()===this.day.unix())},lastInHighlightRange:function(){return!!this.highlightDate&&(this.highlightDate.end&&this.highlightDate.end.startOf("day").unix()===this.day.unix())},isDateAllowed:function(){return Ct({date:this.day,min:this.minDate,max:this.maxDate,allowedFn:this.allowedDates})},isDisabled:function(){return!this.isDateAllowed},scopedSlotDay:function(){return I(this.VDPicker,"day")}},methods:{onDayClick:function(t){this.$emit("select-day",t)},genWrapper:function(){return this.$createElement("div",{staticClass:"vd-picker__table-day__wrapper",attrs:{"data-date":this.day.format("YYYY-MM-DD")}},[this.isCurrent&&this.genDayCurrent(),this.genDayEffect(),this.genDayText()])},genDayCurrent:function(){return this.$createElement("span",{staticClass:"vd-picker__table-day__current"})},genDayEffect:function(){return this.$createElement("span",{staticClass:"vd-picker__table-day__effect"})},genDayText:function(){if(!this.scopedSlotDay)return this.$createElement("span",{staticClass:"vd-picker__table-day__text"},[this.formattedDay]);var t={formattedDay:this.formattedDay,isCurrent:this.isToday,isSelected:this.isSelected&&!this.isDisabled,isBetween:this.range&&this.isBetween,isInRange:this.range&&this.isInRange,isFirstRangeDay:this.range&&this.firstInRange,isLastRangeDay:this.range&&this.lastInRange&&Boolean(this.mutableDate.end),isFirstSelectedDay:this.range&&!this.mutableDate.start,isLastSelectedDay:this.range&&this.mutableDate.start&&!this.mutableDate.end,isDisabled:this.isDisabled},e=this.VDPicker.$scopedSlots.day(function(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?Gt(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Gt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({day:this.formattedDay},t));return this.$createElement("span",{staticClass:"vd-picker__table-day__text"},[e])}},render:function(t){var e=this,n={staticClass:"vd-picker__table-day",class:this.classes,attrs:{type:"button",disabled:this.isDisabled,"data-date":this.day.format("YYYY-MM-DD")},on:{click:function(){return e.onDayClick(e.day)}}};return t("button",this.setTextColor(this.color,n),[this.genWrapper()])}}),te=at(it).extend({name:"VDPickerTableDate",directives:{Touch:Zt},props:{allowedDates:{type:Function},color:{type:String},pickerDate:{type:[String,Object]},isRangeSelected:{type:Boolean},maxDate:{type:[String,Number,Date]},minDate:{type:[String,Number,Date]},mutableDate:{type:[String,Object]},highlightDate:{type:[Date,Object]},range:{type:Boolean},transitionName:{type:String}},data:function(){return{rangeCurrentHoveredDay:void 0}},computed:{weekDays:function(){return this.pickerDate.getWeekDays()},spaceBeforeFirstDay:function(){return Q(Array(this.pickerDate.getWeekStart()).keys())}},watch:{rangeCurrentHoveredDay:function(t){t&&this.$emit("update-hovered-day",t)}},methods:{onDayClick:function(t){this.rangeCurrentHoveredDay=void 0,this.$emit("select-date",t)},handleMouseMove:function(t){var e=t.target,n="string"==typeof e.className&&"vd-picker__table-days"===e.className.split(" ")[0];if(this.range&&!this.isRangeSelected&&!n){var i=e.dataset.date;if(!i)return this.handleMouseMove({target:e.parentNode});var r=i===this.rangeCurrentHoveredDay;i&&!r&&(this.rangeCurrentHoveredDay=e.dataset.date)}},genWeek:function(){var t=this;return this.$createElement("div",{staticClass:"vd-picker__table-week"},this.weekDays.map((function(e,n){return t.$createElement("div",{key:n,domProps:{innerHTML:e},staticClass:"vd-picker__table-weekday"})})))},genDaysWrapper:function(){return this.$createElement("transition-group",{staticClass:"vd-picker__table-days__wrapper",props:{name:this.transitionName,tag:"div"}},[this.pickerDate].map(this.genDays))},genDays:function(t){var e=this;return this.$createElement("div",{staticClass:"vd-picker__table-days",key:t.month,on:{mousemove:this.handleMouseMove}},[this.spaceBeforeFirstDay.map((function(t){return e.$createElement("div",{staticClass:"vd-picker__table-day",key:"space-".concat(t)})})),this.pickerDate.getDays().map(this.genDay)])},genDay:function(t,e){return this.$createElement(Kt,{key:e,props:{allowedDates:this.allowedDates,color:this.color,day:t,maxDate:this.maxDate,minDate:this.minDate,mutableDate:this.mutableDate,range:this.range,rangeCurrentHoveredDay:this.rangeCurrentHoveredDay,locale:this.currentLocale,highlightDate:this.highlightDate},on:{"select-day":this.onDayClick}})}},render:function(t){var e=this;return t("div",{staticClass:"vd-picker__table",directives:[{name:"touch",value:{left:function(){return e.$emit("update-month","next")},right:function(){return e.$emit("update-month","prev")}}}],on:{touchstart:function(t){return t.stopPropagation()}}},[this.genWeek(),this.genDaysWrapper()])}}),ee={name:"VDPickerValidate",mixins:[it],props:{buttonValidate:{type:String},buttonCancel:{type:String},color:{type:String},range:{type:Boolean},mutableDate:{type:Object}},computed:{isDisabledValidation:function(){return!!this.range&&("object"!==L(this.mutableDate)||!Object.values(this.mutableDate).every((function(t){return Boolean(t)})))}},methods:{genButtonCancel:function(){var t=this;return this.$createElement("button",{staticClass:"vd-picker-validate__button vd-picker-validate__button-cancel",attrs:{type:"button"},on:{click:function(){return t.$emit("cancel")}}},[this.genButtonEffect(),this.genButtonText(this.buttonCancel)])},genButtonValidate:function(){var t=this;return this.$createElement("button",this.setTextColor(this.color,{staticClass:"vd-picker-validate__button vd-picker-validate__button-validate",attrs:{type:"button",disabled:this.isDisabledValidation},on:{click:function(){return t.$emit("validate")}}}),[this.genButtonEffect(),this.genButtonText(this.buttonValidate)])},genButtonEffect:function(){return this.$createElement("div",this.setBackgroundColor(this.color,{staticClass:"vd-picker-validate__effect"}))},genButtonText:function(t){return this.$createElement("div",{staticClass:"vd-picker-validate__name",domProps:{innerHTML:t}})}},render:function(t){return t("div",{staticClass:"vd-picker-validate"},[this.genButtonCancel(),this.genButtonValidate()])}};function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ie(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?ne(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ne(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var re=at(it,x).extend({name:"VDPickerMonths",props:{active:{type:Boolean,default:!1},allowedDates:{type:Function},color:{type:String,default:String},pickerDate:{type:Object,default:Object},max:{type:[String,Number,Date]},min:{type:[String,Number,Date]},mutableDate:{type:Object,default:void 0},range:{type:Boolean,default:!1},transitionName:{type:String,default:String},type:{type:String},visibleYearsNumber:{type:Number,default:10}},computed:{yearFormatted:function(){return this.pickerDate.getYearFormatted()},getMonths:function(){return this.pickerDate.getMonths()}},methods:{isCurrent:function(t){return $t({date:At({year:this.pickerDate.year,month:t,locale:this.currentLocale}),type:"month",locale:this.currentLocale})},isSelected:function(t){if(this.range||!this.mutableDate)return!1;var e=At({year:this.pickerDate.year,month:t,locale:this.currentLocale});return Lt(this.mutableDate.format("YYYY-MM"),e.format("YYYY-MM"),"month")},isAllowed:function(t){return Ct({date:At({year:this.yearFormatted,month:t,locale:this.currentLocale}),min:this.min,max:this.max,type:"month",allowedFn:this.allowedDates})},genTransition:function(){return this.$createElement("transition-group",{staticClass:"vd-picker__months-inner",props:{tag:"div",name:this.transitionName}},[this.pickerDate.year].map(this.genMonthList))},genMonthList:function(t){return this.$createElement("div",{staticClass:"vd-picker__months-list",key:t},[this.getMonths.map(this.genMonthButton)])},genMonthButton:function(t,e){var n=this,i=this.isCurrent(e)&&!this.isSelected(e),r=this.isSelected(e),a=this.$createElement("button",{key:e,staticClass:"vd-picker__months-button",style:ie(ie({},i&&{"border-color":this.color}),r&&ie(ie({},this.setTextColor("#fff")),this.setBackgroundColor(this.color))),attrs:{type:"button",disabled:!this.isAllowed(e)},on:{click:function(){return n.$emit("input",e,"month")}}},[t]);return this.$createElement("div",{staticClass:"vd-picker__months-button__wrapper"},[a])}},render:function(t){return t("div",{staticClass:"vd-picker__months"},[this.genTransition()])}});function ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function oe(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?ae(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ae(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var se=at(it,x).extend({name:"VDPickerQuarters",props:{active:{type:Boolean,default:!1},allowedDates:{type:Function},color:{type:String,default:String},pickerDate:{type:Object,default:Object},max:{type:[String,Number,Date]},min:{type:[String,Number,Date]},mutableDate:{type:Object,default:void 0},transitionName:{type:String,default:String}},computed:{getQuarters:function(){return this.pickerDate.getQuarters()}},methods:{isCurrent:function(t){return $t({date:At({year:this.pickerDate.year,month:t,locale:this.currentLocale}),type:"quarter",locale:this.currentLocale})},isSelected:function(t){if(!this.mutableDate)return!1;var e=At({year:this.pickerDate.year,month:t,locale:this.currentLocale});return Lt(this.mutableDate.format("YYYY-MM"),e.format("YYYY-MM"),"month")},isAllowed:function(t){return Ct({date:At({year:this.pickerDate.year,month:t,locale:this.currentLocale}),min:this.min,max:this.max,type:"month",allowedFn:this.allowedDates})},genTransition:function(){return this.$createElement("transition-group",{staticClass:"vd-picker__quarters-inner",props:{tag:"div",name:this.transitionName}},[this.pickerDate.year].map(this.genQuarterList))},genQuarterList:function(t){return this.$createElement("div",{staticClass:"vd-picker__quarters-list",key:t},[this.getQuarters.map(this.genQuarterButton)])},genQuarterButton:function(t,e){var n=this,i=St(e),r=this.isCurrent(i)&&!this.isSelected(i),a=this.isSelected(i),o=this.$createElement("button",{key:e,staticClass:"vd-picker__quarters-button",style:oe(oe({},r&&{"border-color":this.color}),a&&oe(oe({},this.setTextColor("#fff")),this.setBackgroundColor(this.color))),attrs:{type:"button",disabled:!this.isAllowed(e)},on:{click:function(){return n.$emit("input",e,"quarter")}}},[t]);return this.$createElement("div",{staticClass:"vd-picker__quarters-button__wrapper"},[o])}},render:function(t){return t("div",{staticClass:"vd-picker__quarters"},[this.genTransition()])}});function ce(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function le(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?ce(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ue=at(it).extend({name:"VDPickerYears",props:{active:{type:Boolean,default:!1},allowedDates:{type:Function},color:{type:String,default:String},mutableDate:{type:Object,default:void 0},pickerDate:{type:Object,default:Object},max:{type:[String,Number,Date]},min:{type:[String,Number,Date]},visibleYearsNumber:{type:Number,default:10},range:{type:Boolean,default:!1}},computed:{yearFormatted:function(){return this.pickerDate.getYearFormatted()},activeYear:function(){if(!this.range)return this.mutableDate&&this.mutableDate.format("YYYY")},getYears:function(){return this.pickerDate.generateYearsRange({activeYear:this.activeYear,visibleYearsNumber:this.visibleYearsNumber,min:this.min,max:this.max})}},watch:{active:{handler:function(t){t&&!this.range&&setTimeout(this.computeScrollPosition)},immediate:!0}},methods:{isCurrent:function(t){return $t({date:At({year:t,month:0,locale:this.currentLocale}),type:"year",locale:this.currentLocale})},isSelected:function(t){return this.activeYear===String(t)},isAllowed:function(t){return Ct({date:At({year:t,month:0,locale:this.currentLocale}),min:this.min,max:this.max,type:"year",allowedFn:this.allowedDates})},computeScrollPosition:function(){var t=this.$el.getElementsByClassName("active")[0];this.$el.scrollTop=function(t){var e=t.activeItem,n=t.container,i=t.min,r=t.max;return e?e.offsetTop-n.offsetHeight/2+e.offsetHeight/2:i||r?0:n.scrollHeight/2-n.offsetHeight/2}({activeItem:t,container:this.$el,min:this.min,max:this.max})},genYearButton:function(t){var e=this,n=this.isCurrent(t)&&!this.isSelected(t),i=this.isSelected(t);return this.$createElement("li",{key:t,staticClass:"vd-picker__years-button",class:{active:this.isSelected(t)},style:le(le({},n&&{"border-color":this.color}),i&&le(le({},this.setTextColor("#fff")),this.setBackgroundColor(this.color))),attrs:{disabled:!this.isAllowed(t)},on:{click:function(){return e.$emit("input",t,"year")}}},[t])}},render:function(t){var e=this;return t("ul",{staticClass:"vd-picker__years"},this.getYears.map((function(t){return e.genYearButton(t)})))}});var he=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function de(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var pe=function(t,e,n){return e&&de(t.prototype,e),n&&de(t,n),t},fe=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{lang:o};he(this,t),r.locale(i.lang),this.locale=i,this.start=r().year(n).month(e).startOf("month"),this.end=this.start.endOf("month"),this.month=e,this.year=n}return pe(t,[{key:"getWeekStart",value:function(){return this.start.weekday()}},{key:"getDays",value:function(){return Array.from(Nt({startDate:this.start,endDate:this.end,locale:this.locale}))}},{key:"getWeekDays",value:function(){var t=this.locale,e=t.lang,n=t.weekDays,i=Q(e.weekdaysShort);return e.weekStart&&1===e.weekStart&&i.push(i.shift()),n||i}},{key:"getMonths",value:function(){return Array.apply(0,Array(12)).map((function(t,e){return r().month(e).format("MMM")}))}},{key:"getQuarters",value:function(){return Array.apply(0,Array(4)).map((function(t,e){var n=r().quarter(e+1).startOf("quarter").format("MMMM"),i=r().quarter(e+1).endOf("quarter").format("MMMM");return"".concat(n," - ").concat(i)}))}},{key:"getMonthFormatted",value:function(){return this.start.format("MMMM")}},{key:"getYearFormatted",value:function(){return this.start.format("YYYY")}},{key:"generateYearsRange",value:function(t){var e=t.activeYear,n=t.visibleYearsNumber,i=t.min,a=t.max,o=parseInt(e,10)||parseInt(r().format("YYYY"),10),s=a?parseInt(a,10):o+n,c=Math.min(s,i?parseInt(i,10):o-n);return Q(Array(s-c+1).keys()).map((function(t){return s-t}))}}]),t}();function me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ve(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?me(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ye=at(it,dt,x).extend({name:"VDPickerAgenda",props:{allowedDates:{type:Function},buttonCancel:{type:String},buttonValidate:{type:String},color:{type:String},date:{type:[Date,Object]},headerFormat:{type:String},fullscreen:{type:Boolean,default:!1},maxDate:{type:[String,Number,Date]},minDate:{type:[String,Number,Date]},name:{type:String},noHeader:{type:Boolean,default:!1},range:{type:Boolean,default:!1},rangeHeaderText:{type:String,default:String},rangePresets:{type:Array,default:void 0},rtl:{type:Boolean,default:!1},type:{type:String,default:"date"},validate:{type:Boolean,default:!1},value:{type:Boolean,default:!1},visibleYearsNumber:{type:Number},highlightDate:{type:[Date,Object]}},data:function(){return{height:"auto",pickerDate:void 0,mutableDate:void 0,mode:D,transitionDaysName:"slide-h-next",transitionLabelName:"slide-v-next"}},computed:{classes:function(){return{"vd-picker--rtl":this.rtl,"vd-picker--bottomsheet":this.fullscreen,"vd-picker--no-header":this.noHeader,"vd-picker--validate":this.validate,"vd-picker--range":this.range,"vd-picker--range-selecting":this.range&&!this.isRangeSelected}},isRangeSelected:function(){return!!this.range&&("object"===L(this.mutableDate)&&Object.values(this.mutableDate).every((function(t){return Boolean(t)})))},formatters:function(){return t={headerFormat:this.headerFormat,locale:this.locale,maxDate:this.maxDate,minDate:this.minDate,mutableDate:this.mutableDate,range:this.range,rangeHeaderText:this.rangeHeaderText},e=t.headerFormat,n=t.locale,i=t.maxDate,r=t.minDate,a=t.mutableDate,o=t.range,s=t.rangeHeaderText,{formattedHeaderYear:Ht({date:a,locale:n,format:"YYYY"}),formattedHeaderDate:Bt({date:a,headerFormat:e,locale:n,range:o,rangeHeaderText:s}),minDate:r,maxDate:i,minMonth:Ft({date:r,type:"month",locale:n}),maxMonth:Ft({date:i,type:"month",locale:n}),minYear:Ft({date:r,type:"year",locale:n}),maxYear:Ft({date:i,type:"year",locale:n})};var t,e,n,i,r,a,o,s}},created:function(){this.initAgenda()},beforeDestroy:function(){t()},watch:{value:"initAgenda",date:"initDatesForPicker",type:"updateMode",fullscreen:{handler:function(t){var i=this;this.$nextTick((function(){var r=i.$refs.body;t?(e(r),i.genOverlay()):(i.removeOverlay(!1),n(r))}))},immediate:!0},mode:function(t){var i=this;"year"===t&&this.fullscreen&&(n(this.$refs.body),this.$nextTick((function(){e(i.$el.querySelector(".vd-picker__years"))})))}},methods:{initAgenda:function(){this.initDatesForPicker(this.date),this.updateMode(this.type)},updateTransitions:function(t){this.transitionDaysName="slide-h-".concat(t),this.transitionLabelName="slide-v-".concat(t)},reOrderSelectedDate:function(t){this.mutableDate&&(jt(t,this.mutableDate.start)?this.mutableDate={start:void 0,end:this.mutableDate.start}:Pt(t,this.mutableDate.end)&&(this.mutableDate={start:this.mutableDate.end,end:void 0}))},selectDate:function(t){if(this.range)return this.isRangeSelected||!this.mutableDate.start&&!this.mutableDate.end?void(this.mutableDate={start:t.clone(),end:void 0}):(this.reOrderSelectedDate(t),void this.emitSelectedDate(ve(ve(ve({},this.mutableDate),this.mutableDate.start&&{end:t.clone()}),this.mutableDate.end&&{start:t.clone()})));var e,n,i=(e=t,n=this.mutableDate,r(e).isAfter(r(n))?"next":"prev");this.updateTransitions(i),this.emitSelectedDate(t.clone())},emitSelectedDate:function(t){this.range&&(this.pickerDate=new fe(t.end.month(),t.end.year(),this.currentLocale)),this.mutableDate=t,this.$emit("selectDate",this.mutableDate)},initDatesForPicker:function(t){var e=Et({date:this.range?t.end||t.start:t,locale:this.currentLocale});if(Pt(e,this.maxDate)&&(e=Et({date:this.maxDate,locale:this.currentLocale})),this.range)return this.pickerDate=new fe(e.month(),e.year(),this.currentLocale),void(this.mutableDate=t);null==t&&"quarter"===this.type&&(e=e.month(e.quarter())),null!=t&&"quarter"===this.type&&(e=e.month(St(e.month()))),this.pickerDate=new fe(e.month(),e.year(),this.currentLocale),this.mutableDate=t&&t.month(e.month()).clone()},changeMonth:function(t){var e=this.pickerDate.month+("prev"===t?-1:1),n=this.pickerDate.year;(e>11||e<0)&&(n+="prev"===t?-1:1,e="prev"===t?11:0),this.updateTransitions(t),this.pickerDate=new fe(e,n,this.currentLocale)},changeYear:function(t){var e=this.pickerDate.year+("prev"===t?-1:1),n=this.pickerDate.month;this.updateTransitions(t),this.pickerDate=new fe(n,e,this.currentLocale)},updateMode:function(t){this.mode=t},updateSelectedYearMonth:function(t,e){var n=function(t,e,n){return"year"===n?{year:t,month:e.month}:"quarter"===n?{year:e.year,month:St(t)}:{year:e.year,month:t}}(t,this.pickerDate,e),i=n.year,r=n.month;if(this.pickerDate=new fe(r,i,this.currentLocale),e===O&&"year"!==this.type){var a="quarter"===this.type?"quarter":"month";return this.updateMode(a)}if("date"===this.type)this.updateMode("date");else{var o=At({year:this.pickerDate.year,month:this.pickerDate.month,locale:this.currentLocale});this.selectDate(o)}},genTitle:function(){var t=this,e=this.$createElement("p",this.name),n=this.$createElement(ct,{on:{click:function(){return t.$emit("close")}}},["close"]);return this.$createElement("div",{staticClass:"vd-picker__title"},[e,this.$createElement("div",{staticClass:"vd-picker__title-close"},[n])])},genHeader:function(){return this.$createElement(Rt,{props:ve(ve({},this.formatters),{},{color:this.color,mode:this.yearMonthMode,mutableDate:this.mutableDate,range:this.range,transitionName:this.transitionLabelName,type:this.type}),on:{"update-mode":this.updateMode}})},genPresets:function(){return this.$createElement(Xt,{props:{rangePresets:this.rangePresets,mutableDate:this.mutableDate,minDate:this.minDate,maxDate:this.maxDate,color:this.color,locale:this.locale},on:{"update-range":this.emitSelectedDate}})},genBody:function(){var t=[this.mode!==O&&this.genControls(),this.mode===D&&this.genTableDate(),this.mode===_&&this.genMonths(),this.mode===k&&this.genQuarters(),this.mode===O&&this.genYears()];return this.$createElement("div",{staticClass:"vd-picker__body",ref:"body"},t)},genControls:function(){return this.$createElement(Vt,{props:{pickerDate:this.pickerDate,transitionName:this.transitionLabelName,color:this.color,min:this.minDate,max:this.maxDate,mode:this.mode},on:{"on-navigation-click":this.mode===D?this.changeMonth:this.changeYear,"update-mode":this.updateMode}})},genTableDate:function(){return this.$createElement(te,{props:{allowedDates:this.allowedDates,color:this.color,pickerDate:this.pickerDate,isRangeSelected:this.isRangeSelected,locale:this.currentLocale,maxDate:this.maxDate,minDate:this.minDate,mutableDate:this.mutableDate,highlightDate:this.highlightDate,range:this.range,transitionName:this.transitionDaysName},on:{"update-month":this.changeMonth,"update-hovered-day":this.reOrderSelectedDate,"select-date":this.selectDate}})},genMonths:function(){var t=this.formatters,e=t.minMonth,n=t.maxMonth;return this.$createElement(re,{props:{active:this.mode===_,allowedDates:this.type===_?this.allowedDates:void 0,color:this.color,locale:this.currentLocale,max:n,min:e,mutableDate:this.mutableDate,pickerDate:this.pickerDate,range:this.range,transitionName:this.transitionDaysName},on:{input:this.updateSelectedYearMonth}})},genQuarters:function(){var t=this.formatters,e=t.minMonth,n=t.maxMonth;return this.$createElement(se,{props:{active:this.mode===k,allowedDates:this.type===k?this.allowedDates:void 0,color:this.color,locale:this.currentLocale,max:n,min:e,mutableDate:this.mutableDate,pickerDate:this.pickerDate,transitionName:this.transitionDaysName},on:{input:this.updateSelectedYearMonth}})},genYears:function(){var t=this.formatters,e=t.minYear,n=t.maxYear;return this.$createElement(ue,{props:{active:this.mode===O,allowedDates:this.type===O?this.allowedDates:void 0,color:this.color,max:n,min:e,mutableDate:this.mutableDate,pickerDate:this.pickerDate,range:this.range,visibleYearsNumber:this.visibleYearsNumber},on:{input:this.updateSelectedYearMonth}})},genValidate:function(){var t=this;return this.$createElement(ee,{props:{buttonValidate:this.buttonValidate,buttonCancel:this.buttonCancel,color:this.color,mutableDate:this.mutableDate,range:this.range},on:{cancel:function(){return t.$emit("close")},validate:function(){return t.$emit("validateDate")}}})}},render:function(t){return t("div",{staticClass:"vd-picker",class:this.classes,ref:"datepicker"},[this.fullscreen&&this.genTitle(),!this.noHeader&&this.genHeader(),this.range&&this.genPresets(),this.genBody(),this.validate&&this.genValidate()])}});function ge(t){var e=t.message,n=t.vm;if(n){if(n.$_alreadyWarned=n.$_alreadyWarned||[],n.$_alreadyWarned.includes(e))return;n.$_alreadyWarned.push(e)}return"[VueDatePicker] ".concat(e)+(n?function(t){if(t._isVue&&t.$parent){for(var e=[],n=0;t;){if(e.length>0){var i=e[e.length-1];if(i.constructor===t.constructor){n++,t=t.$parent;continue}n>0&&(e[e.length-1]=[i,n],n=0)}e.push(t),t=t.$parent}return"\n\nfound in\n\n"+e.map((function(t,e){return"".concat(0===e?"---\x3e ":" ".repeat(5+2*e)).concat(Array.isArray(t)?"".concat(_e(t[0]),"... (").concat(t[1]," recursive calls)"):_e(t))})).join("\n")}return"\n\n(found in ".concat(_e(t),")")}(n):"")}function be(t,e){var n=ge({message:t,vm:e});null!=n&&console.warn(n)}var De=/(?:^|[-_])(\w)/g;function _e(t,e){if(t.$root===t)return"<Root>";var n="function"==typeof t&&null!=t.cid?t.options:t._isVue?t.$options||t.constructor.options:t||{},i=n.name||n._componentTag,r=n.__file;if(!i&&r){var a=r.match(/([^/\\]+)\.vue$/);i=a&&a[1]}return(i?"<".concat(i.replace(De,(function(t){return t.toUpperCase()})).replace(/[-_]/g,""),">"):"<Anonymous>")+(r&&!1!==e?" at ".concat(r):"")}function ke(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Oe(t){for(var e=arguments,n=1;n<arguments.length;n++){var i=null!=e[n]?e[n]:{};n%2?ke(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ke(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var we={minWidth:"290px",maxWidth:"315px"},Me=at(x,C).extend({name:"VDPicker",provide:function(){return{VDPicker:this}},directives:{ClickOutside:T},props:{id:{type:String,default:void 0},name:{type:String,default:"datepicker"},clearable:{type:Boolean,default:!1},validate:{type:Boolean,default:!1},buttonValidate:{type:String,default:void 0},buttonCancel:{type:String,default:void 0},type:{type:String,default:"date"},range:{type:Boolean,default:!1},rangeInputText:{type:String,default:"%d ~ %d"},rangeHeaderText:{type:String,default:void 0},rangePresets:{type:Array,default:void 0},value:{type:[String,Object,Number,Date]},format:{type:String,default:void 0},formatHeader:{type:String,default:void 0},visible:{type:Boolean,default:!1},placeholder:{type:String,default:"YYYY-MM-DD"},color:{type:String,default:"#4f88ff"},contentClass:{type:String,default:""},allowedDates:{type:Function},minDate:{type:[String,Number,Date]},maxDate:{type:[String,Number,Date]},visibleYearsNumber:{type:Number,default:10},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noCalendarIcon:{type:Boolean,default:!1},fullscreenMobile:{type:Boolean,default:!1},tabindex:{type:[String,Number],default:"0"},rtl:{type:Boolean,default:!1},highlightRange:{type:Object,default:void 0},origin:{type:String,default:void 0},allowOverflow:{type:Boolean,default:!0},attach:{validator:B,default:!1},zIndex:{type:Number,default:1002}},data:function(){return{date:void 0,highlightDate:void 0,isMenuActive:!1,isBooted:!1,activator:void 0}},computed:{classes:function(){return{"vd-wrapper--inline":this.inline,"vd-wrapper--disabled":this.disabled,"vd-wrapper--rtl":this.rtl}},componentId:function(){return this.id||"datepicker_".concat("_".concat(Math.random().toString(36).substr(2,9)))},inputFormat:function(){return this.format?this.format:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"date";return m[t]}(this.range?"range":this.type)},headerFormat:function(){return this.formatHeader?this.formatHeader:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"date";return y[t]}(this.range?"range":this.type)},outputFormat:function(){return Mt(this.range?"range":this.type)},textsFormat:function(){var t=this.currentLocale.lang,e=t.buttonValidate,n=t.buttonCancel,i=t.rangeHeaderText;return{buttonValidate:this.buttonValidate||e,buttonCancel:this.buttonCancel||n,rangeHeaderText:this.rangeHeaderText||i}},internalDate:{get:function(){return xt(this.value,{range:this.range,locale:this.currentLocale,type:this.type})},set:function(t){this.date=t}},internalHighlightDate:{get:function(){return xt(this.highlightRange,{range:!0,locale:this.currentLocale,type:this.type})},set:function(t){this.highlightDate=t}},isDateDefined:function(){var t=!this.range&&this.internalDate,e=this.range&&this.internalDate&&this.internalDate.start&&this.internalDate.end;return Boolean(t)||Boolean(e)},formattedInputDate:function(){return function(t){var e=t.inputFormat,n=t.internalDate,i=t.isDateDefined,r=t.locale,a=t.range,o=t.rangeInputText,s=t.type;if(i){if(a&&o){var c=It({dates:n,locale:r,format:e}).split(" ~ "),l=vt(c,2);return Yt({regexText:o,startDate:l[0],endDate:l[1]})}var u=n.month(),h="quarter"===s?St(u):u;return Ht({date:n.set("month",h),locale:r,format:e})}}({inputFormat:this.inputFormat,internalDate:this.internalDate,isDateDefined:this.isDateDefined,locale:this.currentLocale,range:this.range,rangeInputText:this.rangeInputText,type:this.type})},isFullScreenMode:function(){return this.fullscreenMobile&&this.isMobile}},watch:{visible:{handler:function(t){this.isMenuActive=t},immediate:!0},isFullScreenMode:function(){var t=this;this.isMenuActive&&(this.hideDatePicker(),setTimeout((function(){t.showDatePicker()}),200))}},created:function(){var t,e,n,i,r=this;["no-input"].forEach((function(t){var e,n,i;r.$attrs.hasOwnProperty(t)&&(n=(e={original:t,vm:r}).original,i=e.vm,be("[REMOVED] '".concat(n,"' has been removed. You can safely omit it."),i))})),this.$attrs.hasOwnProperty("fullscreen-breakpoint")&&(e=(t={original:"fullscreen-mobile",replacement:"mobile-breakpoint",vm:this}).original,n=t.replacement,i=t.vm,be("[UPGRADE] '".concat(e,"' is deprecated, use '").concat(n,"' instead."),i))},mounted:function(){this.activator=this.$refs.activator},beforeDestroy:function(){this.hideDatePicker(),this.$emit("onDestroy")},methods:{showDatePicker:function(){this.disabled||(this.isMenuActive=!0,this.$emit("onOpen"))},hideDatePicker:function(){this.isMenuActive&&(this.isMenuActive=!1,this.isBooted=!1,t(),this.$emit("onClose"))},changeDate:function(t){this.internalDate=t,this.validate||this.validateDate()},validateDate:function(){var t,e;this.date?(this.$emit("input",(t=this.date,e=this.outputFormat,this.range?{start:t.start.format(e),end:t.end&&t.end.format(e)}:t.format(e))),this.$emit("onChange"),this.hideDatePicker()):this.hideDatePicker()},onKeyDown:function(t){var e=t.keyCode;if(this.$refs.menu)return[M.esc,M.tab].includes(e)?this.hideDatePicker(t):void 0},onClearDate:function(){this.$emit("input",void 0),this.$emit("onChange")},genContent:function(){return this.inline?[this.genAgenda()]:[this.$scopedSlots.activator?this.genActivator():this.genCustomInput(),this.genMenuWithContent()]},genActivator:function(){return this.$createElement("div",{staticClass:"vd-activator",directives:[{name:"click-outside",value:{isActive:this.isMenuActive&&!this.isFullScreenMode,handler:this.hideDatePicker}}],on:{click:this.showDatePicker,keydown:this.onKeyDown},ref:"activator"},[this.$scopedSlots.activator({date:this.formattedInputDate})])},genCustomInput:function(){return this.$createElement(lt,{props:{clearable:this.clearable,color:this.color,date:this.formattedInputDate,disabled:this.disabled,id:this.componentId,isDateDefined:this.isDateDefined,isMenuActive:this.isMenuActive,name:this.name,noCalendarIcon:this.noCalendarIcon,placeholder:this.placeholder,tabindex:this.tabindex},directives:[{name:"click-outside",value:{isActive:this.isMenuActive&&!this.isFullScreenMode,handler:this.hideDatePicker}}],nativeOn:{click:this.showDatePicker},on:{keydown:this.onKeyDown,clearDate:this.onClearDate},ref:"activator"})},genMenuWithContent:function(){var t=this,e=this.isFullScreenMode,n=Oe(Oe({},we),{},{value:this.isMenuActive,origin:this.origin,allowOverflow:this.allowOverflow,attach:!e&&this.attach,transition:e?"slide-in-out-transition":"scale-transition",bottomSheet:e}),i=this.activator;return this.$createElement(K,{attrs:{role:"menu"},props:Oe(Oe({},n),{},{activator:i}),on:{transitionEnd:function(){t.isBooted=!0}},ref:"menu"},[this.genAgenda()])},genAgenda:function(){return this.$createElement(ye,{props:{allowedDates:this.allowedDates,buttonCancel:this.textsFormat.buttonCancel,buttonValidate:this.textsFormat.buttonValidate,color:this.color,date:this.internalDate,fullscreen:this.isBooted&&this.isMenuActive&&this.isFullScreenMode,headerFormat:this.headerFormat,locale:this.currentLocale,maxDate:this.maxDate,minDate:this.minDate,name:this.name,noHeader:this.noHeader,range:this.range,rangeHeaderText:this.textsFormat.rangeHeaderText,rangePresets:this.rangePresets,highlightDate:this.internalHighlightDate,rtl:this.rtl,type:this.type,validate:this.validate,value:this.isMenuActive,visibleYearsNumber:this.visibleYearsNumber},on:{selectDate:this.changeDate,validateDate:this.validateDate,close:this.hideDatePicker},directives:[{name:"click-outside",value:{isActive:this.isBooted&&this.isMenuActive,handler:this.hideDatePicker}}],ref:"agenda"})}},render:function(t){return t("div",{staticClass:"vd-wrapper",class:this.classes},this.genContent())}}),Ye=Object.freeze({__proto__:null,VueDatePicker:Me});var Se={installed:!1,version:"0.2.16",install:function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.installed){t.installed=!0,i!==e&&console.error("Multiple instances of Vue detected.");var r=n.components||{},a=n.options||{};e.prototype.$vuedatepicker=a,i.prototype.$vuedatepicker=a,Object.entries(r).forEach((function(t){var n=vt(t,2),i=n[0],r=n[1];e.component(i,r)}))}}},xe=Se.install;Se.install=function(t,e){xe.call(Se,t,{components:Ye,options:e})},"undefined"!=typeof window&&window.Vue&&window.Vue.use(Se);export default Se;export{Me as VueDatePicker};