flatpickr-ce 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- /* flatpickr v4.11.0,, @license MIT */
2
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=n()}(this,function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var n,t=1,a=arguments.length;t<a;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},e.apply(this,arguments)};function n(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var a=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],r=0,l=o.length;r<l;r++,i++)a[i]=o[r];return a}var t=["onChange","onClose","onDayCreate","onDaysBuilt","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],a={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var t=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDaysBuilt:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},i={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",secondAriaLabel:"Second",time_24hr:!1},o=function(e,n){return void 0===n&&(n=2),("000"+e).slice(-1*n)},r=function(e){return!0===e?1:0};function l(e,n){var t;return function(){var a=this,i=arguments;clearTimeout(t),t=setTimeout(function(){return e.apply(a,i)},n)}}var c=function(e){return e instanceof Array?e:[e]};function s(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function d(e,n,t){var a=window.document.createElement(e);return n=n||"",t=t||"",a.className=n,void 0!==t&&(a.textContent=t),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,n){return n(e)?e:e.parentNode?f(e.parentNode,n):void 0}function m(e,n){var t=d("div","numInputWrapper"),a=d("input","numInput "+e),i=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==n)for(var r in n)a.setAttribute(r,n[r]);return t.appendChild(a),t.appendChild(i),t.appendChild(o),t}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(n){return e.target}}var p=function(){},h=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},v=function(e,n){return e.map(function(e){return e.toUpperCase()}).indexOf(n.toUpperCase())},D=function(){return new Date(NaN)},C=function(e,n,t){return function(a,i){var o=parseFloat(i);if(o<e||o>n)return D();t(a,o)}},y=function(e,n){var t=parseFloat(n);if(e.setDate(t),e.getDate()!==t)return D()},b=C(1,12,function(e,n){e.setMonth(n-1,1)}),M=C(0,23,function(e,n){e.setHours(n)}),w=C(0,23,function(e,n){e.setHours((e.getHours()>=12?12:0)+n)}),E=C(0,59,function(e,n){e.setSeconds(n)}),x={D:p,F:function(e,n,t){e.setMonth(v(t.months.longhand,n),1)},G:w,H:M,J:y,K:function(e,n,t){e.setHours(e.getHours()%12+12*r(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(v(t.months.shorthand,n),1)},S:E,U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){var a=parseInt(n),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:y,h:w,i:C(0,59,function(e,n){e.setMinutes(n)}),j:y,l:p,m:b,n:b,s:E,u:function(e,n){return new Date(parseFloat(n))},w:p,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},T={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},k={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[k.w(e,n,t)]},F:function(e,n,t){return h(k.n(e,n,t)-1,!1,n)},G:function(e,n,t){return o(k.h(e,n,t))},H:function(e){return o(e.getHours())},J:function(e,n){return void 0!==n.ordinal?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[r(e.getHours()>11)]},M:function(e,n){return h(e.getMonth(),!0,n)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return o(e.getFullYear(),4)},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},I={Y:0,y:0,F:1,M:1,m:1,n:1},_=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o,l=e.isMobile,c=void 0!==l&&l;return function(e,n,a){var i=a||r;return t.formatDate&&!c?t.formatDate(e,n,i):n.split("").map(function(n,a,o){return k[n]&&"\\"!==o[a-1]?k[n](e,i,t):"\\"!==n?n:""}).join("")}},S=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o;return function(e,n,i,o){var l;if(0===e||e){var c,s=o||r,d=e;if(e instanceof Date)c=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)c=new Date(e);else if("string"==typeof e){var u=n||(t||a).dateFormat,f=String(e).trim();if("today"===f)c=new Date,i=!0;else if(t&&t.parseDate)c=t.parseDate(e,u);else if(/Z$/.test(f)||/GMT$/.test(f))c=new Date(e);else{for(var m=void 0,g=[[],[],[]],p=0,h=0,v="";p<u.length;p++){var D=u[p],C="\\"===D,y="\\"===u[p-1]||C;if(T[D]&&!y){v+=T[D];var b=new RegExp(v,"i").exec(e);b&&(m=!0)&&g[null!==(l=I[D])&&void 0!==l?l:2].push({fn:x[D],val:b[++h]})}else C||(v+=".")}c=t&&t.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),g.forEach(function(e){return e.forEach(function(e){var n=e.fn,t=e.val;return c=n(c,t,s)||c})}),c=m?c:void 0}}if(c instanceof Date&&!isNaN(c.getTime()))return!0===i&&c.setHours(0,0,0,0),c;t.errorHandler(new Error("Invalid date provided: "+d))}}};function O(e,n,t){return void 0===t&&(t=!0),!1!==t?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}var N=function(e,n,t){return 3600*e+60*n+t},F=864e5;function Y(e,n){var t=e.defaultHour,a=e.defaultMinute,i=e.defaultSeconds,o=function(e){return void 0!==e&&0===O(n,e)&&(e.getHours()>0||e.getMinutes()>0||e.getSeconds()>0)};if(o(e.minDate)){var r=e.minDate.getHours(),l=e.minDate.getMinutes(),c=e.minDate.getSeconds();t<r&&(t=r),t===r&&a<l&&(a=l),t===r&&a===l&&i<c&&(i=e.minDate.getSeconds())}if(o(e.maxDate)){var s=e.maxDate.getHours(),d=e.maxDate.getMinutes();(t=Math.min(t,s))===s&&(a=Math.min(d,a)),t===s&&a===d&&(i=Math.min(i,e.maxDate.getSeconds()))}return{hours:t,minutes:a,seconds:i}}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(n){n&&Object.keys(n).forEach(function(t){return e[t]=n[t]})},i=0,o=n;i<o.length;i++){a(o[i])}return e});var P=0;function A(n,t){return e(e(e({},n),t),{weekdays:e(e({},n.weekdays),null==t?void 0:t.weekdays),months:e(e({},n.months),null==t?void 0:t.months)})}function j(i,p){var v={config:e(e({},a),L.defaultConfig)},D={},C="flatpickr-"+ ++P,y=i.ownerDocument.defaultView||window,b=y.document,M=[];function w(){var e;return(null===(e=v.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||b.activeElement}function E(e){return e.bind(v)}function x(){var e=v.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&y.requestAnimationFrame(function(){if(void 0!==v.calendarContainer&&(v.calendarContainer.style.visibility="hidden",v.calendarContainer.style.display="block"),void 0!==v.daysContainer){var n=(v.days.offsetWidth+1)*e.showMonths;v.daysContainer.style.width=n+"px",v.calendarContainer.style.width=n+(void 0!==v.weekWrapper?v.weekWrapper.offsetWidth:0)+"px",v.calendarContainer.style.removeProperty("visibility"),v.calendarContainer.style.removeProperty("display")}})}function k(){return new Date(q(new Date).getTime())}function I(e){if(0===v.selectedDates.length){var n=k(),t=Y(v.config,n);n.setHours(t.hours,t.minutes,t.seconds,n.getMilliseconds()),v.selectedDates=[n],v.latestSelectedDateObj=n}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var n="keydown"===e.type,t=g(e),a=t;void 0!==v.amPM&&t===v.amPM&&(v.amPM.textContent=v.l10n.amPM[r(v.amPM.textContent===v.l10n.amPM[0])]);var i=parseFloat(a.getAttribute("min")),l=parseFloat(a.getAttribute("max")),c=Q(a),s=parseInt(a.value,10),d=e.delta||(n?38===e.which?1:-1:0),u=s+c*d;if(void 0!==a.value&&2===a.value.length){var f=a===v.hourElement,m=a===v.minuteElement;u<i?(u=l+u+r(!f)+(r(f)&&r(!v.amPM)),m&&Z(void 0,-1,v.hourElement)):u>l&&(u=a===v.hourElement?u-l-r(!v.amPM):i,m&&Z(void 0,1,v.hourElement)),v.amPM&&f&&(1===c?u+s===23:Math.abs(u-s)>c)&&(v.amPM.textContent=v.l10n.amPM[r(v.amPM.textContent===v.l10n.amPM[0])]),a.value=o(u)}}(e);var a=v._input.value;j(),Qe(),v._input.value!==a&&v._debouncedChange()}function j(){if(void 0!==v.hourElement&&void 0!==v.minuteElement){var e,n,t=(parseInt(v.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(v.minuteElement.value,10)||0)%60,i=void 0!==v.secondElement?(parseInt(v.secondElement.value,10)||0)%60:0;void 0!==v.amPM&&(e=t,n=v.amPM.textContent,t=e%12+12*r(n===v.l10n.amPM[1]));var o=void 0!==v.config.minTime||v.config.minDate&&v.minDateHasTime&&v.latestSelectedDateObj&&0===O(v.latestSelectedDateObj,v.config.minDate,!0),l=void 0!==v.config.maxTime||v.config.maxDate&&v.maxDateHasTime&&v.latestSelectedDateObj&&0===O(v.latestSelectedDateObj,v.config.maxDate,!0);if(void 0!==v.config.maxTime&&void 0!==v.config.minTime&&v.config.minTime>v.config.maxTime){var c=N(v.config.minTime.getHours(),v.config.minTime.getMinutes(),v.config.minTime.getSeconds()),s=N(v.config.maxTime.getHours(),v.config.maxTime.getMinutes(),v.config.maxTime.getSeconds()),d=N(t,a,i);if(d>s&&d<c){var u=function(e){var n=Math.floor(e/3600),t=(e-3600*n)/60;return[n,t,e-3600*n-60*t]}(c);t=u[0],a=u[1],i=u[2]}}else{if(l){var f=void 0!==v.config.maxTime?v.config.maxTime:v.config.maxDate;(t=Math.min(t,f.getHours()))===f.getHours()&&(a=Math.min(a,f.getMinutes()))===f.getMinutes()&&(i=Math.min(i,f.getSeconds()))}if(o){var m=void 0!==v.config.minTime?v.config.minTime:v.config.minDate;(t=Math.max(t,m.getHours()))===m.getHours()&&(a=Math.max(a,m.getMinutes()))===m.getMinutes()&&(i=Math.max(i,m.getSeconds()))}}W(t,a,i)}}function H(e){var n=e||v.latestSelectedDateObj;n&&W(n.getHours(),n.getMinutes(),n.getSeconds())}function R(){var e=Y(v.config,k());W(e.hours,e.minutes,e.seconds)}function W(e,n,t){void 0!==v.latestSelectedDateObj&&v.latestSelectedDateObj.setHours(e%24,n,t||0,0),v.hourElement&&v.minuteElement&&!v.isMobile&&(v.hourElement.value=o(v.config.time_24hr?e:(12+e)%12+12*r(e%12==0)),v.minuteElement.value=o(n),void 0!==v.amPM&&(v.amPM.textContent=v.l10n.amPM[r(e>=12)]),void 0!==v.secondElement&&(v.secondElement.value=o(t)))}function B(e){var n=g(e);if(-1!==v.yearElements.indexOf(n)){var t=parseInt(n.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&Ce(t)}}function K(e,n,t,a){return n instanceof Array?n.forEach(function(n){return K(e,n,t,a)}):e instanceof Array?e.forEach(function(e){return K(e,n,t,a)}):(e.addEventListener(n,t,a),void v._handlers.push({remove:function(){return e.removeEventListener(n,t,a)}}))}function U(){$e("onChange")}function J(){M.forEach(function(e){return e.remove()}),M=[]}function V(){if(void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement){K(v.timeContainer,["increment"],I),K(v.timeContainer,"blur",I,{capture:!0}),K(v.timeContainer,"click",G),K([v.hourElement,v.minuteElement],["focus","click"],function(e){return g(e).select()}),void 0!==v.secondElement&&K(v.secondElement,"focus",function(){return v.secondElement&&v.secondElement.select()}),void 0!==v.amPM&&K(v.amPM,"click",function(e){I(e)})}}function q(e){var n=v.config,t=n.minDate,a=n.maxDate;return t&&t.getTime()>e.getTime()?t:a&&a.getTime()<e.getTime()?a:e}function $(e){var n=12*v.currentYear+v.currentMonth,t=12*e.getFullYear()+e.getMonth();return t>=n&&t<n+v.config.showMonths}function X(e,n){var t=void 0!==e?v.parseDate(e):v.latestSelectedDateObj||q(v.now),a=v.currentYear,i=v.currentMonth;try{void 0!==t&&(v.currentYear=t.getFullYear(),v.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,v.config.errorHandler(e)}n&&z(a,i),v.redraw()}function z(e,n){v.currentYear!==e&&$e("onYearChange"),v.currentYear===e&&v.currentMonth===n||$e("onMonthChange")}function G(e){var n=g(e);~n.className.indexOf("arrow")&&Z(e,n.classList.contains("arrowUp")?1:-1)}function Z(e,n,t){var a=e&&g(e),i=t||a&&a.parentNode&&a.parentNode.firstChild,o=Xe("increment");o.delta=n,i&&i.dispatchEvent(o)}function Q(e){var n;return Number(e===v.hourElement?v.config.hourIncrement:e===v.minuteElement?v.config.minuteIncrement:null!==(n=v.config.secondIncrement)&&void 0!==n?n:v.config.minuteIncrement)}function ee(e,n,t,a){var i=ye(n,!0),o=d("span",e,n.getDate().toString());return o.dateObj=n,o.$i=a,o.setAttribute("aria-label",v.formatDate(n,v.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===O(n,v.now)&&(v.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?o.tabIndex=-1:o.classList.add("flatpickr-disabled"),ze(n)&&(o.classList.add("selected"),i&&(v.selectedDateElem=o),"range"===v.config.mode&&(s(o,"startRange",v.selectedDates[0]&&0===O(n,v.selectedDates[0],!0)),s(o,"endRange",v.selectedDates[1]&&0===O(n,v.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange"))),"range"===v.config.mode&&function(e){return!("range"!==v.config.mode||v.selectedDates.length<2)&&(O(e,v.selectedDates[0])>=0&&O(e,v.selectedDates[1])<=0)}(n)&&!ze(n)&&o.classList.add("inRange"),v.weekNumbers&&1===v.config.showMonths&&"prevMonthDay"!==e&&a%7==6&&v.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+v.config.getWeek(n)+"</span>"),$e("onDayCreate",o),o}function ne(e){e.focus(),"range"===v.config.mode&&ke(e)}function te(e){for(var n=e>0?0:v.config.showMonths-1,t=e>0?v.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=v.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&ye(c.dateObj))return c}}function ae(e,n){for(var t=n>0?v.config.maxDate:v.config.minDate,a=0;a<=3653;a++){var i=new Date(e.getFullYear(),e.getMonth(),e.getDate()+a*n);if(void 0!==t&&O(i,t)*n>0)return;if(ye(i))return i}}function ie(e){for(var n=v.daysContainer.querySelectorAll(".flatpickr-day:not(.hidden)"),t=0;t<n.length;t++)if(0===O(n[t].dateObj,e))return n[t]}function oe(e){if(void 0===ie(e)){var n=12*v.currentYear+v.currentMonth,t=12*e.getFullYear()+e.getMonth();he(t<n?t-n:t-(n+v.config.showMonths-1))}var a=ie(e);void 0!==a&&ne(a)}function re(e,n){if(void 0!==v.daysContainer&&v.rContainer.contains(v.daysContainer)){var t=w(),a=n>0?1:-1,i=null!==t&&t.classList.contains("flatpickr-day")&&be(t),o=void 0!==e?e:i?t:void 0!==v.selectedDateElem&&be(v.selectedDateElem)?v.selectedDateElem:void 0!==v.todayDateElem&&be(v.todayDateElem)?v.todayDateElem:te(a);if(void 0===o)void 0!==(r=0!==n?ae(a>0?new Date(v.currentYear,v.currentMonth+v.config.showMonths,1):new Date(v.currentYear,v.currentMonth,0),a):void 0)?oe(r):v.daysContainer.focus();else if(i){var r,l=o.dateObj;void 0!==(r=ae(new Date(l.getFullYear(),l.getMonth(),l.getDate()+n),a))&&oe(r)}else ne(o)}}function le(e,n){for(var t=(new Date(e,n,1).getDay()-v.l10n.firstDayOfWeek+7)%7,a=v.utils.getDaysInMonth((n-1+12)%12,e),i=v.utils.getDaysInMonth(n,e),o=b.createDocumentFragment(),r=v.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-t,u=0;s<=a;s++,u++)o.appendChild(ee("flatpickr-day "+l,new Date(e,n-1,s),0,u));for(s=1;s<=i;s++,u++)o.appendChild(ee("flatpickr-day",new Date(e,n,s),0,u));for(var f=i+1;f<=42-t&&(1===v.config.showMonths||u%7!=0);f++,u++)o.appendChild(ee("flatpickr-day "+c,new Date(e,n+1,f%i),0,u));var m=d("div","dayContainer");return m.appendChild(o),m}function ce(){if(void 0!==v.daysContainer){u(v.daysContainer),v.weekNumbers&&u(v.weekNumbers);for(var e=b.createDocumentFragment(),n=0;n<v.config.showMonths;n++){var t=new Date(v.currentYear,v.currentMonth,1);t.setMonth(v.currentMonth+n),e.appendChild(le(t.getFullYear(),t.getMonth()))}v.daysContainer.appendChild(e),v.days=v.daysContainer.firstChild,"range"===v.config.mode&&1===v.selectedDates.length&&ke(),$e("onDaysBuilt")}}function se(){if(!(void 0===v.monthsDropdownContainer||v.config.showMonths>1||"dropdown"!==v.config.monthSelectorType)){var e=function(e){return!(void 0!==v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&e<v.config.minDate.getMonth())&&!(void 0!==v.config.maxDate&&v.currentYear===v.config.maxDate.getFullYear()&&e>v.config.maxDate.getMonth())};v.monthsDropdownContainer.tabIndex=-1,v.monthsDropdownContainer.innerHTML="";for(var n=0;n<12;n++)if(e(n)){var t=d("option","flatpickr-monthDropdown-month");t.value=new Date(v.currentYear,n).getMonth().toString(),t.textContent=h(n,v.config.shorthandCurrentMonth,v.l10n),t.tabIndex=-1,v.currentMonth===n&&(t.selected=!0),v.monthsDropdownContainer.appendChild(t)}}}function de(e){var n,t=d("div","flatpickr-month"),a=b.createDocumentFragment();v.config.showMonths>1||"static"===v.config.monthSelectorType?n=d("span","cur-month"):(v.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),v.monthsDropdownContainer.id=C+"-month",v.monthsDropdownContainer.setAttribute("aria-label",v.l10n.monthAriaLabel),K(v.monthsDropdownContainer,"change",function(e){var n=g(e),t=parseInt(n.value,10);v.changeMonth(t-v.currentMonth),$e("onMonthChange")}),se(),n=v.monthsDropdownContainer);var i=m("cur-year",{id:C+"-year-"+e,tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",v.l10n.yearAriaLabel),v.config.minDate&&o.setAttribute("min",v.config.minDate.getFullYear().toString()),v.config.maxDate&&(o.setAttribute("max",v.config.maxDate.getFullYear().toString()),o.disabled=!!v.config.minDate&&v.config.minDate.getFullYear()===v.config.maxDate.getFullYear());var r=d("div","flatpickr-current-month");return r.appendChild(n),r.appendChild(i),a.appendChild(r),t.appendChild(a),{container:t,yearElement:o,monthElement:n}}function ue(){u(v.monthNav),v.monthNav.appendChild(v.prevMonthNav),v.config.showMonths&&(v.yearElements=[],v.monthElements=[]);for(var e=0;e<v.config.showMonths;e++){var n=de(e);v.yearElements.push(n.yearElement),v.monthElements.push(n.monthElement),v.monthNav.appendChild(n.container)}v.monthNav.appendChild(v.nextMonthNav)}function fe(){v.calendarContainer.classList.add("hasTime"),v.config.noCalendar&&v.calendarContainer.classList.add("noCalendar");var e=Y(v.config,k());v.timeContainer=d("div","flatpickr-time"),v.timeContainer.tabIndex=-1;var n=d("span","flatpickr-time-separator",":"),t=m("flatpickr-hour",{id:C+"-hour","aria-label":v.l10n.hourAriaLabel});v.hourElement=t.getElementsByTagName("input")[0];var a=m("flatpickr-minute",{id:C+"-minute","aria-label":v.l10n.minuteAriaLabel});if(v.minuteElement=a.getElementsByTagName("input")[0],v.hourElement.tabIndex=v.minuteElement.tabIndex=-1,v.hourElement.value=o(v.latestSelectedDateObj?v.latestSelectedDateObj.getHours():v.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),v.minuteElement.value=o(v.latestSelectedDateObj?v.latestSelectedDateObj.getMinutes():e.minutes),v.hourElement.setAttribute("min",v.config.time_24hr?"0":"1"),v.hourElement.setAttribute("max",v.config.time_24hr?"23":"12"),v.hourElement.setAttribute("maxlength","2"),v.minuteElement.setAttribute("min","0"),v.minuteElement.setAttribute("max","59"),v.minuteElement.setAttribute("maxlength","2"),v.timeContainer.appendChild(t),v.timeContainer.appendChild(n),v.timeContainer.appendChild(a),v.config.time_24hr&&v.timeContainer.classList.add("time24hr"),v.config.enableSeconds){v.timeContainer.classList.add("hasSeconds");var i=m("flatpickr-second",{id:C+"-second","aria-label":v.l10n.secondAriaLabel});v.secondElement=i.getElementsByTagName("input")[0],v.secondElement.value=o(v.latestSelectedDateObj?v.latestSelectedDateObj.getSeconds():e.seconds),v.secondElement.setAttribute("min","0"),v.secondElement.setAttribute("max","59"),v.secondElement.setAttribute("maxlength","2"),v.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),v.timeContainer.appendChild(i)}return v.config.time_24hr||(v.amPM=d("span","flatpickr-am-pm",v.l10n.amPM[r((v.latestSelectedDateObj?v.hourElement.value:v.config.defaultHour)>11)]),v.amPM.title=v.l10n.toggleTitle,v.amPM.tabIndex=-1,v.timeContainer.appendChild(v.amPM)),v.timeContainer}function me(){if(v.isMobile)return Je();var e=v.timeContainer;v.timeContainer=v.hourElement=v.minuteElement=void 0,v.secondElement=v.amPM=void 0,v.calendarContainer.classList.remove("hasTime"),v.calendarContainer.classList.remove("noCalendar"),v.config.enableTime&&(v.calendarContainer.insertBefore(fe(),e||(v.innerContainer?v.innerContainer.nextSibling:v.calendarContainer.firstChild)),V(),H()),e&&v.calendarContainer.removeChild(e)}function ge(){v.weekdayContainer?u(v.weekdayContainer):v.weekdayContainer=d("div","flatpickr-weekdays");for(var e=v.config.showMonths;e--;){var n=d("div","flatpickr-weekdaycontainer");v.weekdayContainer.appendChild(n)}return pe(),v.weekdayContainer}function pe(){if(v.weekdayContainer){var e=v.l10n.firstDayOfWeek,t=n(v.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=n(t.splice(e,t.length),t.splice(0,e)));for(var a=function(e){var n=v.weekdayContainer.children[e];u(n),t.forEach(function(e){return n.appendChild(d("span","flatpickr-weekday",e))})},i=v.config.showMonths;i--;)a(i)}}function he(e,n){void 0===n&&(n=!0);var t=n?e:e-v.currentMonth;t<0&&!0===v._hidePrevMonthArrow||t>0&&!0===v._hideNextMonthArrow||(v.currentMonth+=t,(v.currentMonth<0||v.currentMonth>11)&&(v.currentYear+=Math.floor(v.currentMonth/12),v.currentMonth=(v.currentMonth%12+12)%12,$e("onYearChange"),se()),ce(),$e("onMonthChange"),Ge())}function ve(e){return v.calendarContainer.contains(e)}function De(e){var n=g(e),t=ve(n),a=!(n===v.input||n===v.altInput||v.element.contains(n))&&!t&&!ve(e.relatedTarget),i=!v.config.ignoredFocusElements.some(function(e){return e.contains(n)});if(a&&i){var o=v.config.allowInput?we():void 0;if(void 0===o&&void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement&&""!==v.input.value&&void 0!==v.input.value&&I(),v.close(),void 0===v.config)return;"range"===v.config.mode&&1===v.selectedDates.length&&v.clear(!1),Ee(o)}}function Ce(e){if(!(!e||isNaN(new Date(e,v.currentMonth,1).getTime())||v.config.minDate&&e<v.config.minDate.getFullYear()||v.config.maxDate&&e>v.config.maxDate.getFullYear())){var n=e,t=v.currentYear!==n;v.currentYear=n||v.currentYear,v.config.maxDate&&v.currentYear===v.config.maxDate.getFullYear()?v.currentMonth=Math.min(v.config.maxDate.getMonth(),v.currentMonth):v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&(v.currentMonth=Math.max(v.config.minDate.getMonth(),v.currentMonth)),t&&(v.redraw(),$e("onYearChange"))}}function ye(e,n){var t;void 0===n&&(n=!0);var a=v.parseDate(e,void 0,n);if(v.config.minDate&&a&&O(a,v.config.minDate,void 0!==n?n:!v.minDateHasTime)<0||v.config.maxDate&&a&&O(a,v.config.maxDate,void 0!==n?n:!v.maxDateHasTime)>0)return!1;if(!v.config.enable&&0===v.config.disable.length)return!0;if(void 0===a)return!1;var i=new Date(a.getTime());i.setHours(0,0,0,0);for(var o=!!v.config.enable,r=null!==(t=v.config.enable)&&void 0!==t?t:v.config.disable,l=0,c=void 0;l<r.length;l++){if("function"==typeof(c=r[l])&&c(i))return o;if(c instanceof Date&&c.getTime()===i.getTime())return o;if("string"==typeof c){var s=v.parseDate(c,void 0,!0);return s&&s.getTime()===i.getTime()?o:!o}if("object"==typeof c&&c.from&&c.to&&i.getTime()>=c.from.getTime()&&i.getTime()<=c.to.getTime())return o}return!o}function be(e){return void 0!==v.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&v.daysContainer.contains(e))}function Me(e){e.target!==v._input||e.relatedTarget&&ve(e.relatedTarget)||Ee(we())}function we(){var e=v._typedValue();if(void 0!==e){var n={times:xe(),year:v.currentYear,month:v.currentMonth};return v.setDate(e,!1,v.config.altInput?v.config.altFormat:v.config.dateFormat),void 0!==v.hourElement&&(j(),Qe(!1)),n}}function Ee(e){void 0!==e&&(z(e.year,e.month),xe()!==e.times&&(v.selectedDates.length>0&&$e("onValueUpdate"),$e("onChange")))}function xe(){return v.selectedDates.map(function(e){return e.getTime()}).join()}function Te(e){var n=g(e),t=v.config.wrap?i.contains(n):n===v._input,a=v.config.allowInput,o=a&&t&&27!==e.keyCode,r=v.isOpen&&!o,l=v.config.inline&&t&&!a,c=n===v.monthsDropdownContainer&&e.keyCode>=37&&e.keyCode<=40;if(13===e.keyCode&&t){if(a)return Ee(we()),v.close(),n.blur();v.open()}else if(!c&&(ve(n)||r||l)){var s=!!v.timeContainer&&v.timeContainer.contains(n);switch(e.keyCode){case 13:s?(e.preventDefault(),I(),He()):Le(e);break;case 27:e.preventDefault(),He();break;case 8:case 46:t&&!v.config.allowInput&&(e.preventDefault(),v.clear());break;case 37:case 39:if(s||t)v.hourElement&&v.hourElement.focus();else{e.preventDefault();var d=w();if(void 0!==v.daysContainer&&(!1===a||d&&be(d))){var u=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),he(u),re(te(1),0)):re(void 0,u)}}break;case 38:case 40:e.preventDefault();var f=40===e.keyCode?1:-1;v.daysContainer&&void 0!==n.$i||n===v.input||n===v.altInput||n===v.daysContainer?e.ctrlKey?(e.stopPropagation(),Ce(v.currentYear-f),re(te(1),0)):s||re(void 0,7*f):n===v.currentYearElement?Ce(v.currentYear-f):v.config.enableTime&&(!s&&v.hourElement&&v.hourElement.focus(),I(e),v._debouncedChange());break;case 9:if(s){var m=[v.hourElement,v.minuteElement,v.secondElement,v.amPM].concat(v.pluginElements).filter(function(e){return e}),p=m.indexOf(n);if(-1!==p){var h=m[p+(e.shiftKey?-1:1)];e.preventDefault(),(h||v._input).focus()}}else!v.config.noCalendar&&v.daysContainer&&v.daysContainer.contains(n)&&e.shiftKey&&(e.preventDefault(),v._input.focus())}}if(void 0!==v.amPM&&n===v.amPM)switch(e.key){case v.l10n.amPM[0].charAt(0):case v.l10n.amPM[0].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[0],j(),Qe();break;case v.l10n.amPM[1].charAt(0):case v.l10n.amPM[1].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[1],j(),Qe()}(t||ve(n))&&$e("onKeyDown",e)}function ke(e,n){if(void 0===n&&(n="flatpickr-day"),1===v.selectedDates.length&&(!e||e.classList.contains(n)&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():v.days.firstElementChild.dateObj.getTime(),a=v.parseDate(v.selectedDates[0],void 0,!0).getTime(),i=Math.min(t,v.selectedDates[0].getTime()),o=Math.max(t,v.selectedDates[0].getTime()),r=!1,l=0,c=0,s=i;s<o;s+=F)ye(new Date(s),!0)||(r=r||s>i&&s<o,s<a&&(!l||s>l)?l=s:s>a&&(!c||s<c)&&(c=s));Array.prototype.slice.call(v.rContainer.querySelectorAll("*:nth-child(-n+"+v.config.showMonths+") > ."+n)).forEach(function(n){var i,o,s,d=n.dateObj.getTime(),u=l>0&&d<l||c>0&&d>c;if(u)return n.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)});r&&!u||(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),void 0!==e&&(e.classList.add(t<=v.selectedDates[0].getTime()?"startRange":"endRange"),a<t&&d===a?n.classList.add("startRange"):a>t&&d===a&&n.classList.add("endRange"),d>=l&&(0===c||d<=c)&&(o=a,s=t,(i=d)>Math.min(o,s)&&i<Math.max(o,s))&&n.classList.add("inRange")))})}}function Ie(){!v.isOpen||v.config.static||v.config.inline||Pe()}function _e(e){return function(n){var t=v.config["_"+e+"Date"]=v.parseDate(n,v.config.dateFormat),a=v.config["_"+("min"===e?"max":"min")+"Date"];void 0!==t&&(v["min"===e?"minDateHasTime":"maxDateHasTime"]=t.getHours()>0||t.getMinutes()>0||t.getSeconds()>0),v.selectedDates&&(v.config.allowInvalidPreload||(v.selectedDates=We(v.selectedDates,!0)),v.latestSelectedDateObj&&-1===v.selectedDates.indexOf(v.latestSelectedDateObj)&&(v.latestSelectedDateObj=v.selectedDates[v.selectedDates.length-1]),v.selectedDates.length||R(),Qe()),v.daysContainer&&(je(),void 0!==t?v.currentYearElement[e]=t.getFullYear().toString():v.currentYearElement.removeAttribute(e),v.currentYearElement.disabled=!!a&&void 0!==t&&a.getFullYear()===t.getFullYear()),void 0!==v.mobileInput&&Ve(e)}}function Se(){var e=L.defaultConfig.dateFormat||a.dateFormat,n=L.defaultConfig.altFormat||a.altFormat,t="time"===D.mode;if(!D.enableTime&&!t)return{dateFormat:e,altFormat:n};var i=D.noCalendar||t,o=D.enableSeconds?":S":"";return{dateFormat:i?"H:i"+o:e+" H:i"+o,altFormat:D.altInput?i?"h:i"+o+" K":n+" h:i"+o+" K":n}}function Oe(){var e=Se();void 0===D.dateFormat&&(v.config.dateFormat=e.dateFormat),void 0===D.altFormat&&(v.config.altFormat=e.altFormat)}function Ne(){return v.config.wrap?i.querySelector("[data-input]"):i}function Fe(){"object"!=typeof v.config.locale&&void 0===L.l10ns[v.config.locale]&&v.config.errorHandler(new Error("flatpickr: invalid locale "+v.config.locale)),Ye(v.config.locale),void 0===D.time_24hr&&void 0===L.defaultConfig.time_24hr&&(v.config.time_24hr=v.l10n.time_24hr),v.formatDate=_(v)}function Ye(e){v.l10n=A(L.l10ns.default,"object"==typeof e?e:"default"!==e?L.l10ns[e]:void 0),T.D="("+v.l10n.weekdays.shorthand.join("|")+")",T.l="("+v.l10n.weekdays.longhand.join("|")+")",T.M="("+v.l10n.months.shorthand.slice().sort(function(e,n){return n.length-e.length}).join("|")+")",T.F="("+v.l10n.months.longhand.slice().sort(function(e,n){return n.length-e.length}).join("|")+")",T.K="("+v.l10n.amPM[0]+"|"+v.l10n.amPM[1]+")",v.parseDate=S({config:v.config,l10n:v.l10n})}function Pe(e){if("function"!=typeof v.config.position){if(void 0!==v.calendarContainer){$e("onPreCalendarPosition");var n=e||v._positionElement,t=v.calendarContainer.offsetHeight,a=v.calendarContainer.offsetWidth,i=v.config.position.split(" "),o=i[0],r=i.length>1?i[1]:null,l=n.getBoundingClientRect(),c=y.innerHeight-l.bottom,d="above"!==o&&"below"!==o,u=c>=t,f=l.top>t,m=d&&!u&&!f&&!v.config.static&&!v.config.inline,g=m?l.top>c:"above"===o||d&&!u&&f,p=y.pageYOffset+l.top+(g?-t-2:n.offsetHeight+2),h=m?Math.max(y.pageYOffset,Math.min(p,y.pageYOffset+y.innerHeight-t)):p;if(s(v.calendarContainer,"arrowTop",!m&&!g),s(v.calendarContainer,"arrowBottom",!m&&g),!v.config.inline){var D=y.pageXOffset+l.left,C=!1,M=!1;"center"===r?(D-=(a-l.width)/2,C=!0):"right"===r&&(D-=a-l.width,M=!0),s(v.calendarContainer,"arrowLeft",!C&&!M),s(v.calendarContainer,"arrowCenter",C),s(v.calendarContainer,"arrowRight",M);var w=b.body.offsetWidth,E=y.pageXOffset+l.right,x=D+a>w,T=x&&E<a;if(s(v.calendarContainer,"rightMost",x),!v.config.static){s(v.calendarContainer,"centerMost",T),T?(s(v.calendarContainer,"rightMost",!1),D=Math.max(0,w/2-a/2),v.calendarContainer.style.setProperty("--fp-arrow-left",y.pageXOffset+l.left-D+"px")):x&&(D=E-a);var k=function(){var e=v.calendarContainer.offsetParent;e===b.body&&Ae(b.body)&&(e=Ae(b.documentElement)?null:b.documentElement);if(null===e)return{top:0,left:0};var n=e.getBoundingClientRect(),t=e===b.documentElement;return{top:y.pageYOffset+n.top+e.clientTop-(t?0:e.scrollTop),left:y.pageXOffset+n.left+e.clientLeft-(t?0:e.scrollLeft)}}();v.calendarContainer.style.top=h-k.top+"px",v.calendarContainer.style.left=D-k.left+"px",v.calendarContainer.style.right="auto"}}}}else v.config.position(v,e)}function Ae(e){return"static"===y.getComputedStyle(e).position}function je(){v.config.noCalendar||v.isMobile||(se(),Ge(),ce())}function He(){v._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(v.close,0):v.close()}function Le(e){e.preventDefault(),e.stopPropagation(),"range"===v.config.mode&&ke(g(e));var n=f(g(e),function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==n){var t=n,a=xe(),i=v.latestSelectedDateObj=new Date(t.dateObj.getTime()),o=!$(i)&&"range"!==v.config.mode;if(v.selectedDateElem=t,"single"===v.config.mode)v.selectedDates=[i];else if("multiple"===v.config.mode){var r=ze(i);r?v.selectedDates.splice(parseInt(r),1):v.selectedDates.push(i)}else"range"===v.config.mode&&(2===v.selectedDates.length&&v._startNewRange(),v.latestSelectedDateObj=i,v.selectedDates.push(i),0!==O(i,v.selectedDates[0],!0)&&v.selectedDates.sort(function(e,n){return e.getTime()-n.getTime()}));if(j(),o){var l=v.currentYear!==i.getFullYear();v.currentYear=i.getFullYear(),v.currentMonth=i.getMonth(),l&&($e("onYearChange"),se()),$e("onMonthChange")}if(Ge(),ce(),Qe(),void 0!==v.hourElement?v.hourElement.focus():re(ie(i),0),v.config.closeOnSelect){var c="single"===v.config.mode&&!v.config.enableTime,s="range"===v.config.mode&&2===v.selectedDates.length&&!v.config.enableTime;(c||s)&&He()}xe()!==a&&U()}}v._handlers=[],v.pluginElements=[],v.loadedPlugins=[],v._bind=K,v._setHoursFromDate=H,v._positionCalendar=Pe,v._showValue=function(){v.input.value=Ze(v.config.dateFormat),void 0!==v.altInput&&(v.altInput.value=Ze(v.config.altFormat))},v._typedValue=function(){return v._input.value.replace(/\s+$/,"")===Ze()?void 0:v._input.value},v._startNewRange=function(){v.clear(!1,!1)},v._getIncrement=Q,v.changeMonth=he,v.changeYear=Ce,v.clear=function(e,n){void 0===e&&(e=!0);void 0===n&&(n=!0);void 0!==v.mobileInput&&(v.mobileInput.value="");if(v.selectedDates=[],v.latestSelectedDateObj=void 0,v._showValue(),!0===n){var t=q(v._initialDate);v.currentYear=t.getFullYear(),v.currentMonth=t.getMonth()}!0===v.config.enableTime&&R();v.redraw(),e&&$e("onChange")},v.close=function(){if(v.isOpen&&v.selectedDates.length>0&&!v.selectedDates.some($)){var e=v.currentYear,n=v.currentMonth;X(),z(e,n)}v.isOpen=!1,J(),v.isMobile||(void 0!==v.calendarContainer&&v.calendarContainer.classList.remove("open"),void 0!==v._input&&v._input.classList.remove("active"));$e("onClose")},v.onMouseOver=ke,v._createElement=d,v.createDay=ee,v.destroy=function(){void 0!==v.config&&$e("onDestroy");for(var e=v._handlers.length;e--;)v._handlers[e].remove();if(v._handlers=[],J(),v.mobileInput)v.mobileInput.parentNode&&v.mobileInput.parentNode.removeChild(v.mobileInput),v.mobileInput=void 0;else if(v.calendarContainer&&v.calendarContainer.parentNode)if(v.config.static&&v.calendarContainer.parentNode){var n=v.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else v.calendarContainer.parentNode.removeChild(v.calendarContainer);v.altInput&&(v.input.type="text",v.altInput.parentNode&&v.altInput.parentNode.removeChild(v.altInput),delete v.altInput);v.input&&(v.input.type=v.input._type,v.input.classList.remove("flatpickr-input"),v.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete v[e]}catch(e){}})},v.isEnabled=ye,v.jumpToDate=X,v.updateValue=Qe,v.open=function(e,n){void 0===n&&(n=v._positionElement);if(!0===v.isMobile){if(e){e.preventDefault();var t=g(e);t&&t.blur()}if(void 0!==v.mobileInput){v.mobileInput.focus();try{v.mobileInput.showPicker()}catch(e){v.mobileInput.click()}}return void $e("onOpen")}if(v._input.disabled||v.config.inline)return;var a=v.isOpen;v.isOpen=!0,a||(!function(){var e=function(e,n,t,a){e.addEventListener(n,t,a),M.push({remove:function(){return e.removeEventListener(n,t,a)}})};v.config.static||e(y,"resize",l(Ie,50));void 0===y.ontouchstart?e(b,"mousedown",De):void 0===y.PointerEvent?e(b,"touchstart",De):(e(b,"pointerdown",function(e){"mouse"===e.pointerType&&De(e)}),e(b,"pointerup",function(e){"mouse"!==e.pointerType&&De(e)}));e(b,"focus",De,{capture:!0})}(),v.calendarContainer.classList.add("open"),v._input.classList.add("active"),$e("onOpen"),Pe(n));!0===v.config.enableTime&&!0===v.config.noCalendar&&(!1!==v.config.allowInput||void 0!==e&&v.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return v.hourElement.select()},50))},v.redraw=je,v.set=function(e,n){if(null!==e&&"object"==typeof e)for(var a in Object.assign(v.config,e),Object.assign(D,e),e)void 0!==Re[a]&&Re[a].forEach(function(e){return e()});else v.config[e]=n,D[e]=n,void 0!==Re[e]?Re[e].forEach(function(e){return e()}):t.indexOf(e)>-1&&(v.config[e]=c(n));v.redraw(),Qe(!0)},v.setDate=function(e,n,t){void 0===n&&(n=!1);void 0===t&&(t=v.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return v.clear(n);Be(e,t),v.latestSelectedDateObj=v.selectedDates[v.selectedDates.length-1],v.redraw(),X(void 0,n),H(),0===v.selectedDates.length&&v.clear(!1);Qe(n),n&&$e("onChange")},v.toggle=function(e){if(!0===v.isOpen)return v.close();v.open(e)};var Re={locale:[Fe,pe,me],showMonths:[ue,x,ge],minDate:[X],maxDate:[X],positionElement:[Ue],enableTime:[Oe,me],enableSeconds:[Oe,me],time_24hr:[me],clickOpens:[function(){!0===v.config.clickOpens?(K(v._input,"focus",v.open),K(v._input,"click",v.open)):(v._input.removeEventListener("focus",v.open),v._input.removeEventListener("click",v.open))}]};function We(e,n){var t=e.filter(function(e){return ye(e,n)});return"range"===v.config.mode&&t.length<e.length?[]:t}function Be(e,n){var t=[];if(e instanceof Array)t=e.map(function(e){return v.parseDate(e,n)});else if(e instanceof Date||"number"==typeof e)t=[v.parseDate(e,n)];else if("string"==typeof e)switch(v.config.mode){case"single":case"time":t=[v.parseDate(e,n)];break;case"multiple":var a=v.config.conjunction;t=e.split(a.replace(/\s+$/,"")||a).map(function(e){return v.parseDate(e.trim(),n)});break;case"range":1!==(t=e.split(v.l10n.rangeSeparator).map(function(e){return v.parseDate(e,n)})).length||v.config.enableTime||t.push(v.parseDate(e,n))}else v.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));var i=t.filter(function(e){return e instanceof Date});v.selectedDates=v.config.allowInvalidPreload?i:We(i,!1),"range"===v.config.mode&&v.selectedDates.sort(function(e,n){return e.getTime()-n.getTime()})}function Ke(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?v.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:v.parseDate(e.from,void 0),to:v.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function Ue(){v._positionElement=v.config.positionElement||v._input}function Je(){var e=v.mobileInput,n=v.config.enableTime?v.config.noCalendar?"time":"datetime-local":"date";e.type=n,v.mobileFormatStr="datetime-local"===n?"Y-m-d\\TH:i:S":"date"===n?"Y-m-d":"H:i:S";var t=v.input.getAttribute("step")||(v.config.enableSeconds?"1":"");t?e.step=t:e.removeAttribute("step"),Ve("min"),Ve("max")}function Ve(e){var n=v.mobileInput,t=v.config[e+"Date"];if(void 0===t)return n.removeAttribute(e);var a="min"===e&&"date"!==n.type?Math.ceil:Math.floor;n[e]=qe(t,a)}function qe(e,n){void 0===n&&(n=Math.floor);var t=v.mobileInput.step,a=Number(t||60)%60==0?60:1,i=new Date(e.getTime()),o=i.getSeconds()+i.getMilliseconds()/1e3;return i.setSeconds(n(o/a)*a,0),v.formatDate(i,v.mobileFormatStr)}function $e(e,n){if(void 0!==v.config){var t=v.config[e];if(void 0!==t&&t.length>0)for(var a=0;t[a]&&a<t.length;a++)t[a](v.selectedDates,v.input.value,v,n);"onChange"===e&&(v.input.dispatchEvent(Xe("change")),v.input.dispatchEvent(Xe("input")))}}function Xe(e){var n=b.createEvent("Event");return n.initEvent(e,!0,!0),n}function ze(e){for(var n=0;n<v.selectedDates.length;n++)if(0===O(v.selectedDates[n],e))return""+n;return!1}function Ge(){v.config.noCalendar||v.isMobile||!v.monthNav||(v.yearElements.forEach(function(e,n){var t=new Date(v.currentYear,v.currentMonth,1);t.setMonth(v.currentMonth+n),v.config.showMonths>1||"static"===v.config.monthSelectorType?v.monthElements[n].textContent=h(t.getMonth(),v.config.shorthandCurrentMonth,v.l10n)+" ":v.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()}),v._hidePrevMonthArrow=void 0!==v.config.minDate&&(v.currentYear===v.config.minDate.getFullYear()?v.currentMonth<=v.config.minDate.getMonth():v.currentYear<v.config.minDate.getFullYear()),v._hideNextMonthArrow=void 0!==v.config.maxDate&&(v.currentYear===v.config.maxDate.getFullYear()?v.currentMonth+1>v.config.maxDate.getMonth():v.currentYear>v.config.maxDate.getFullYear()))}function Ze(e){var n=e||(v.config.altInput?v.config.altFormat:v.config.dateFormat);return v.selectedDates.map(function(e){return v.formatDate(e,n)}).filter(function(e,n,t){return"range"!==v.config.mode||v.config.enableTime||t.indexOf(e)===n}).join("range"!==v.config.mode?v.config.conjunction:v.l10n.rangeSeparator)}function Qe(e){if(void 0===e&&(e=!0),void 0!==v.mobileInput&&v.mobileFormatStr){var n=void 0!==v.latestSelectedDateObj?qe(v.latestSelectedDateObj):"",t=v.parseDate(v.mobileInput.value,v.mobileFormatStr);void 0!==t&&v.formatDate(t,v.mobileFormatStr)===n||(v.mobileInput.value=n)}v._showValue(),!1!==e&&$e("onValueUpdate")}function en(e){var n=g(e),t=v.prevMonthNav.contains(n),a=v.nextMonthNav.contains(n);t||a?he(t?-1:1):v.yearElements.indexOf(n)>=0?n.select():n.classList.contains("arrowUp")?v.changeYear(v.currentYear+1):n.classList.contains("arrowDown")&&v.changeYear(v.currentYear-1)}i._flatpickr=v;try{!function(){v.element=v.input=i,v.isOpen=!1,function(){var e,n=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];Object.assign(D,JSON.parse(JSON.stringify(i.dataset||{})),p),v.config.parseDate=D.parseDate,v.config.formatDate=D.formatDate,Object.defineProperty(v.config,"enable",{get:function(){return v.config._enable},set:function(e){v.config._enable=e?Ke(e):void 0}}),Object.defineProperty(v.config,"disable",{get:function(){return v.config._disable},set:function(e){v.config._disable=Ke(e)}}),Object.defineProperty(v.config,"minDate",{get:function(){return v.config._minDate},set:_e("min")}),Object.defineProperty(v.config,"maxDate",{get:function(){return v.config._maxDate},set:_e("max")});var o=function(e){return function(n){v.config["min"===e?"_minTime":"_maxTime"]=v.parseDate(n,"H:i:S")}};Object.defineProperty(v.config,"minTime",{get:function(){return v.config._minTime},set:o("min")}),Object.defineProperty(v.config,"maxTime",{get:function(){return v.config._maxTime},set:o("max")});var r=v.config.conjunction;Object.defineProperty(v.config,"conjunction",{get:function(){return r},set:function(e){r=null!=e?e:a.conjunction}}),v.config.conjunction=r,"time"===D.mode&&(v.config.noCalendar=!0,v.config.enableTime=!0),Ye(null!==(e=D.locale)&&void 0!==e?e:v.config.locale),Object.assign(v.config,Se(),D);for(var l=0;l<n.length;l++)v.config[n[l]]=!0===v.config[n[l]]||"true"===v.config[n[l]];for(t.filter(function(e){return void 0!==v.config[e]}).forEach(function(e){v.config[e]=c(v.config[e]||[]).map(E)}),l=0;l<v.config.plugins.length;l++){var s=v.config.plugins[l](v)||{};for(var d in s)t.indexOf(d)>-1?v.config[d]=c(s[d]).map(E).concat(v.config[d]):void 0===D[d]&&(v.config[d]=s[d])}v.isMobile=!v.config.disableMobile&&!v.config.inline&&"single"===v.config.mode&&!v.config.disable.length&&!v.config.enable&&!v.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),D.altInputClass||(v.config.altInputClass=Ne().className+" "+v.config.altInputClass),$e("onParseConfig")}(),Fe(),v.input=Ne(),v.input?(v.input._type=v.input.type,v.input.type="text",v.input.classList.add("flatpickr-input"),v._input=v.input,v.config.altInput&&(v.altInput=d(v.input.nodeName,v.config.altInputClass),v._input=v.altInput,v.altInput.placeholder=v.input.placeholder,v.altInput.disabled=v.input.disabled,v.altInput.required=v.input.required,v.altInput.tabIndex=v.input.tabIndex,v.altInput.type="text",v.input.setAttribute("type","hidden"),!v.config.static&&v.input.parentNode&&v.input.parentNode.insertBefore(v.altInput,v.input.nextSibling)),v.config.allowInput||v._input.setAttribute("readonly","readonly"),Ue()):v.config.errorHandler(new Error("Invalid input element specified")),function(){v.selectedDates=[],v.now=v.parseDate(v.config.now)||new Date;var e=v.config.defaultDate||("INPUT"!==v.input.nodeName&&"TEXTAREA"!==v.input.nodeName||!v.input.placeholder||v.input.value!==v.input.placeholder?v.input.value:null);e&&Be(e,v.config.dateFormat),v._initialDate=v.selectedDates.length>0?v.selectedDates[0]:q(v.now),v.currentYear=v._initialDate.getFullYear(),v.currentMonth=v._initialDate.getMonth(),v.selectedDates.length>0&&(v.latestSelectedDateObj=v.selectedDates[0]),void 0!==v.config.minTime&&(v.config.minTime=v.parseDate(v.config.minTime,"H:i")),void 0!==v.config.maxTime&&(v.config.maxTime=v.parseDate(v.config.maxTime,"H:i")),v.minDateHasTime=!!v.config.minDate&&(v.config.minDate.getHours()>0||v.config.minDate.getMinutes()>0||v.config.minDate.getSeconds()>0),v.maxDateHasTime=!!v.config.maxDate&&(v.config.maxDate.getHours()>0||v.config.maxDate.getMinutes()>0||v.config.maxDate.getSeconds()>0)}(),v.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=v.currentMonth),void 0===n&&(n=v.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:v.l10n.daysInMonth[e]}},v.isMobile||function(){var e=b.createDocumentFragment();if(v.calendarContainer=d("div","flatpickr-calendar"),v.calendarContainer.tabIndex=-1,!v.config.noCalendar){if(e.appendChild((v.monthNav=d("div","flatpickr-months"),v.yearElements=[],v.monthElements=[],v.prevMonthNav=d("span","flatpickr-prev-month"),v.prevMonthNav.innerHTML=v.config.prevArrow,v.nextMonthNav=d("span","flatpickr-next-month"),v.nextMonthNav.innerHTML=v.config.nextArrow,ue(),Object.defineProperty(v,"_hidePrevMonthArrow",{get:function(){return v.__hidePrevMonthArrow},set:function(e){v.__hidePrevMonthArrow!==e&&(s(v.prevMonthNav,"flatpickr-disabled",e),v.__hidePrevMonthArrow=e)}}),Object.defineProperty(v,"_hideNextMonthArrow",{get:function(){return v.__hideNextMonthArrow},set:function(e){v.__hideNextMonthArrow!==e&&(s(v.nextMonthNav,"flatpickr-disabled",e),v.__hideNextMonthArrow=e)}}),v.currentYearElement=v.yearElements[0],Ge(),v.monthNav)),v.innerContainer=d("div","flatpickr-innerContainer"),v.config.weekNumbers){var n=function(){v.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",v.l10n.weekAbbreviation));var n=d("div","flatpickr-weeks");return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),t=n.weekWrapper,a=n.weekNumbers;v.innerContainer.appendChild(t),v.weekNumbers=a,v.weekWrapper=t}v.rContainer=d("div","flatpickr-rContainer"),v.rContainer.appendChild(ge()),v.daysContainer||(v.daysContainer=d("div","flatpickr-days"),v.daysContainer.tabIndex=-1),ce(),v.rContainer.appendChild(v.daysContainer),v.innerContainer.appendChild(v.rContainer),e.appendChild(v.innerContainer)}v.config.enableTime&&e.appendChild(fe()),s(v.calendarContainer,"rangeMode","range"===v.config.mode),s(v.calendarContainer,"animate",!0===v.config.animate),s(v.calendarContainer,"multiMonth",v.config.showMonths>1),v.calendarContainer.appendChild(e);var i=!!v.config.appendTo&&void 0!==v.config.appendTo.nodeType;if((v.config.inline||v.config.static)&&(v.calendarContainer.classList.add(v.config.inline?"inline":"static"),v.config.inline&&(!i&&v.element.parentNode?v.element.parentNode.insertBefore(v.calendarContainer,v._input.nextSibling):v.config.appendTo&&v.config.appendTo.appendChild(v.calendarContainer)),v.config.static)){var o=d("div","flatpickr-wrapper");v.element.parentNode&&v.element.parentNode.insertBefore(o,v.element),o.appendChild(v.element),v.altInput&&v.input.parentNode&&v.input.parentNode.insertBefore(v.altInput,v.input.nextSibling),o.appendChild(v.calendarContainer)}v.config.static||v.config.inline||(v.config.appendTo||b.body).appendChild(v.calendarContainer)}(),v.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(v.element.querySelectorAll("[data-"+e+"]"),function(n){return K(n,"click",v[e])})}),v.isMobile?function(){v.mobileInput=d("input",v.input.className+" flatpickr-mobile"),v.mobileInput.tabIndex=v.input.tabIndex,Je(),v.mobileInput.disabled=v.input.disabled,v.mobileInput.required=v.input.required,v.mobileInput.placeholder=v.input.placeholder,v.selectedDates.length>0&&(v.mobileInput.defaultValue=v.mobileInput.value=qe(v.selectedDates[0])),v.input.type="hidden",void 0!==v.altInput&&(v.altInput.type="hidden");try{v.input.parentNode&&v.input.parentNode.insertBefore(v.mobileInput,v.input.nextSibling)}catch(e){}K(v.mobileInput,"change",function(e){v.setDate(g(e).value,!1,v.mobileFormatStr),$e("onChange"),$e("onClose")})}():(v._debouncedChange=l(U,300),v.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&K(v.daysContainer,"mouseover",function(e){"range"===v.config.mode&&ke(g(e))}),K(v._input,"keydown",Te),void 0!==v.calendarContainer&&K(v.calendarContainer,"keydown",Te),!0===v.config.clickOpens&&(K(v._input,"focus",v.open),K(v._input,"click",v.open)),void 0!==v.daysContainer&&(K(v.monthNav,"click",en),K(v.monthNav,["keyup","increment"],B),K(v.daysContainer,"click",Le)),V(),v.config.allowInput&&K(v._input,"blur",Me)),(v.selectedDates.length||v.config.noCalendar)&&(v.config.enableTime&&H(v.config.noCalendar?v.latestSelectedDateObj:void 0),Qe(!1)),x();var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);v.isMobile||v.config.inline||!e||Pe(),$e("onReady")}()}catch(e){throw i._flatpickr=void 0,e}return v}function H(e,n){for(var t=Array.prototype.slice.call(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE}),a=[],i=0;i<t.length;i++){var o=t[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),a.push(j(o,n||{}))}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return H(this,e)},HTMLElement.prototype.flatpickr=function(e){return H([this],e)});var L=function(e,n){return"string"==typeof e?H(window.document.querySelectorAll(e),n):"number"==typeof(null===(t=e)||void 0===t?void 0:t.nodeType)?H([e],n):H(e,n);var t};return L.defaultConfig={},L.l10ns={en:e({},i),default:e({},i)},L.localize=function(e){L.l10ns.default=A(L.l10ns.default,e)},L.setDefaults=function(n){L.defaultConfig=e(e({},L.defaultConfig),n)},L.parseDate=S({}),L.formatDate=_({}),L.compareDates=O,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return H(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=L),L});
1
+ /* flatpickr v4.12.0,, @license MIT */
2
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=n()}(this,function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var n,t=1,a=arguments.length;t<a;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},e.apply(this,arguments)};function n(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var a=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],r=0,l=o.length;r<l;r++,i++)a[i]=o[r];return a}var t=["onChange","onClose","onDayCreate","onDaysBuilt","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],a={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var t=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDaysBuilt:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},i={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",secondAriaLabel:"Second",time_24hr:!1},o=function(e,n){return void 0===n&&(n=2),("000"+e).slice(-1*n)},r=function(e){return!0===e?1:0};function l(e,n){var t;return function(){var a=this,i=arguments;clearTimeout(t),t=setTimeout(function(){return e.apply(a,i)},n)}}var c=function(e){return e instanceof Array?e:[e]};function s(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function d(e,n,t){var a=window.document.createElement(e);return n=n||"",t=t||"",a.className=n,void 0!==t&&(a.textContent=t),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,n){return n(e)?e:e.parentNode?f(e.parentNode,n):void 0}function m(e,n){var t=d("div","numInputWrapper"),a=d("input","numInput "+e),i=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==n)for(var r in n)a.setAttribute(r,n[r]);return t.appendChild(a),t.appendChild(i),t.appendChild(o),t}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(n){return e.target}}var p=function(){},h=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},v=function(e,n){return e.map(function(e){return e.toUpperCase()}).indexOf(n.toUpperCase())},D=function(){return new Date(NaN)},C=function(e,n,t){return function(a,i){var o=parseFloat(i);if(o<e||o>n)return D();t(a,o)}},y=function(e,n){var t=parseFloat(n);if(e.setDate(t),e.getDate()!==t)return D()},b=C(1,12,function(e,n){e.setMonth(n-1,1)}),M=C(0,23,function(e,n){e.setHours(n)}),w=C(0,23,function(e,n){e.setHours((e.getHours()>=12?12:0)+n)}),E=C(0,59,function(e,n){e.setSeconds(n)}),x={D:p,F:function(e,n,t){e.setMonth(v(t.months.longhand,n),1)},G:w,H:M,J:y,K:function(e,n,t){e.setHours(e.getHours()%12+12*r(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(v(t.months.shorthand,n),1)},S:E,U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){var a=parseInt(n),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:y,h:w,i:C(0,59,function(e,n){e.setMinutes(n)}),j:y,l:p,m:b,n:b,s:E,u:function(e,n){return new Date(parseFloat(n))},w:p,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},T={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},k={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[k.w(e,n,t)]},F:function(e,n,t){return h(k.n(e,n,t)-1,!1,n)},G:function(e,n,t){return o(k.h(e,n,t))},H:function(e){return o(e.getHours())},J:function(e,n){return void 0!==n.ordinal?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[r(e.getHours()>11)]},M:function(e,n){return h(e.getMonth(),!0,n)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return o(e.getFullYear(),4)},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},S={Y:0,y:0,F:1,M:1,m:1,n:1},_=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o,l=e.isMobile,c=void 0!==l&&l;return function(e,n,a){var i=a||r;return t.formatDate&&!c?t.formatDate(e,n,i):n.split("").map(function(n,a,o){return k[n]&&"\\"!==o[a-1]?k[n](e,i,t):"\\"!==n?n:""}).join("")}},I=function(e){var n=e.config,t=void 0===n?a:n,o=e.l10n,r=void 0===o?i:o;return function(e,n,i,o){var l;if(0===e||e){var c,s=o||r,d=e;if(e instanceof Date)c=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)c=new Date(e);else if("string"==typeof e){var u=n||(t||a).dateFormat,f=String(e).trim();if("today"===f)c=new Date,i=!0;else if(t&&t.parseDate)c=t.parseDate(e,u);else if(/Z$/.test(f)||/GMT$/.test(f))c=new Date(e);else{for(var m=void 0,g=[[],[],[]],p=0,h=0,v="";p<u.length;p++){var D=u[p],C="\\"===D,y="\\"===u[p-1]||C;if(T[D]&&!y){v+=T[D];var b=new RegExp(v,"i").exec(e);b&&(m=!0)&&g[null!==(l=S[D])&&void 0!==l?l:2].push({fn:x[D],val:b[++h]})}else C||(v+=".")}c=t&&t.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),g.forEach(function(e){return e.forEach(function(e){var n=e.fn,t=e.val;return c=n(c,t,s)||c})}),c=m?c:void 0}}if(c instanceof Date&&!isNaN(c.getTime()))return!0===i&&c.setHours(0,0,0,0),c;t.errorHandler(new Error("Invalid date provided: "+d))}}};function O(e,n,t){return void 0===t&&(t=!0),!1!==t?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}var N=function(e,n,t){return 3600*e+60*n+t},Y=864e5;function F(e,n){var t=e.defaultHour,a=e.defaultMinute,i=e.defaultSeconds,o=function(e){return void 0!==e&&0===O(n,e)&&(e.getHours()>0||e.getMinutes()>0||e.getSeconds()>0)},r=function(e){(t=Math.max(t,e.getHours()))===e.getHours()&&(a=Math.max(a,e.getMinutes()))===e.getMinutes()&&(i=Math.max(i,e.getSeconds()))},l=function(e){(t=Math.min(t,e.getHours()))===e.getHours()&&(a=Math.min(a,e.getMinutes()))===e.getMinutes()&&(i=Math.min(i,e.getSeconds()))},c=function(e){return N(e.getHours(),e.getMinutes(),e.getSeconds())};o(e.minDate)&&r(e.minDate),o(e.maxDate)&&l(e.maxDate);var s=e.minTime,d=e.maxTime;if(void 0!==s&&void 0!==d&&c(s)>c(d)){var u=N(t,a,i);u>c(d)&&u<c(s)&&(t=s.getHours(),a=s.getMinutes(),i=s.getSeconds())}else void 0!==d&&l(d),void 0!==s&&r(s);return{hours:t,minutes:a,seconds:i}}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(n){n&&Object.keys(n).forEach(function(t){return e[t]=n[t]})},i=0,o=n;i<o.length;i++){a(o[i])}return e});var P=0;function A(n,t){return e(e(e({},n),t),{weekdays:e(e({},n.weekdays),null==t?void 0:t.weekdays),months:e(e({},n.months),null==t?void 0:t.months)})}function j(i,p){var v,D={config:e(e({},a),L.defaultConfig)},C={},y="flatpickr-"+ ++P,b=i.ownerDocument.defaultView||window,M=b.document,w=[];function E(){var e;return(null===(e=D.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||M.activeElement}function x(e){return e.bind(D)}function k(){var e=D.config;if(void 0===D.weekWrapper&&1===e.showMonths)return void 0!==D.daysContainer&&(D.daysContainer.style.removeProperty("width"),D.calendarContainer.style.removeProperty("width")),void j();!0!==e.noCalendar&&b.requestAnimationFrame(S)}function S(){if(void 0!==D.calendarContainer&&(D.calendarContainer.style.visibility="hidden",D.calendarContainer.style.display="block"),void 0!==D.daysContainer){var e=D.days.offsetWidth;if(0===e)!function(){var e=b.ResizeObserver;if(void 0!==v||void 0===e)return;(v=new e(S)).observe(D.calendarContainer)}();else{var n=(e+1)*D.config.showMonths;D.daysContainer.style.width=n+"px",D.calendarContainer.style.width=n+(void 0!==D.weekWrapper?D.weekWrapper.offsetWidth:0)+"px",j()}D.calendarContainer.style.removeProperty("visibility"),D.calendarContainer.style.removeProperty("display")}}function j(){void 0!==v&&(v.disconnect(),v=void 0)}function H(){return new Date(G(new Date).getTime())}function R(e){if(0===D.selectedDates.length){var n=H(),t=F(D.config,n);n.setHours(t.hours,t.minutes,t.seconds,n.getMilliseconds()),D.selectedDates=[n],D.latestSelectedDateObj=n}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var n="keydown"===e.type,t=g(e),a=t;void 0!==D.amPM&&t===D.amPM&&(D.amPM.textContent=D.l10n.amPM[r(D.amPM.textContent===D.l10n.amPM[0])]);var i=parseFloat(a.getAttribute("min")),l=parseFloat(a.getAttribute("max")),c=ae(a),s=parseInt(a.value,10),d=e.delta||(n?38===e.which?1:-1:0),u=s+c*d;if(void 0!==a.value&&2===a.value.length){var f=a===D.hourElement,m=a===D.minuteElement;u<i?(u=l+u+r(!f)+(r(f)&&r(!D.amPM)),m&&te(void 0,-1,D.hourElement)):u>l&&(u=a===D.hourElement?u-l-r(!D.amPM):i,m&&te(void 0,1,D.hourElement)),D.amPM&&f&&(1===c?u+s===23:Math.abs(u-s)>c)&&(D.amPM.textContent=D.l10n.amPM[r(D.amPM.textContent===D.l10n.amPM[0])]),a.value=o(u)}}(e);var a=D._input.value;B(),an(),D._input.value!==a&&D._debouncedChange()}function W(e,n){var t=parseInt(e,10);return isNaN(t)&&void 0!==n?n:t||0}function B(){if(void 0!==D.hourElement&&void 0!==D.minuteElement){var e,n,t=D.latestSelectedDateObj,a=W(D.hourElement.value.slice(-2),t&&t.getHours())%24,i=W(D.minuteElement.value,t&&t.getMinutes())%60,o=void 0!==D.secondElement?W(D.secondElement.value,t&&t.getSeconds())%60:0;void 0!==D.amPM&&(e=a,n=D.amPM.textContent,a=e%12+12*r(n===D.l10n.amPM[1]));var l=void 0!==D.config.minTime||D.config.minDate&&D.minDateHasTime&&D.latestSelectedDateObj&&0===O(D.latestSelectedDateObj,D.config.minDate,!0),c=void 0!==D.config.maxTime||D.config.maxDate&&D.maxDateHasTime&&D.latestSelectedDateObj&&0===O(D.latestSelectedDateObj,D.config.maxDate,!0);if(void 0!==D.config.maxTime&&void 0!==D.config.minTime&&D.config.minTime>D.config.maxTime){var s=N(D.config.minTime.getHours(),D.config.minTime.getMinutes(),D.config.minTime.getSeconds()),d=N(D.config.maxTime.getHours(),D.config.maxTime.getMinutes(),D.config.maxTime.getSeconds()),u=N(a,i,o);if(u>d&&u<s){var f=function(e){var n=Math.floor(e/3600),t=(e-3600*n)/60;return[n,t,e-3600*n-60*t]}(s);a=f[0],i=f[1],o=f[2]}}else{if(c){var m=void 0!==D.config.maxTime?D.config.maxTime:D.config.maxDate;(a=Math.min(a,m.getHours()))===m.getHours()&&(i=Math.min(i,m.getMinutes()))===m.getMinutes()&&(o=Math.min(o,m.getSeconds()))}if(l){var g=void 0!==D.config.minTime?D.config.minTime:D.config.minDate;(a=Math.max(a,g.getHours()))===g.getHours()&&(i=Math.max(i,g.getMinutes()))===g.getMinutes()&&(o=Math.max(o,g.getSeconds()))}}J(a,i,o)}}function K(e){var n=e||D.latestSelectedDateObj;n&&J(n.getHours(),n.getMinutes(),n.getSeconds())}function U(){var e=F(D.config,H());J(e.hours,e.minutes,e.seconds)}function J(e,n,t){void 0!==D.latestSelectedDateObj&&D.latestSelectedDateObj.setHours(e%24,n,t||0,0),D.hourElement&&D.minuteElement&&!D.isMobile&&(D.hourElement.value=o(D.config.time_24hr?e:(12+e)%12+12*r(e%12==0)),D.minuteElement.value=o(n),void 0!==D.amPM&&(D.amPM.textContent=D.l10n.amPM[r(e>=12)]),void 0!==D.secondElement&&(D.secondElement.value=o(t)))}function V(e){var n=g(e);if(-1!==D.yearElements.indexOf(n)){var t=parseInt(n.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&we(t)}}function q(e,n,t,a){return n instanceof Array?n.forEach(function(n){return q(e,n,t,a)}):e instanceof Array?e.forEach(function(e){return q(e,n,t,a)}):(e.addEventListener(n,t,a),void D._handlers.push({remove:function(){return e.removeEventListener(n,t,a)}}))}function $(){Ze("onChange")}function z(){w.forEach(function(e){return e.remove()}),w=[]}function X(){if(void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement){q(D.timeContainer,["increment"],R),q(D.timeContainer,"blur",R,{capture:!0}),q(D.timeContainer,"click",ne),q([D.hourElement,D.minuteElement],["focus","click"],function(e){return g(e).select()}),void 0!==D.secondElement&&q(D.secondElement,"focus",function(){return D.secondElement&&D.secondElement.select()}),void 0!==D.amPM&&q(D.amPM,"click",function(e){R(e)})}}function G(e){var n=D.config,t=n.minDate,a=n.maxDate;return t&&t.getTime()>e.getTime()?t:a&&a.getTime()<e.getTime()?a:e}function Z(e){var n=12*D.currentYear+D.currentMonth,t=12*e.getFullYear()+e.getMonth();return t>=n&&t<n+D.config.showMonths}function Q(e,n){var t=void 0!==e?D.parseDate(e):D.latestSelectedDateObj||G(D.now),a=D.currentYear,i=D.currentMonth;try{void 0!==t&&(D.currentYear=t.getFullYear(),D.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,D.config.errorHandler(e)}n&&ee(a,i),D.redraw()}function ee(e,n){D.currentYear!==e&&Ze("onYearChange"),D.currentYear===e&&D.currentMonth===n||Ze("onMonthChange")}function ne(e){var n=g(e);~n.className.indexOf("arrow")&&te(e,n.classList.contains("arrowUp")?1:-1)}function te(e,n,t){var a=e&&g(e),i=t||a&&a.parentNode&&a.parentNode.firstChild,o=Qe("increment");o.delta=n,i&&i.dispatchEvent(o)}function ae(e){var n;return Number(e===D.hourElement?D.config.hourIncrement:e===D.minuteElement?D.config.minuteIncrement:null!==(n=D.config.secondIncrement)&&void 0!==n?n:D.config.minuteIncrement)}function ie(e,n,t,a){var i=Ee(n,!0),o=d("span",e,n.getDate().toString());return o.dateObj=n,o.$i=a,o.setAttribute("aria-label",D.formatDate(n,D.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===O(n,D.now)&&(D.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?o.tabIndex=-1:o.classList.add("flatpickr-disabled"),en(n)&&(o.classList.add("selected"),i&&(D.selectedDateElem=o),"range"===D.config.mode&&(s(o,"startRange",D.selectedDates[0]&&0===O(n,D.selectedDates[0],!0)),s(o,"endRange",D.selectedDates[1]&&0===O(n,D.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange"))),"range"===D.config.mode&&function(e){return!("range"!==D.config.mode||D.selectedDates.length<2)&&(O(e,D.selectedDates[0])>=0&&O(e,D.selectedDates[1])<=0)}(n)&&!en(n)&&o.classList.add("inRange"),D.weekNumbers&&1===D.config.showMonths&&"prevMonthDay"!==e&&a%7==6&&D.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+D.config.getWeek(n)+"</span>"),Ze("onDayCreate",o),o}function oe(e){e.focus(),"range"===D.config.mode&&Oe(e)}function re(e){for(var n=e>0?0:D.config.showMonths-1,t=e>0?D.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=D.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&Ee(c.dateObj))return c}}function le(e,n){for(var t=n>0?D.config.maxDate:D.config.minDate,a=0;a<=3653;a++){var i=new Date(e.getFullYear(),e.getMonth(),e.getDate()+a*n);if(void 0!==t&&O(i,t)*n>0)return;if(Ee(i))return i}}function ce(e){for(var n=D.daysContainer.querySelectorAll(".flatpickr-day:not(.hidden)"),t=0;t<n.length;t++)if(0===O(n[t].dateObj,e))return n[t]}function se(e){if(void 0===ce(e)){var n=12*D.currentYear+D.currentMonth,t=12*e.getFullYear()+e.getMonth();ye(t<n?t-n:t-(n+D.config.showMonths-1))}var a=ce(e);void 0!==a&&oe(a)}function de(e,n){if(void 0!==D.daysContainer&&D.rContainer.contains(D.daysContainer)){var t=E(),a=n>0?1:-1,i=null!==t&&t.classList.contains("flatpickr-day")&&xe(t),o=void 0!==e?e:i?t:void 0!==D.selectedDateElem&&xe(D.selectedDateElem)?D.selectedDateElem:void 0!==D.todayDateElem&&xe(D.todayDateElem)?D.todayDateElem:re(a);if(void 0===o)void 0!==(r=0!==n?le(a>0?new Date(D.currentYear,D.currentMonth+D.config.showMonths,1):new Date(D.currentYear,D.currentMonth,0),a):void 0)?se(r):D.daysContainer.focus();else if(i){var r,l=o.dateObj;void 0!==(r=le(new Date(l.getFullYear(),l.getMonth(),l.getDate()+n),a))&&se(r)}else oe(o)}}function ue(e,n){for(var t=(new Date(e,n,1).getDay()-D.l10n.firstDayOfWeek+7)%7,a=D.utils.getDaysInMonth((n-1+12)%12,e),i=D.utils.getDaysInMonth(n,e),o=M.createDocumentFragment(),r=D.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-t,u=0;s<=a;s++,u++)o.appendChild(ie("flatpickr-day "+l,new Date(e,n-1,s),0,u));for(s=1;s<=i;s++,u++)o.appendChild(ie("flatpickr-day",new Date(e,n,s),0,u));for(var f=i+1;f<=42-t&&(1===D.config.showMonths||u%7!=0);f++,u++)o.appendChild(ie("flatpickr-day "+c,new Date(e,n+1,f%i),0,u));var m=d("div","dayContainer");return m.appendChild(o),m}function fe(){if(void 0!==D.daysContainer){u(D.daysContainer),D.weekNumbers&&u(D.weekNumbers);for(var e=M.createDocumentFragment(),n=0;n<D.config.showMonths;n++){var t=new Date(D.currentYear,D.currentMonth,1);t.setMonth(D.currentMonth+n),e.appendChild(ue(t.getFullYear(),t.getMonth()))}D.daysContainer.appendChild(e),D.days=D.daysContainer.firstChild,"range"===D.config.mode&&1===D.selectedDates.length&&Oe(),Ze("onDaysBuilt")}}function me(){if(!(void 0===D.monthsDropdownContainer||D.config.showMonths>1||"dropdown"!==D.config.monthSelectorType)){var e=function(e){return!(void 0!==D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&e<D.config.minDate.getMonth())&&!(void 0!==D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()&&e>D.config.maxDate.getMonth())};D.monthsDropdownContainer.tabIndex=-1,D.monthsDropdownContainer.innerHTML="";for(var n=0;n<12;n++)if(e(n)){var t=d("option","flatpickr-monthDropdown-month");t.value=new Date(D.currentYear,n).getMonth().toString(),t.textContent=h(n,D.config.shorthandCurrentMonth,D.l10n),D.currentMonth===n&&(t.selected=!0),D.monthsDropdownContainer.appendChild(t)}}}function ge(e){var n,t=d("div","flatpickr-month"),a=M.createDocumentFragment();D.config.showMonths>1||"static"===D.config.monthSelectorType?n=d("span","cur-month"):(D.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),D.monthsDropdownContainer.id=y+"-month",D.monthsDropdownContainer.setAttribute("aria-label",D.l10n.monthAriaLabel),q(D.monthsDropdownContainer,"change",function(e){var n=g(e),t=parseInt(n.value,10);D.changeMonth(t-D.currentMonth)}),me(),n=D.monthsDropdownContainer);var i=m("cur-year",{id:y+"-year-"+e,tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",D.l10n.yearAriaLabel),D.config.minDate&&o.setAttribute("min",D.config.minDate.getFullYear().toString()),D.config.maxDate&&(o.setAttribute("max",D.config.maxDate.getFullYear().toString()),o.disabled=!!D.config.minDate&&D.config.minDate.getFullYear()===D.config.maxDate.getFullYear());var r=d("div","flatpickr-current-month");return r.appendChild(n),r.appendChild(i),a.appendChild(r),t.appendChild(a),{container:t,yearElement:o,monthElement:n}}function pe(){u(D.monthNav),D.monthNav.appendChild(D.prevMonthNav),D.config.showMonths&&(D.yearElements=[],D.monthElements=[]);for(var e=0;e<D.config.showMonths;e++){var n=ge(e);D.yearElements.push(n.yearElement),D.monthElements.push(n.monthElement),D.monthNav.appendChild(n.container)}D.monthNav.appendChild(D.nextMonthNav)}function he(){D.calendarContainer.classList.add("hasTime"),D.config.noCalendar&&D.calendarContainer.classList.add("noCalendar");var e=F(D.config,H());D.timeContainer=d("div","flatpickr-time"),D.timeContainer.tabIndex=-1;var n=d("span","flatpickr-time-separator",":"),t=m("flatpickr-hour",{id:y+"-hour","aria-label":D.l10n.hourAriaLabel});D.hourElement=t.getElementsByTagName("input")[0];var a=m("flatpickr-minute",{id:y+"-minute","aria-label":D.l10n.minuteAriaLabel});if(D.minuteElement=a.getElementsByTagName("input")[0],D.hourElement.tabIndex=D.minuteElement.tabIndex=-1,D.hourElement.value=o(D.latestSelectedDateObj?D.latestSelectedDateObj.getHours():D.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),D.minuteElement.value=o(D.latestSelectedDateObj?D.latestSelectedDateObj.getMinutes():e.minutes),D.hourElement.setAttribute("min",D.config.time_24hr?"0":"1"),D.hourElement.setAttribute("max",D.config.time_24hr?"23":"12"),D.minuteElement.setAttribute("min","0"),D.minuteElement.setAttribute("max","59"),D.timeContainer.appendChild(t),D.timeContainer.appendChild(n),D.timeContainer.appendChild(a),D.config.time_24hr&&D.timeContainer.classList.add("time24hr"),D.config.enableSeconds){D.timeContainer.classList.add("hasSeconds");var i=m("flatpickr-second",{id:y+"-second","aria-label":D.l10n.secondAriaLabel});D.secondElement=i.getElementsByTagName("input")[0],D.secondElement.value=o(D.latestSelectedDateObj?D.latestSelectedDateObj.getSeconds():e.seconds),D.secondElement.setAttribute("min","0"),D.secondElement.setAttribute("max","59"),D.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),D.timeContainer.appendChild(i)}return D.config.time_24hr||(D.amPM=d("span","flatpickr-am-pm",D.l10n.amPM[r((D.latestSelectedDateObj?D.hourElement.value:e.hours)>11)]),D.amPM.title=D.l10n.toggleTitle,D.amPM.tabIndex=-1,D.timeContainer.appendChild(D.amPM)),D.timeContainer}function ve(){if(D.isMobile)return ze();var e=D.timeContainer;D.timeContainer=D.hourElement=D.minuteElement=void 0,D.secondElement=D.amPM=void 0,D.calendarContainer.classList.remove("hasTime"),D.calendarContainer.classList.remove("noCalendar"),D.config.enableTime&&(D.calendarContainer.insertBefore(he(),e||(D.innerContainer?D.innerContainer.nextSibling:D.calendarContainer.firstChild)),X(),K()),e&&D.calendarContainer.removeChild(e)}function De(){D.weekdayContainer?u(D.weekdayContainer):D.weekdayContainer=d("div","flatpickr-weekdays");for(var e=D.config.showMonths;e--;){var n=d("div","flatpickr-weekdaycontainer");D.weekdayContainer.appendChild(n)}return Ce(),D.weekdayContainer}function Ce(){if(D.weekdayContainer){var e=D.l10n.firstDayOfWeek,t=n(D.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=n(t.splice(e,t.length),t.splice(0,e)));for(var a=function(e){var n=D.weekdayContainer.children[e];u(n),t.forEach(function(e){return n.appendChild(d("span","flatpickr-weekday",e))})},i=D.config.showMonths;i--;)a(i)}}function ye(e,n){void 0===n&&(n=!0);var t=n?e:e-D.currentMonth;t<0&&!0===D._hidePrevMonthArrow||t>0&&!0===D._hideNextMonthArrow||(D.currentMonth+=t,(D.currentMonth<0||D.currentMonth>11)&&(D.currentYear+=Math.floor(D.currentMonth/12),D.currentMonth=(D.currentMonth%12+12)%12,Ze("onYearChange"),me()),fe(),Ze("onMonthChange"),nn())}function be(e){return D.calendarContainer.contains(e)}function Me(e){var n=g(e),t=be(n),a=!(n===D.input||n===D.altInput||D.element.contains(n))&&!t&&!be(e.relatedTarget),i=!D.config.ignoredFocusElements.some(function(e){return e.contains(n)});if(a&&i){var o=D.config.allowInput?ke():void 0;if(void 0===o&&void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&""!==D.input.value&&void 0!==D.input.value&&R(),D.close(),void 0===D.config)return;"range"===D.config.mode&&1===D.selectedDates.length&&D.clear(!1),Se(o)}}function we(e){if(!(!e||isNaN(new Date(e,D.currentMonth,1).getTime())||D.config.minDate&&e<D.config.minDate.getFullYear()||D.config.maxDate&&e>D.config.maxDate.getFullYear())){var n=e,t=D.currentYear!==n;D.currentYear=n||D.currentYear,D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth=Math.min(D.config.maxDate.getMonth(),D.currentMonth):D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&(D.currentMonth=Math.max(D.config.minDate.getMonth(),D.currentMonth)),t&&(D.redraw(),Ze("onYearChange"))}}function Ee(e,n){var t;void 0===n&&(n=!0);var a=D.parseDate(e,void 0,n);if(D.config.minDate&&a&&O(a,D.config.minDate,n||!D.minDateHasTime)<0||D.config.maxDate&&a&&O(a,D.config.maxDate,n||!D.maxDateHasTime)>0)return!1;if(!D.config.enable&&0===D.config.disable.length)return!0;if(void 0===a)return!1;var i=new Date(a.getTime());i.setHours(0,0,0,0);for(var o=!!D.config.enable,r=null!==(t=D.config.enable)&&void 0!==t?t:D.config.disable,l=0,c=void 0;l<r.length;l++){if("function"==typeof(c=r[l])&&c(i))return o;if(c instanceof Date&&c.getTime()===i.getTime())return o;if("string"==typeof c){var s=D.parseDate(c,void 0,!0);return s&&s.getTime()===i.getTime()?o:!o}if("object"==typeof c&&c.from&&c.to&&i.getTime()>=c.from.getTime()&&i.getTime()<=c.to.getTime())return o}return!o}function xe(e){return void 0!==D.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&D.daysContainer.contains(e))}function Te(e){e.target!==D._input||e.relatedTarget&&be(e.relatedTarget)||Se(ke())}function ke(){var e=D._typedValue();if(void 0!==e){var n={times:_e(),year:D.currentYear,month:D.currentMonth};return D.setDate(e,!1,D.config.altInput?D.config.altFormat:D.config.dateFormat),void 0!==D.hourElement&&(B(),an(!1)),n}}function Se(e){void 0!==e&&(ee(e.year,e.month),_e()!==e.times&&(D.selectedDates.length>0&&Ze("onValueUpdate"),Ze("onChange")))}function _e(){return D.selectedDates.map(function(e){return e.getTime()}).join()}function Ie(e){var n=g(e),t=D.config.wrap?i.contains(n):n===D._input,a=D.config.allowInput,o=a&&t&&27!==e.keyCode,r=D.isOpen&&!o,l=D.config.inline&&t&&!a,c=n===D.monthsDropdownContainer&&e.keyCode>=37&&e.keyCode<=40;if(13===e.keyCode&&t){if(a)return Se(ke()),D.close(),n.blur();D.open()}else if(!c&&(be(n)||r||l)){var s=!!D.timeContainer&&D.timeContainer.contains(n);switch(e.keyCode){case 13:s?(e.preventDefault(),R(),Be()):Ke(e);break;case 27:e.preventDefault(),Be();break;case 8:case 46:t&&!D.config.allowInput&&(e.preventDefault(),D.clear());break;case 37:case 39:if(s||t)D.hourElement&&D.hourElement.focus();else{e.preventDefault();var d=E();if(void 0!==D.daysContainer&&(!1===a||d&&xe(d))){var u=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),ye(u),de(re(1),0)):de(void 0,u)}}break;case 38:case 40:e.preventDefault();var f=40===e.keyCode?1:-1;D.daysContainer&&void 0!==n.$i||n===D.input||n===D.altInput||n===D.daysContainer?e.ctrlKey?(e.stopPropagation(),we(D.currentYear-f),de(re(1),0)):s||de(void 0,7*f):n===D.currentYearElement?we(D.currentYear-f):D.config.enableTime&&(!s&&D.hourElement&&D.hourElement.focus(),R(e),D._debouncedChange());break;case 9:if(s){var m=[D.hourElement,D.minuteElement,D.secondElement,D.amPM].concat(D.pluginElements).filter(function(e){return e}),p=m.indexOf(n);if(-1!==p){var h=m[p+(e.shiftKey?-1:1)];e.preventDefault(),(h||D._input).focus()}}else!D.config.noCalendar&&D.daysContainer&&D.daysContainer.contains(n)&&e.shiftKey&&(e.preventDefault(),D._input.focus())}}if(void 0!==D.amPM&&n===D.amPM)switch(e.key){case D.l10n.amPM[0].charAt(0):case D.l10n.amPM[0].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[0],B(),an();break;case D.l10n.amPM[1].charAt(0):case D.l10n.amPM[1].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[1],B(),an()}(t||be(n))&&Ze("onKeyDown",e)}function Oe(e,n){if(void 0===n&&(n="flatpickr-day"),1===D.selectedDates.length&&(!e||e.classList.contains(n)&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():D.days.firstElementChild.dateObj.getTime(),a=D.parseDate(D.selectedDates[0],void 0,!0).getTime(),i=Math.min(t,D.selectedDates[0].getTime()),o=Math.max(t,D.selectedDates[0].getTime()),r=!1,l=0,c=0,s=i;s<o;s+=Y)Ee(new Date(s),!0)||(r=r||s>i&&s<o,s<a&&(!l||s>l)?l=s:s>a&&(!c||s<c)&&(c=s));Array.prototype.slice.call(D.rContainer.querySelectorAll("*:nth-child(-n+"+D.config.showMonths+") > ."+n)).forEach(function(n){var i,o,s,d=n.dateObj.getTime(),u=l>0&&d<l||c>0&&d>c;if(u)return n.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)});r&&!u||(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),void 0!==e&&(e.classList.add(t<=D.selectedDates[0].getTime()?"startRange":"endRange"),a<t&&d===a?n.classList.add("startRange"):a>t&&d===a&&n.classList.add("endRange"),d>=l&&(0===c||d<=c)&&(o=a,s=t,(i=d)>Math.min(o,s)&&i<Math.max(o,s))&&n.classList.add("inRange")))})}}function Ne(){!D.isOpen||D.config.static||D.config.inline||Le()}function Ye(e){return function(n){var t=D.config["_"+e+"Date"]=D.parseDate(n,D.config.dateFormat),a=D.config["_"+("min"===e?"max":"min")+"Date"];void 0!==t&&(D["min"===e?"minDateHasTime":"maxDateHasTime"]=t.getHours()>0||t.getMinutes()>0||t.getSeconds()>0),D.selectedDates&&(D.config.allowInvalidPreload||(D.selectedDates=Je(D.selectedDates,!0)),D.latestSelectedDateObj&&-1===D.selectedDates.indexOf(D.latestSelectedDateObj)&&(D.latestSelectedDateObj=D.selectedDates[D.selectedDates.length-1]),D.selectedDates.length||U(),an()),D.daysContainer&&(We(),void 0!==t?D.currentYearElement[e]=t.getFullYear().toString():D.currentYearElement.removeAttribute(e),D.currentYearElement.disabled=!!a&&void 0!==t&&a.getFullYear()===t.getFullYear()),void 0!==D.mobileInput&&Xe(e)}}function Fe(){var e=L.defaultConfig.dateFormat||a.dateFormat,n=L.defaultConfig.altFormat||a.altFormat,t="time"===C.mode;if(!C.enableTime&&!t)return{dateFormat:e,altFormat:n};var i=C.noCalendar||t,o=C.enableSeconds?":S":"";return{dateFormat:i?"H:i"+o:e+" H:i"+o,altFormat:C.altInput?i?"h:i"+o+" K":n+" h:i"+o+" K":n}}function Pe(){var e=Fe();void 0===C.dateFormat&&(D.config.dateFormat=e.dateFormat),void 0===C.altFormat&&(D.config.altFormat=e.altFormat)}function Ae(){if(!D.config.wrap)return i;var e=i.querySelector("[data-input]");if(!e)throw new Error('flatpickr: "wrap" needs an input with the data-input attribute inside the element');return e}function je(){"object"!=typeof D.config.locale&&void 0===L.l10ns[D.config.locale]&&D.config.errorHandler(new Error("flatpickr: invalid locale "+D.config.locale)),He(D.config.locale),void 0===C.time_24hr&&void 0===L.defaultConfig.time_24hr&&(D.config.time_24hr=D.l10n.time_24hr),D.formatDate=_(D)}function He(e){D.l10n=A(L.l10ns.default,"object"==typeof e?e:"default"!==e?L.l10ns[e]:void 0),T.D="("+D.l10n.weekdays.shorthand.join("|")+")",T.l="("+D.l10n.weekdays.longhand.join("|")+")",T.M="("+D.l10n.months.shorthand.slice().sort(function(e,n){return n.length-e.length}).join("|")+")",T.F="("+D.l10n.months.longhand.slice().sort(function(e,n){return n.length-e.length}).join("|")+")",T.K="("+D.l10n.amPM[0]+"|"+D.l10n.amPM[1]+")",D.parseDate=I({config:D.config,l10n:D.l10n})}function Le(e){if("function"!=typeof D.config.position){if(void 0!==D.calendarContainer){Ze("onPreCalendarPosition");var n=D.config.static&&!D.config.inline?D.calendarContainer.parentNode:void 0,t=n||e||D._positionElement,a=D.calendarContainer.offsetHeight,i=D.calendarContainer.offsetWidth,o=D.config.position.split(" "),r=o[0],l=o.length>1?o[1]:null,c=t.getBoundingClientRect(),d=b.innerHeight-c.bottom,u="above"!==r&&"below"!==r,f=d>=a,m=c.top>a,g=u&&!f&&!m&&!D.config.static&&!D.config.inline,p=g?c.top>d:"above"===r||u&&!f&&m&&(void 0===n||c.top-function(e){for(var n,t=0,a=e;null!==a;a=a.assignedSlot||a.parentElement||(null===(n=a.parentNode)||void 0===n?void 0:n.host)||null)"visible"!==b.getComputedStyle(a).overflowY&&(t=Math.max(t,a.getBoundingClientRect().top+a.clientTop));return t}(n)>a),h=b.pageYOffset+c.top+(p?-a-2:t.offsetHeight+2),v=g?Math.max(b.pageYOffset,Math.min(h,b.pageYOffset+b.innerHeight-a)):h;if(s(D.calendarContainer,"arrowTop",!g&&!p),s(D.calendarContainer,"arrowBottom",!g&&p),!D.config.inline){var C=b.pageXOffset+c.left,y=!1,w=!1;"center"===l?(C-=(i-c.width)/2,y=!0):"right"===l&&(C-=i-c.width,w=!0),s(D.calendarContainer,"arrowLeft",!y&&!w),s(D.calendarContainer,"arrowCenter",y),s(D.calendarContainer,"arrowRight",w);var E=M.body.offsetWidth,x=b.pageXOffset+c.right,T=C+i>E,k=T&&x<i;if(s(D.calendarContainer,"rightMost",T),!D.config.static){s(D.calendarContainer,"centerMost",k),k?(s(D.calendarContainer,"rightMost",!1),C=Math.max(0,E/2-i/2),D.calendarContainer.style.setProperty("--fp-arrow-left",b.pageXOffset+c.left-C+"px")):T&&(C=x-i);var S=function(){var e=D.calendarContainer.offsetParent;e===M.body&&Re(M.body)&&(e=Re(M.documentElement)?null:M.documentElement);if(null===e)return{top:0,left:0};var n=e.getBoundingClientRect(),t=e===M.documentElement;return{top:b.pageYOffset+n.top+e.clientTop-(t?0:e.scrollTop),left:b.pageXOffset+n.left+e.clientLeft-(t?0:e.scrollLeft)}}();D.calendarContainer.style.top=v-S.top+"px",D.calendarContainer.style.left=C-S.left+"px",D.calendarContainer.style.right="auto"}}}}else D.config.position(D,e)}function Re(e){return"static"===b.getComputedStyle(e).position}function We(){D.config.noCalendar||D.isMobile||(me(),nn(),fe())}function Be(){D._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(D.close,0):D.close()}function Ke(e){e.preventDefault(),e.stopPropagation(),"range"===D.config.mode&&Oe(g(e));var n=f(g(e),function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==n){var t=n,a=_e(),i=D.latestSelectedDateObj=new Date(t.dateObj.getTime()),o=!Z(i)&&"range"!==D.config.mode;if(D.selectedDateElem=t,"single"===D.config.mode)D.selectedDates=[i];else if("multiple"===D.config.mode){var r=en(i);r?D.selectedDates.splice(parseInt(r),1):D.selectedDates.push(i)}else"range"===D.config.mode&&(2===D.selectedDates.length&&D._startNewRange(),D.latestSelectedDateObj=i,D.selectedDates.push(i),0!==O(i,D.selectedDates[0],!0)&&D.selectedDates.sort(function(e,n){return e.getTime()-n.getTime()}));if(B(),o){var l=D.currentYear!==i.getFullYear();D.currentYear=i.getFullYear(),D.currentMonth=i.getMonth(),l&&(Ze("onYearChange"),me()),Ze("onMonthChange")}if(nn(),fe(),an(),void 0!==D.hourElement?D.hourElement.focus():de(ce(i),0),D.config.closeOnSelect){var c="single"===D.config.mode&&!D.config.enableTime,s="range"===D.config.mode&&2===D.selectedDates.length&&!D.config.enableTime;(c||s)&&Be()}_e()!==a&&$()}}D._handlers=[],D.pluginElements=[],D.loadedPlugins=[],D._bind=q,D._setHoursFromDate=K,D._positionCalendar=Le,D._showValue=function(){D.input.value=tn(D.config.dateFormat),void 0!==D.altInput&&(D.altInput.value=tn(D.config.altFormat))},D._typedValue=function(){return D._input.value.replace(/\s+$/,"")===tn()?void 0:D._input.value},D._startNewRange=function(){D.clear(!1,!1)},D._getIncrement=ae,D.changeMonth=ye,D.changeYear=we,D.clear=function(e,n){void 0===e&&(e=!0);void 0===n&&(n=!0);void 0!==D.mobileInput&&(D.mobileInput.value="");if(D.selectedDates=[],D.latestSelectedDateObj=void 0,D._showValue(),!0===n){var t=G(D._initialDate);D.currentYear=t.getFullYear(),D.currentMonth=t.getMonth()}!0===D.config.enableTime&&U();D.redraw(),e&&Ze("onChange")},D.close=function(){if(D.isOpen&&D.selectedDates.length>0&&!D.selectedDates.some(Z)){var e=D.currentYear,n=D.currentMonth;Q(),ee(e,n)}D.isOpen=!1,z(),D.isMobile||(void 0!==D.calendarContainer&&D.calendarContainer.classList.remove("open"),void 0!==D._input&&D._input.classList.remove("active"));Ze("onClose")},D.onMouseOver=Oe,D._createElement=d,D.createDay=ie,D.destroy=function(){void 0!==D.config&&Ze("onDestroy");for(var e=D._handlers.length;e--;)D._handlers[e].remove();if(D._handlers=[],z(),j(),D.mobileInput)D.mobileInput.parentNode&&D.mobileInput.parentNode.removeChild(D.mobileInput),D.mobileInput=void 0;else if(D.calendarContainer&&D.calendarContainer.parentNode)if(D.config.static&&D.calendarContainer.parentNode){var n=D.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else D.calendarContainer.parentNode.removeChild(D.calendarContainer);D.altInput&&(D.input.type="text",D.altInput.parentNode&&D.altInput.parentNode.removeChild(D.altInput),delete D.altInput);D.input&&(D.input.type=D.input._type,D.input.classList.remove("flatpickr-input"),D.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete D[e]}catch(e){}})},D.isEnabled=Ee,D.jumpToDate=Q,D.updateValue=an,D.open=function(e,n){void 0===n&&(n=D._positionElement);if(!0===D.isMobile){if(e){e.preventDefault();var t=g(e);t&&t.blur()}if(void 0!==D.mobileInput){D.mobileInput.focus();try{D.mobileInput.showPicker()}catch(e){D.mobileInput.click()}}return void Ze("onOpen")}if(D._input.disabled||D.config.inline)return;var a=D.isOpen;D.isOpen=!0,a||(!function(){var e=function(e,n,t,a){e.addEventListener(n,t,a),w.push({remove:function(){return e.removeEventListener(n,t,a)}})};D.config.static||e(b,"resize",l(Ne,50));void 0===b.ontouchstart?e(M,"mousedown",Me):void 0===b.PointerEvent?e(M,"touchstart",Me):(e(M,"pointerdown",function(e){"mouse"===e.pointerType&&Me(e)}),e(M,"pointerup",function(e){"mouse"!==e.pointerType&&Me(e)}));e(M,"focus",Me,{capture:!0})}(),D.calendarContainer.classList.add("open"),D._input.classList.add("active"),void 0!==v&&S(),Ze("onOpen"),Le(n));!0===D.config.enableTime&&!0===D.config.noCalendar&&(!1!==D.config.allowInput||void 0!==e&&D.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return D.hourElement.select()},50))},D.redraw=We,D.set=function(e,n){var a,i=null!==e&&"object"==typeof e?e:((a={})[e]=n,a),o=Object.keys(i);o.forEach(function(e){C[e]=i[e],D.config[e]=t.indexOf(e)>-1?c(i[e]):i[e]}),o.forEach(function(e){var n=Ue[e];void 0!==n&&n.forEach(function(e){return e()})}),D.redraw(),an(!0)},D.setDate=function(e,n,t){void 0===n&&(n=!1);void 0===t&&(t=D.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return D.clear(n);Ve(e,t),D.latestSelectedDateObj=D.selectedDates[D.selectedDates.length-1],D.redraw(),Q(void 0,n),K(),0===D.selectedDates.length&&D.clear(!1);an(n),n&&Ze("onChange")},D.toggle=function(e){if(!0===D.isOpen)return D.close();D.open(e)};var Ue={locale:[je,Ce,ve],showMonths:[pe,k,De],minDate:[Q],maxDate:[Q],positionElement:[$e],enableTime:[Pe,ve],enableSeconds:[Pe,ve],time_24hr:[ve],clickOpens:[function(){!0===D.config.clickOpens?(q(D._input,"focus",D.open),q(D._input,"click",D.open)):(D._input.removeEventListener("focus",D.open),D._input.removeEventListener("click",D.open))}]};function Je(e,n){var t=e.filter(function(e){return Ee(e,n)});return"range"===D.config.mode&&t.length<e.length?[]:t}function Ve(e,n){var t=[];if(e instanceof Array)t=e.map(function(e){return D.parseDate(e,n)});else if(e instanceof Date||"number"==typeof e)t=[D.parseDate(e,n)];else if("string"==typeof e)switch(D.config.mode){case"single":case"time":t=[D.parseDate(e,n)];break;case"multiple":var a=D.config.conjunction;t=e.split(a.replace(/\s+$/,"")||a).map(function(e){return D.parseDate(e.trim(),n)});break;case"range":1!==(t=e.split(D.l10n.rangeSeparator).map(function(e){return D.parseDate(e,n)})).length||D.config.enableTime||t.push(D.parseDate(e,n))}else D.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));var i=t.filter(function(e){return e instanceof Date});D.selectedDates=D.config.allowInvalidPreload?i:Je(i,!1),"range"===D.config.mode&&D.selectedDates.sort(function(e,n){return e.getTime()-n.getTime()})}function qe(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?D.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:D.parseDate(e.from,void 0),to:D.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function $e(){D._positionElement=D.config.positionElement||D._input}function ze(){var e=D.mobileInput,n=D.config.enableTime?D.config.noCalendar?"time":"datetime-local":"date";e.type=n,D.mobileFormatStr="datetime-local"===n?"Y-m-d\\TH:i:S":"date"===n?"Y-m-d":"H:i:S";var t=D.input.getAttribute("step")||(D.config.enableSeconds?"1":"");t?e.step=t:e.removeAttribute("step"),Xe("min"),Xe("max")}function Xe(e){var n=D.mobileInput,t=D.config[e+"Date"];if(void 0===t)return n.removeAttribute(e);var a="min"===e&&"date"!==n.type?Math.ceil:Math.floor,i=new Date(t.getTime());"max"!==e||D.maxDateHasTime||i.setHours(23,59,59,999),n[e]=Ge(i,a)}function Ge(e,n){void 0===n&&(n=Math.floor);var t=D.mobileInput.step,a=Number(t||60)%60==0?60:1,i=new Date(e.getTime()),o=i.getSeconds()+i.getMilliseconds()/1e3;return i.setSeconds(n(o/a)*a,0),D.formatDate(i,D.mobileFormatStr)}function Ze(e,n){if(void 0!==D.config){var t=D.config[e];if(void 0!==t&&t.length>0)for(var a=0;t[a]&&a<t.length;a++)t[a](D.selectedDates,D.input.value,D,n);"onChange"===e&&(D.input.dispatchEvent(Qe("change")),D.input.dispatchEvent(Qe("input")))}}function Qe(e){var n=M.createEvent("Event");return n.initEvent(e,!0,!0),n}function en(e){for(var n=0;n<D.selectedDates.length;n++)if(0===O(D.selectedDates[n],e))return""+n;return!1}function nn(){D.config.noCalendar||D.isMobile||!D.monthNav||(D.yearElements.forEach(function(e,n){var t=new Date(D.currentYear,D.currentMonth,1);t.setMonth(D.currentMonth+n),D.config.showMonths>1||"static"===D.config.monthSelectorType?D.monthElements[n].textContent=h(t.getMonth(),D.config.shorthandCurrentMonth,D.l10n)+" ":D.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()}),D._hidePrevMonthArrow=void 0!==D.config.minDate&&(D.currentYear===D.config.minDate.getFullYear()?D.currentMonth<=D.config.minDate.getMonth():D.currentYear<D.config.minDate.getFullYear()),D._hideNextMonthArrow=void 0!==D.config.maxDate&&(D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth+1>D.config.maxDate.getMonth():D.currentYear>D.config.maxDate.getFullYear()))}function tn(e){var n=e||(D.config.altInput?D.config.altFormat:D.config.dateFormat);return D.selectedDates.map(function(e){return D.formatDate(e,n)}).filter(function(e,n,t){return"range"!==D.config.mode||D.config.enableTime||t.indexOf(e)===n}).join("range"!==D.config.mode?D.config.conjunction:D.l10n.rangeSeparator)}function an(e){if(void 0===e&&(e=!0),void 0!==D.mobileInput&&D.mobileFormatStr){var n=void 0!==D.latestSelectedDateObj?Ge(D.latestSelectedDateObj):"",t=D.parseDate(D.mobileInput.value,D.mobileFormatStr);void 0!==t&&D.formatDate(t,D.mobileFormatStr)===n||(D.mobileInput.value=n)}D._showValue(),!1!==e&&Ze("onValueUpdate")}function on(e){var n=g(e),t=D.prevMonthNav.contains(n),a=D.nextMonthNav.contains(n);t||a?ye(t?-1:1):D.yearElements.indexOf(n)>=0?n.select():n.classList.contains("arrowUp")?D.changeYear(D.currentYear+1):n.classList.contains("arrowDown")&&D.changeYear(D.currentYear-1)}i._flatpickr=D;try{!function(){D.element=D.input=i,D.isOpen=!1,function(){var e,n=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];Object.assign(C,JSON.parse(JSON.stringify(i.dataset||{})),p),D.config.parseDate=C.parseDate,D.config.formatDate=C.formatDate,Object.defineProperty(D.config,"enable",{get:function(){return D.config._enable},set:function(e){D.config._enable=e?qe(e):void 0}}),Object.defineProperty(D.config,"disable",{get:function(){return D.config._disable},set:function(e){D.config._disable=qe(e)}}),Object.defineProperty(D.config,"minDate",{get:function(){return D.config._minDate},set:Ye("min")}),Object.defineProperty(D.config,"maxDate",{get:function(){return D.config._maxDate},set:Ye("max")});var o=function(e){return function(n){D.config["min"===e?"_minTime":"_maxTime"]=D.parseDate(n,"H:i:S"),D.selectedDates&&!D.selectedDates.length&&U()}};Object.defineProperty(D.config,"minTime",{get:function(){return D.config._minTime},set:o("min")}),Object.defineProperty(D.config,"maxTime",{get:function(){return D.config._maxTime},set:o("max")});var r=D.config.conjunction;Object.defineProperty(D.config,"conjunction",{get:function(){return r},set:function(e){r=null!=e?e:a.conjunction}}),D.config.conjunction=r,"time"===C.mode&&(D.config.noCalendar=!0,D.config.enableTime=!0),He(null!==(e=C.locale)&&void 0!==e?e:D.config.locale),Object.assign(D.config,Fe(),C);for(var l=0;l<n.length;l++)D.config[n[l]]=!0===D.config[n[l]]||"true"===D.config[n[l]];for(t.filter(function(e){return void 0!==D.config[e]}).forEach(function(e){D.config[e]=c(D.config[e]||[]).map(x)}),l=0;l<D.config.plugins.length;l++){var s=D.config.plugins[l](D)||{};for(var d in s)t.indexOf(d)>-1?D.config[d]=c(s[d]).map(x).concat(D.config[d]):void 0===C[d]&&(D.config[d]=s[d])}D.isMobile=!D.config.disableMobile&&!D.config.inline&&"single"===D.config.mode&&!D.config.disable.length&&!D.config.enable&&!D.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),C.altInputClass||(D.config.altInputClass=Ae().className+" "+D.config.altInputClass),Ze("onParseConfig")}(),je(),function(){if(D.input=Ae(),D.input._type=D.input.type,D.input.type="text",D.input.classList.add("flatpickr-input"),D._input=D.input,D.config.altInput){D.altInput=d(D.input.nodeName,D.config.altInputClass),D._input=D.altInput,D.altInput.placeholder=D.input.placeholder,D.altInput.disabled=D.input.disabled,D.altInput.required=D.input.required,D.altInput.tabIndex=D.input.tabIndex;var e=D.input.getAttribute("autocomplete");null!==e&&D.altInput.setAttribute("autocomplete",e),D.altInput.type="text",D.input.setAttribute("type","hidden"),!D.config.static&&D.input.parentNode&&D.input.parentNode.insertBefore(D.altInput,D.input.nextSibling)}D.config.allowInput||D._input.setAttribute("readonly","readonly"),$e()}(),function(){D.selectedDates=[],D.now=D.parseDate(D.config.now)||new Date;var e=D.config.defaultDate||("INPUT"!==D.input.nodeName&&"TEXTAREA"!==D.input.nodeName||!D.input.placeholder||D.input.value!==D.input.placeholder?D.input.value:null);e&&Ve(e,D.config.dateFormat),D._initialDate=D.selectedDates.length>0?D.selectedDates[0]:G(D.now),D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth(),D.selectedDates.length>0&&(D.latestSelectedDateObj=D.selectedDates[0]),void 0!==D.config.minTime&&(D.config.minTime=D.parseDate(D.config.minTime,"H:i")),void 0!==D.config.maxTime&&(D.config.maxTime=D.parseDate(D.config.maxTime,"H:i")),D.minDateHasTime=!!D.config.minDate&&(D.config.minDate.getHours()>0||D.config.minDate.getMinutes()>0||D.config.minDate.getSeconds()>0),D.maxDateHasTime=!!D.config.maxDate&&(D.config.maxDate.getHours()>0||D.config.maxDate.getMinutes()>0||D.config.maxDate.getSeconds()>0)}(),D.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=D.currentMonth),void 0===n&&(n=D.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:D.l10n.daysInMonth[e]}},D.isMobile||function(){var e=M.createDocumentFragment();if(D.calendarContainer=d("div","flatpickr-calendar"),D.calendarContainer.tabIndex=-1,!D.config.noCalendar){if(e.appendChild((D.monthNav=d("div","flatpickr-months"),D.yearElements=[],D.monthElements=[],D.prevMonthNav=d("span","flatpickr-prev-month"),D.prevMonthNav.innerHTML=D.config.prevArrow,D.nextMonthNav=d("span","flatpickr-next-month"),D.nextMonthNav.innerHTML=D.config.nextArrow,pe(),Object.defineProperty(D,"_hidePrevMonthArrow",{get:function(){return D.__hidePrevMonthArrow},set:function(e){D.__hidePrevMonthArrow!==e&&(s(D.prevMonthNav,"flatpickr-disabled",e),D.__hidePrevMonthArrow=e)}}),Object.defineProperty(D,"_hideNextMonthArrow",{get:function(){return D.__hideNextMonthArrow},set:function(e){D.__hideNextMonthArrow!==e&&(s(D.nextMonthNav,"flatpickr-disabled",e),D.__hideNextMonthArrow=e)}}),D.currentYearElement=D.yearElements[0],nn(),D.monthNav)),D.innerContainer=d("div","flatpickr-innerContainer"),D.config.weekNumbers){var n=function(){D.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",D.l10n.weekAbbreviation));var n=d("div","flatpickr-weeks");return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),t=n.weekWrapper,a=n.weekNumbers;D.innerContainer.appendChild(t),D.weekNumbers=a,D.weekWrapper=t}D.rContainer=d("div","flatpickr-rContainer"),D.rContainer.appendChild(De()),D.daysContainer||(D.daysContainer=d("div","flatpickr-days"),D.daysContainer.tabIndex=-1),fe(),D.rContainer.appendChild(D.daysContainer),D.innerContainer.appendChild(D.rContainer),e.appendChild(D.innerContainer)}D.config.enableTime&&e.appendChild(he()),s(D.calendarContainer,"rangeMode","range"===D.config.mode),s(D.calendarContainer,"animate",!0===D.config.animate),s(D.calendarContainer,"multiMonth",D.config.showMonths>1),D.calendarContainer.appendChild(e);var i=!!D.config.appendTo&&void 0!==D.config.appendTo.nodeType;if((D.config.inline||D.config.static)&&(D.calendarContainer.classList.add(D.config.inline?"inline":"static"),D.config.inline&&(!i&&D.element.parentNode?D.element.parentNode.insertBefore(D.calendarContainer,D._input.nextSibling):D.config.appendTo&&D.config.appendTo.appendChild(D.calendarContainer)),D.config.static)){var o=d("div","flatpickr-wrapper");D.element.parentNode&&D.element.parentNode.insertBefore(o,D.element),o.appendChild(D.element),D.altInput&&D.input.parentNode&&D.input.parentNode.insertBefore(D.altInput,D.input.nextSibling),o.appendChild(D.calendarContainer)}D.config.static||D.config.inline||(D.config.appendTo||M.body).appendChild(D.calendarContainer)}(),D.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(D.element.querySelectorAll("[data-"+e+"]"),function(n){return q(n,"click",D[e])})}),D.isMobile?function(){D.mobileInput=d("input",D.input.className+" flatpickr-mobile"),D.mobileInput.tabIndex=D.input.tabIndex,ze(),D.mobileInput.disabled=D.input.disabled,D.mobileInput.required=D.input.required,D.mobileInput.placeholder=D.input.placeholder,D.selectedDates.length>0&&(D.mobileInput.defaultValue=D.mobileInput.value=Ge(D.selectedDates[0])),D.input.type="hidden",void 0!==D.altInput&&(D.altInput.type="hidden");try{D.input.parentNode&&D.input.parentNode.insertBefore(D.mobileInput,D.input.nextSibling)}catch(e){}q(D.mobileInput,"change",function(e){D.setDate(g(e).value,!1,D.mobileFormatStr),Ze("onChange"),Ze("onClose")})}():(D._debouncedChange=l($,300),D.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&q(D.daysContainer,"mouseover",function(e){"range"===D.config.mode&&Oe(g(e))}),q(D._input,"keydown",Ie),void 0!==D.calendarContainer&&q(D.calendarContainer,"keydown",Ie),!0===D.config.clickOpens&&(q(D._input,"focus",D.open),q(D._input,"click",D.open)),void 0!==D.daysContainer&&(q(D.monthNav,"click",on),q(D.monthNav,["keyup","increment"],V),q(D.daysContainer,"click",Ke)),X(),D.config.allowInput&&q(D._input,"blur",Te)),(D.selectedDates.length||D.config.noCalendar)&&(D.config.enableTime&&K(D.config.noCalendar?D.latestSelectedDateObj:void 0),an(!1)),k();var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);D.isMobile||D.config.inline||!e||Le(),Ze("onReady")}()}catch(e){throw i._flatpickr=void 0,e}return D}function H(e,n){for(var t=Array.prototype.slice.call(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE}),a=[],i=0;i<t.length;i++){var o=t[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),a.push(j(o,n||{}))}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return H(this,e)},HTMLElement.prototype.flatpickr=function(e){return H([this],e)});var L=function(e,n){return"string"==typeof e?H(window.document.querySelectorAll(e),n):"number"==typeof(null===(t=e)||void 0===t?void 0:t.nodeType)?H([e],n):H(e,n);var t};return L.defaultConfig={},L.l10ns={en:e({},i),default:e({},i)},L.localize=function(e){L.l10ns.default=A(L.l10ns.default,e)},L.setDefaults=function(n){L.defaultConfig=e(e({},L.defaultConfig),n)},L.parseDate=I({}),L.formatDate=_({}),L.compareDates=O,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return H(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=L),L});
@@ -153,9 +153,17 @@
153
153
  // a day picked with both ends set edits the end of the input in focus
154
154
  // (onValueUpdate) instead of starting a new range, which would put the
155
155
  // time inputs back to the default time: it takes the time they show
156
- // for that end
156
+ // for that end. An inline calendar isn't opened from either input:
157
+ // there the day starts a new range, as without the plugin
158
+ var startNewRange = fp._startNewRange;
157
159
  fp._startNewRange = function () {
158
- fp.selectedDates = [];
160
+ if (fp.config.inline) {
161
+ _prevDates = [];
162
+ startNewRange();
163
+ }
164
+ else {
165
+ fp.selectedDates = [];
166
+ }
159
167
  };
160
168
  // flatpickr itself opens the calendar from fp._input, before this runs
161
169
  fp._bind(fp._input, "focus", function () {
@@ -164,10 +172,14 @@
164
172
  if (fp.isOpen && fp._positionElement !== anchor)
165
173
  fp._positionCalendar(anchor);
166
174
  fp._positionElement = anchor;
167
- fp.latestSelectedDateObj = fp.selectedDates[0];
168
- fp._setHoursFromDate(fp.selectedDates[0]);
175
+ // with no start there is nothing to jump to: the view stays where it
176
+ // was moved, as close() leaves it with nothing selected (#2573)
177
+ if (fp.selectedDates[0]) {
178
+ fp.latestSelectedDateObj = fp.selectedDates[0];
179
+ fp._setHoursFromDate(fp.selectedDates[0]);
180
+ fp.jumpToDate(fp.selectedDates[0]);
181
+ }
169
182
  _secondInputFocused = false;
170
- fp.jumpToDate(fp.selectedDates[0]);
171
183
  });
172
184
  fp.setDate(fp.selectedDates, false);
173
185
  plugin.onValueUpdate(fp.selectedDates);
@@ -18,7 +18,7 @@
18
18
  }
19
19
 
20
20
  if (typeof window.CustomEvent !== "function") {
21
- var CustomEvent = function (typeArg, eventInitDict) {
21
+ var CustomEventPolyfill = function (typeArg, eventInitDict) {
22
22
  eventInitDict = eventInitDict || {
23
23
  bubbles: false,
24
24
  cancelable: false,
@@ -28,8 +28,8 @@
28
28
  evt.initCustomEvent(typeArg, eventInitDict.bubbles, eventInitDict.cancelable, eventInitDict.detail);
29
29
  return evt;
30
30
  };
31
- CustomEvent.prototype = window.Event.prototype;
32
- window.CustomEvent = CustomEvent;
31
+ CustomEventPolyfill.prototype = window.Event.prototype;
32
+ window.CustomEvent = CustomEventPolyfill;
33
33
  }
34
34
  function delta(e) {
35
35
  return Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY));
@@ -45,6 +45,19 @@
45
45
  position: absolute;
46
46
  top: calc(100% + 2px);
47
47
  }
48
+ .flatpickr-calendar.static.arrowBottom {
49
+ top: auto;
50
+ bottom: calc(100% + 2px);
51
+ }
52
+ .flatpickr-calendar.static.arrowRight {
53
+ right: 0;
54
+ }
55
+ @supports (translate: 0) {
56
+ .flatpickr-calendar.static.arrowCenter {
57
+ left: 50%;
58
+ translate: -50%;
59
+ }
60
+ }
48
61
  .flatpickr-calendar.static.open {
49
62
  z-index: 999;
50
63
  display: block;
@@ -44,6 +44,19 @@
44
44
  position: absolute;
45
45
  top: calc(100% + 2px);
46
46
  }
47
+ .flatpickr-calendar.static.arrowBottom {
48
+ top: auto;
49
+ bottom: calc(100% + 2px);
50
+ }
51
+ .flatpickr-calendar.static.arrowRight {
52
+ right: 0;
53
+ }
54
+ @supports (translate: 0) {
55
+ .flatpickr-calendar.static.arrowCenter {
56
+ left: 50%;
57
+ translate: -50%;
58
+ }
59
+ }
47
60
  .flatpickr-calendar.static.open {
48
61
  z-index: 999;
49
62
  display: block;
@@ -45,6 +45,19 @@
45
45
  position: absolute;
46
46
  top: calc(100% + 2px);
47
47
  }
48
+ .flatpickr-calendar.static.arrowBottom {
49
+ top: auto;
50
+ bottom: calc(100% + 2px);
51
+ }
52
+ .flatpickr-calendar.static.arrowRight {
53
+ right: 0;
54
+ }
55
+ @supports (translate: 0) {
56
+ .flatpickr-calendar.static.arrowCenter {
57
+ left: 50%;
58
+ translate: -50%;
59
+ }
60
+ }
48
61
  .flatpickr-calendar.static.open {
49
62
  z-index: 999;
50
63
  display: block;
@@ -44,6 +44,19 @@
44
44
  position: absolute;
45
45
  top: calc(100% + 2px);
46
46
  }
47
+ .flatpickr-calendar.static.arrowBottom {
48
+ top: auto;
49
+ bottom: calc(100% + 2px);
50
+ }
51
+ .flatpickr-calendar.static.arrowRight {
52
+ right: 0;
53
+ }
54
+ @supports (translate: 0) {
55
+ .flatpickr-calendar.static.arrowCenter {
56
+ left: 50%;
57
+ translate: -50%;
58
+ }
59
+ }
47
60
  .flatpickr-calendar.static.open {
48
61
  z-index: 999;
49
62
  display: block;
@@ -44,6 +44,19 @@
44
44
  position: absolute;
45
45
  top: calc(100% + 2px);
46
46
  }
47
+ .flatpickr-calendar.static.arrowBottom {
48
+ top: auto;
49
+ bottom: calc(100% + 2px);
50
+ }
51
+ .flatpickr-calendar.static.arrowRight {
52
+ right: 0;
53
+ }
54
+ @supports (translate: 0) {
55
+ .flatpickr-calendar.static.arrowCenter {
56
+ left: 50%;
57
+ translate: -50%;
58
+ }
59
+ }
47
60
  .flatpickr-calendar.static.open {
48
61
  z-index: 999;
49
62
  display: block;
@@ -44,6 +44,19 @@
44
44
  position: absolute;
45
45
  top: calc(100% + 2px);
46
46
  }
47
+ .flatpickr-calendar.static.arrowBottom {
48
+ top: auto;
49
+ bottom: calc(100% + 2px);
50
+ }
51
+ .flatpickr-calendar.static.arrowRight {
52
+ right: 0;
53
+ }
54
+ @supports (translate: 0) {
55
+ .flatpickr-calendar.static.arrowCenter {
56
+ left: 50%;
57
+ translate: -50%;
58
+ }
59
+ }
47
60
  .flatpickr-calendar.static.open {
48
61
  z-index: 999;
49
62
  display: block;
@@ -44,6 +44,19 @@
44
44
  position: absolute;
45
45
  top: calc(100% + 2px);
46
46
  }
47
+ .flatpickr-calendar.static.arrowBottom {
48
+ top: auto;
49
+ bottom: calc(100% + 2px);
50
+ }
51
+ .flatpickr-calendar.static.arrowRight {
52
+ right: 0;
53
+ }
54
+ @supports (translate: 0) {
55
+ .flatpickr-calendar.static.arrowCenter {
56
+ left: 50%;
57
+ translate: -50%;
58
+ }
59
+ }
47
60
  .flatpickr-calendar.static.open {
48
61
  z-index: 999;
49
62
  display: block;
@@ -44,6 +44,19 @@
44
44
  position: absolute;
45
45
  top: calc(100% + 2px);
46
46
  }
47
+ .flatpickr-calendar.static.arrowBottom {
48
+ top: auto;
49
+ bottom: calc(100% + 2px);
50
+ }
51
+ .flatpickr-calendar.static.arrowRight {
52
+ right: 0;
53
+ }
54
+ @supports (translate: 0) {
55
+ .flatpickr-calendar.static.arrowCenter {
56
+ left: 50%;
57
+ translate: -50%;
58
+ }
59
+ }
47
60
  .flatpickr-calendar.static.open {
48
61
  z-index: 999;
49
62
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatpickr-ce",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "A lightweight, powerful javascript datetime picker",
5
5
  "scripts": {
6
6
  "build": "run-s build:pre build:build build:esm build:types build:post",
@@ -61,6 +61,22 @@
61
61
  position absolute
62
62
  top calc(100% + 2px)
63
63
 
64
+ // positionCalendar picks the side and the alignment and draws the arrow
65
+ // there; a static calendar goes there too, against its wrapper
66
+ &.arrowBottom
67
+ top auto
68
+ bottom calc(100% + 2px)
69
+
70
+ &.arrowRight
71
+ right 0
72
+
73
+ // translate composes with the transform fpFadeInDown animates; a
74
+ // browser without it keeps the calendar at the wrapper's left edge
75
+ @supports (translate: 0)
76
+ &.arrowCenter
77
+ left 50%
78
+ translate -50%
79
+
64
80
  &.open
65
81
  z-index 999
66
82
  display block