",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},a={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 t=e%100;if(t>3&&t<21)return"th";switch(t%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",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},r=function(e){return("0"+e).slice(-2)},i=function(e){return!0===e?1:0};function o(e,t,n){var a;return void 0===n&&(n=!1),function(){var r=this,i=arguments;null!==a&&clearTimeout(a),a=window.setTimeout((function(){a=null,n||e.apply(r,i)}),t),n&&!a&&e.apply(r,i)}}var s=function(e){return e instanceof Array?e:[e]};function c(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function l(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function d(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function u(e,t){return t(e)?e:e.parentNode?u(e.parentNode,t):void 0}function m(e,t){var n=l("div","numInputWrapper"),a=l("input","numInput "+e),r=l("span","arrowUp"),i=l("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var o in t)a.setAttribute(o,t[o]);return n.appendChild(a),n.appendChild(r),n.appendChild(i),n}var f=function(){},p=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},g={D:f,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*i(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),r=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+n.firstDayOfWeek),r},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:f,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:f,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},h={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",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:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},v={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[v.w(e,t,n)]},F:function(e,t,n){return p(v.n(e,t,n)-1,!1,t)},G:function(e,t,n){return r(v.h(e,t,n))},H:function(e){return r(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[i(e.getHours()>11)]},M:function(e,t){return p(e.getMonth(),!0,t)},S:function(e){return r(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return r(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return r(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return r(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)}},_=function(e){var t=e.config,r=void 0===t?n:t,i=e.l10n,o=void 0===i?a:i;return function(e,t,n){var a=n||o;return void 0!==r.formatDate?r.formatDate(e,t,a):t.split("").map((function(t,n,i){return v[t]&&"\\"!==i[n-1]?v[t](e,a,r):"\\"!==t?t:""})).join("")}},k=function(e){var t=e.config,r=void 0===t?n:t,i=e.l10n,o=void 0===i?a:i;return function(e,t,a,i){if(0===e||e){var s,c=i||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var d=t||(r||n).dateFormat,u=String(e).trim();if("today"===u)s=new Date,a=!0;else if(/Z$/.test(u)||/GMT$/.test(u))s=new Date(e);else if(r&&r.parseDate)s=r.parseDate(e,d);else{s=r&&r.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var m=void 0,f=[],p=0,v=0,_="";po&&(l=n===v.hourElement?l-o-i(!v.amPM):a,u&&F(void 0,1,v.hourElement)),v.amPM&&d&&(1===s?l+c===23:Math.abs(l-c)>s)&&(v.amPM.textContent=v.l10n.amPM[i(v.amPM.textContent===v.l10n.amPM[0])]),n.value=r(l)}}(e);var t=v._input.value;D(),ve(),v._input.value!==t&&v._debouncedChange()}function D(){if(void 0!==v.hourElement&&void 0!==v.minuteElement){var e,t,n=(parseInt(v.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(v.minuteElement.value,10)||0)%60,r=void 0!==v.secondElement?(parseInt(v.secondElement.value,10)||0)%60:0;void 0!==v.amPM&&(e=n,t=v.amPM.textContent,n=e%12+12*i(t===v.l10n.amPM[1]));var o=void 0!==v.config.minTime||v.config.minDate&&v.minDateHasTime&&v.latestSelectedDateObj&&0===y(v.latestSelectedDateObj,v.config.minDate,!0);if(void 0!==v.config.maxTime||v.config.maxDate&&v.maxDateHasTime&&v.latestSelectedDateObj&&0===y(v.latestSelectedDateObj,v.config.maxDate,!0)){var s=void 0!==v.config.maxTime?v.config.maxTime:v.config.maxDate;(n=Math.min(n,s.getHours()))===s.getHours()&&(a=Math.min(a,s.getMinutes())),a===s.getMinutes()&&(r=Math.min(r,s.getSeconds()))}if(o){var c=void 0!==v.config.minTime?v.config.minTime:v.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(r=Math.max(r,c.getSeconds()))}S(n,a,r)}}function M(e){var t=e||v.latestSelectedDateObj;t&&S(t.getHours(),t.getMinutes(),t.getSeconds())}function E(){var e=v.config.defaultHour,t=v.config.defaultMinute,n=v.config.defaultSeconds;if(void 0!==v.config.minDate){var a=v.config.minDate.getHours(),r=v.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(r,t)),e===a&&t===r&&(n=v.config.minDate.getSeconds())}if(void 0!==v.config.maxDate){var i=v.config.maxDate.getHours(),o=v.config.maxDate.getMinutes();(e=Math.min(e,i))===i&&(t=Math.min(o,t)),e===i&&t===o&&(n=v.config.maxDate.getSeconds())}S(e,t,n)}function S(e,t,n){void 0!==v.latestSelectedDateObj&&v.latestSelectedDateObj.setHours(e%24,t,n||0,0),v.hourElement&&v.minuteElement&&!v.isMobile&&(v.hourElement.value=r(v.config.time_24hr?e:(12+e)%12+12*i(e%12==0)),v.minuteElement.value=r(t),void 0!==v.amPM&&(v.amPM.textContent=v.l10n.amPM[i(e>=12)]),void 0!==v.secondElement&&(v.secondElement.value=r(n)))}function P(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&Q(t)}function A(e,t,n,a){return t instanceof Array?t.forEach((function(t){return A(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return A(e,t,n,a)})):(e.addEventListener(t,n,a),void v._handlers.push({element:e,event:t,handler:n,options:a}))}function T(e){return function(t){1===t.which&&e(t)}}function O(){me("onChange")}function I(e,t){var n=void 0!==e?v.parseDate(e):v.latestSelectedDateObj||(v.config.minDate&&v.config.minDate>v.now?v.config.minDate:v.config.maxDate&&v.config.maxDate=0&&y(e,v.selectedDates[1])<=0}(t)&&!pe(t)&&i.classList.add("inRange"),v.weekNumbers&&1===v.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&v.weekNumbers.insertAdjacentHTML("beforeend",""+v.config.getWeek(t)+""),me("onDayCreate",i),i}function R(e){e.focus(),"range"===v.config.mode&&ee(e)}function j(e){for(var t=e>0?0:v.config.showMonths-1,n=e>0?v.config.showMonths:-1,a=t;a!=n;a+=e)for(var r=v.daysContainer.children[a],i=e>0?0:r.children.length-1,o=e>0?r.children.length:-1,s=i;s!=o;s+=e){var c=r.children[s];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function B(e,t){var n=$(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==v.selectedDateElem&&$(v.selectedDateElem)?v.selectedDateElem:void 0!==v.todayDateElem&&$(v.todayDateElem)?v.todayDateElem:j(t>0?1:-1);return void 0===a?v._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():v.currentMonth,a=t>0?v.config.showMonths:-1,r=t>0?1:-1,i=n-v.currentMonth;i!=a;i+=r)for(var o=v.daysContainer.children[i],s=n-v.currentMonth===i?e.$i+t:t<0?o.children.length-1:0,c=o.children.length,l=s;l>=0&&l0?c:-1);l+=r){var d=o.children[l];if(-1===d.className.indexOf("hidden")&&J(d.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(d)}v.changeMonth(r),B(j(r),0)}(a,t):R(a)}function G(e,t){for(var n=(new Date(e,t,1).getDay()-v.l10n.firstDayOfWeek+7)%7,a=v.utils.getDaysInMonth((t-1+12)%12),r=v.utils.getDaysInMonth(t),i=window.document.createDocumentFragment(),o=v.config.showMonths>1,s=o?"prevMonthDay hidden":"prevMonthDay",c=o?"nextMonthDay hidden":"nextMonthDay",d=a+1-n,u=0;d<=a;d++,u++)i.appendChild(L(s,new Date(e,t-1,d),d,u));for(d=1;d<=r;d++,u++)i.appendChild(L("",new Date(e,t,d),d,u));for(var m=r+1;m<=42-n&&(1===v.config.showMonths||u%7!=0);m++,u++)i.appendChild(L(c,new Date(e,t+1,m%r),m,u));var f=l("div","dayContainer");return f.appendChild(i),f}function H(){if(void 0!==v.daysContainer){d(v.daysContainer),v.weekNumbers&&d(v.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==v.config.monthSelectorType)){var e=function(e){return!(void 0!==v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&ev.config.maxDate.getMonth())};v.monthsDropdownContainer.tabIndex=-1,v.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=l("option","flatpickr-monthDropdown-month");n.value=new Date(v.currentYear,t).getMonth().toString(),n.textContent=p(t,v.config.shorthandCurrentMonth,v.l10n),n.tabIndex=-1,v.currentMonth===t&&(n.selected=!0),v.monthsDropdownContainer.appendChild(n)}}}function K(){var e,t=l("div","flatpickr-month"),n=window.document.createDocumentFragment();v.config.showMonths>1||"static"===v.config.monthSelectorType?e=l("span","cur-month"):(v.monthsDropdownContainer=l("select","flatpickr-monthDropdown-months"),A(v.monthsDropdownContainer,"change",(function(e){var t=e.target,n=parseInt(t.value,10);v.changeMonth(n-v.currentMonth),me("onMonthChange")})),Y(),e=v.monthsDropdownContainer);var a=m("cur-year",{tabindex:"-1"}),r=a.getElementsByTagName("input")[0];r.setAttribute("aria-label",v.l10n.yearAriaLabel),v.config.minDate&&r.setAttribute("min",v.config.minDate.getFullYear().toString()),v.config.maxDate&&(r.setAttribute("max",v.config.maxDate.getFullYear().toString()),r.disabled=!!v.config.minDate&&v.config.minDate.getFullYear()===v.config.maxDate.getFullYear());var i=l("div","flatpickr-current-month");return i.appendChild(e),i.appendChild(a),n.appendChild(i),t.appendChild(n),{container:t,yearElement:r,monthElement:e}}function U(){d(v.monthNav),v.monthNav.appendChild(v.prevMonthNav),v.config.showMonths&&(v.yearElements=[],v.monthElements=[]);for(var e=v.config.showMonths;e--;){var t=K();v.yearElements.push(t.yearElement),v.monthElements.push(t.monthElement),v.monthNav.appendChild(t.container)}v.monthNav.appendChild(v.nextMonthNav)}function V(){v.weekdayContainer?d(v.weekdayContainer):v.weekdayContainer=l("div","flatpickr-weekdays");for(var e=v.config.showMonths;e--;){var t=l("div","flatpickr-weekdaycontainer");v.weekdayContainer.appendChild(t)}return W(),v.weekdayContainer}function W(){var e=v.l10n.firstDayOfWeek,t=v.l10n.weekdays.shorthand.slice();e>0&&e\n "+t.join("")+"\n \n "}function z(e,t){void 0===t&&(t=!0);var n=t?e:e-v.currentMonth;n<0&&!0===v._hidePrevMonthArrow||n>0&&!0===v._hideNextMonthArrow||(v.currentMonth+=n,(v.currentMonth<0||v.currentMonth>11)&&(v.currentYear+=v.currentMonth>11?1:-1,v.currentMonth=(v.currentMonth+12)%12,me("onYearChange"),Y()),H(),me("onMonthChange"),ge())}function q(e){return!(!v.config.appendTo||!v.config.appendTo.contains(e))||v.calendarContainer.contains(e)}function Z(e){if(v.isOpen&&!v.config.inline){var t="function"==typeof(o=e).composedPath?o.composedPath()[0]:o.target,n=q(t),a=t===v.input||t===v.altInput||v.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(v.input)||~e.path.indexOf(v.altInput)),r="blur"===e.type?a&&e.relatedTarget&&!q(e.relatedTarget):!a&&!n&&!q(e.relatedTarget),i=!v.config.ignoredFocusElements.some((function(e){return e.contains(t)}));r&&i&&(v.close(),"range"===v.config.mode&&1===v.selectedDates.length&&(v.clear(!1),v.redraw()))}var o}function Q(e){if(!(!e||v.config.minDate&&ev.config.maxDate.getFullYear())){var t=e,n=v.currentYear!==t;v.currentYear=t||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)),n&&(v.redraw(),me("onYearChange"),Y())}}function J(e,t){void 0===t&&(t=!0);var n=v.parseDate(e,void 0,t);if(v.config.minDate&&n&&y(n,v.config.minDate,void 0!==t?t:!v.minDateHasTime)<0||v.config.maxDate&&n&&y(n,v.config.maxDate,void 0!==t?t:!v.maxDateHasTime)>0)return!1;if(0===v.config.enable.length&&0===v.config.disable.length)return!0;if(void 0===n)return!1;for(var a=v.config.enable.length>0,r=a?v.config.enable:v.config.disable,i=0,o=void 0;i=o.from.getTime()&&n.getTime()<=o.to.getTime())return a}return!a}function $(e){return void 0!==v.daysContainer&&-1===e.className.indexOf("hidden")&&v.daysContainer.contains(e)}function X(e){var t=e.target===v._input,n=v.config.allowInput,a=v.isOpen&&(!n||!t),r=v.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return v.setDate(v._input.value,!0,e.target===v.altInput?v.config.altFormat:v.config.dateFormat),e.target.blur();v.open()}else if(q(e.target)||a||r){var i=!!v.timeContainer&&v.timeContainer.contains(e.target);switch(e.keyCode){case 13:i?(e.preventDefault(),C(),se()):ce(e);break;case 27:e.preventDefault(),se();break;case 8:case 46:t&&!v.config.allowInput&&(e.preventDefault(),v.clear());break;case 37:case 39:if(i||t)v.hourElement&&v.hourElement.focus();else if(e.preventDefault(),void 0!==v.daysContainer&&(!1===n||document.activeElement&&$(document.activeElement))){var o=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),z(o),B(j(1),0)):B(void 0,o)}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;v.daysContainer&&void 0!==e.target.$i||e.target===v.input?e.ctrlKey?(e.stopPropagation(),Q(v.currentYear-s),B(j(1),0)):i||B(void 0,7*s):e.target===v.currentYearElement?Q(v.currentYear-s):v.config.enableTime&&(!i&&v.hourElement&&v.hourElement.focus(),C(e),v._debouncedChange());break;case 9:if(i){var c=[v.hourElement,v.minuteElement,v.secondElement,v.amPM].concat(v.pluginElements).filter((function(e){return e})),l=c.indexOf(e.target);if(-1!==l){var d=c[l+(e.shiftKey?-1:1)];e.preventDefault(),(d||v._input).focus()}}else!v.config.noCalendar&&v.daysContainer&&v.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),v._input.focus())}}if(void 0!==v.amPM&&e.target===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],D(),ve();break;case v.l10n.amPM[1].charAt(0):case v.l10n.amPM[1].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[1],D(),ve()}(t||q(e.target))&&me("onKeyDown",e)}function ee(e){if(1===v.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():v.days.firstElementChild.dateObj.getTime(),n=v.parseDate(v.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,v.selectedDates[0].getTime()),r=Math.max(t,v.selectedDates[0].getTime()),i=!1,o=0,s=0,c=a;ca&&co)?o=c:c>n&&(!s||c0&&f0&&f>s;return p?(m.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){m.classList.remove(e)})),"continue"):i&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){m.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=v.selectedDates[0].getTime()?"startRange":"endRange"),nt&&f===n&&m.classList.add("endRange"),f>=o&&(0===s||f<=s)&&(l=n,u=t,(c=f)>Math.min(l,u)&&c0||n.getMinutes()>0||n.getSeconds()>0),v.selectedDates&&(v.selectedDates=v.selectedDates.filter((function(e){return J(e)})),v.selectedDates.length||"min"!==e||M(n),ve()),v.daysContainer&&(oe(),void 0!==n?v.currentYearElement[e]=n.getFullYear().toString():v.currentYearElement.removeAttribute(e),v.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof v.config.locale&&void 0===w.l10ns[v.config.locale]&&v.config.errorHandler(new Error("flatpickr: invalid locale "+v.config.locale)),v.l10n=e({},w.l10ns.default,"object"==typeof v.config.locale?v.config.locale:"default"!==v.config.locale?w.l10ns[v.config.locale]:void 0),h.K="("+v.l10n.amPM[0]+"|"+v.l10n.amPM[1]+"|"+v.l10n.amPM[0].toLowerCase()+"|"+v.l10n.amPM[1].toLowerCase()+")",void 0===e({},g,JSON.parse(JSON.stringify(f.dataset||{}))).time_24hr&&void 0===w.defaultConfig.time_24hr&&(v.config.time_24hr=v.l10n.time_24hr),v.formatDate=_(v),v.parseDate=k({config:v.config,l10n:v.l10n})}function ie(e){if(void 0!==v.calendarContainer){me("onPreCalendarPosition");var t=e||v._positionElement,n=Array.prototype.reduce.call(v.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),a=v.calendarContainer.offsetWidth,r=v.config.position.split(" "),i=r[0],o=r.length>1?r[1]:null,s=t.getBoundingClientRect(),l=window.innerHeight-s.bottom,d="above"===i||"below"!==i&&ln,u=window.pageYOffset+s.top+(d?-n-2:t.offsetHeight+2);if(c(v.calendarContainer,"arrowTop",!d),c(v.calendarContainer,"arrowBottom",d),!v.config.inline){var m=window.pageXOffset+s.left-(null!=o&&"center"===o?(a-s.width)/2:0),f=window.document.body.offsetWidth-s.right,p=m+a>window.document.body.offsetWidth,g=f+a>window.document.body.offsetWidth;if(c(v.calendarContainer,"rightMost",p),!v.config.static)if(v.calendarContainer.style.top=u+"px",p)if(g){var h=document.styleSheets[0];if(void 0===h)return;var _=window.document.body.offsetWidth,k=Math.max(0,_/2-a/2),y=h.cssRules.length,b="{left:"+s.left+"px;right:auto;}";c(v.calendarContainer,"rightMost",!1),c(v.calendarContainer,"centerMost",!0),h.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+b,y),v.calendarContainer.style.left=k+"px",v.calendarContainer.style.right="auto"}else v.calendarContainer.style.left="auto",v.calendarContainer.style.right=f+"px";else v.calendarContainer.style.left=m+"px",v.calendarContainer.style.right="auto"}}}function oe(){v.config.noCalendar||v.isMobile||(ge(),H())}function se(){v._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(v.close,0):v.close()}function ce(e){e.preventDefault(),e.stopPropagation();var t=u(e.target,(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var n=t,a=v.latestSelectedDateObj=new Date(n.dateObj.getTime()),r=(a.getMonth()v.currentMonth+v.config.showMonths-1)&&"range"!==v.config.mode;if(v.selectedDateElem=n,"single"===v.config.mode)v.selectedDates=[a];else if("multiple"===v.config.mode){var i=pe(a);i?v.selectedDates.splice(parseInt(i),1):v.selectedDates.push(a)}else"range"===v.config.mode&&(2===v.selectedDates.length&&v.clear(!1,!1),v.latestSelectedDateObj=a,v.selectedDates.push(a),0!==y(a,v.selectedDates[0],!0)&&v.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(D(),r){var o=v.currentYear!==a.getFullYear();v.currentYear=a.getFullYear(),v.currentMonth=a.getMonth(),o&&(me("onYearChange"),Y()),me("onMonthChange")}if(ge(),H(),ve(),v.config.enableTime&&setTimeout((function(){return v.showTimeInput=!0}),50),r||"range"===v.config.mode||1!==v.config.showMonths?void 0!==v.selectedDateElem&&void 0===v.hourElement&&v.selectedDateElem&&v.selectedDateElem.focus():R(n),void 0!==v.hourElement&&void 0!==v.hourElement&&v.hourElement.focus(),v.config.closeOnSelect){var s="single"===v.config.mode&&!v.config.enableTime,c="range"===v.config.mode&&2===v.selectedDates.length&&!v.config.enableTime;(s||c)&&se()}O()}}v.parseDate=k({config:v.config,l10n:v.l10n}),v._handlers=[],v.pluginElements=[],v.loadedPlugins=[],v._bind=A,v._setHoursFromDate=M,v._positionCalendar=ie,v.changeMonth=z,v.changeYear=Q,v.clear=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),v.input.value="",void 0!==v.altInput&&(v.altInput.value=""),void 0!==v.mobileInput&&(v.mobileInput.value=""),v.selectedDates=[],v.latestSelectedDateObj=void 0,!0===t&&(v.currentYear=v._initialDate.getFullYear(),v.currentMonth=v._initialDate.getMonth()),v.showTimeInput=!1,!0===v.config.enableTime&&E(),v.redraw(),e&&me("onChange")},v.close=function(){v.isOpen=!1,v.isMobile||(void 0!==v.calendarContainer&&v.calendarContainer.classList.remove("open"),void 0!==v._input&&v._input.classList.remove("active")),me("onClose")},v._createElement=l,v.destroy=function(){void 0!==v.config&&me("onDestroy");for(var e=v._handlers.length;e--;){var t=v._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(v._handlers=[],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"),v.input.value=""),["_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=J,v.jumpToDate=I,v.open=function(e,t){if(void 0===t&&(t=v._positionElement),!0===v.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==v.mobileInput&&(v.mobileInput.focus(),v.mobileInput.click()),void me("onOpen");if(!v._input.disabled&&!v.config.inline){var n=v.isOpen;v.isOpen=!0,n||(v.calendarContainer.classList.add("open"),v._input.classList.add("active"),me("onOpen"),ie(t)),!0===v.config.enableTime&&!0===v.config.noCalendar&&(0===v.selectedDates.length&&ne(),!1!==v.config.allowInput||void 0!==e&&v.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return v.hourElement.select()}),50))}},v.redraw=oe,v.set=function(e,n){if(null!==e&&"object"==typeof e)for(var a in Object.assign(v.config,e),e)void 0!==le[a]&&le[a].forEach((function(e){return e()}));else v.config[e]=n,void 0!==le[e]?le[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(v.config[e]=s(n));v.redraw(),ve(!1)},v.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=v.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return v.clear(t);de(e,n),v.showTimeInput=v.selectedDates.length>0,v.latestSelectedDateObj=v.selectedDates[v.selectedDates.length-1],v.redraw(),I(),M(),0===v.selectedDates.length&&v.clear(!1),ve(t),t&&me("onChange")},v.toggle=function(e){if(!0===v.isOpen)return v.close();v.open(e)};var le={locale:[re,W],showMonths:[U,x,V],minDate:[I],maxDate:[I]};function de(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return v.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[v.parseDate(e,t)];else if("string"==typeof e)switch(v.config.mode){case"single":case"time":n=[v.parseDate(e,t)];break;case"multiple":n=e.split(v.config.conjunction).map((function(e){return v.parseDate(e,t)}));break;case"range":n=e.split(v.l10n.rangeSeparator).map((function(e){return v.parseDate(e,t)}))}else v.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));v.selectedDates=n.filter((function(e){return e instanceof Date&&J(e,!1)})),"range"===v.config.mode&&v.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function ue(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 me(e,t){if(void 0!==v.config){var n=v.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a1||"static"===v.config.monthSelectorType?v.monthElements[t].textContent=p(n.getMonth(),v.config.shorthandCurrentMonth,v.l10n)+" ":v.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),v._hidePrevMonthArrow=void 0!==v.config.minDate&&(v.currentYear===v.config.minDate.getFullYear()?v.currentMonth<=v.config.minDate.getMonth():v.currentYearv.config.maxDate.getMonth():v.currentYear>v.config.maxDate.getFullYear()))}function he(e){return v.selectedDates.map((function(t){return v.formatDate(t,e)})).filter((function(e,t,n){return"range"!==v.config.mode||v.config.enableTime||n.indexOf(e)===t})).join("range"!==v.config.mode?v.config.conjunction:v.l10n.rangeSeparator)}function ve(e){void 0===e&&(e=!0),void 0!==v.mobileInput&&v.mobileFormatStr&&(v.mobileInput.value=void 0!==v.latestSelectedDateObj?v.formatDate(v.latestSelectedDateObj,v.mobileFormatStr):""),v.input.value=he(v.config.dateFormat),void 0!==v.altInput&&(v.altInput.value=he(v.config.altFormat)),!1!==e&&me("onValueUpdate")}function _e(e){var t=v.prevMonthNav.contains(e.target),n=v.nextMonthNav.contains(e.target);t||n?z(t?-1:1):v.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?v.changeYear(v.currentYear+1):e.target.classList.contains("arrowDown")&&v.changeYear(v.currentYear-1)}return function(){v.element=v.input=f,v.isOpen=!1,function(){var a=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],r=e({},g,JSON.parse(JSON.stringify(f.dataset||{}))),i={};v.config.parseDate=r.parseDate,v.config.formatDate=r.formatDate,Object.defineProperty(v.config,"enable",{get:function(){return v.config._enable},set:function(e){v.config._enable=ue(e)}}),Object.defineProperty(v.config,"disable",{get:function(){return v.config._disable},set:function(e){v.config._disable=ue(e)}});var o="time"===r.mode;if(!r.dateFormat&&(r.enableTime||o)){var c=w.defaultConfig.dateFormat||n.dateFormat;i.dateFormat=r.noCalendar||o?"H:i"+(r.enableSeconds?":S":""):c+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||o)&&!r.altFormat){var l=w.defaultConfig.altFormat||n.altFormat;i.altFormat=r.noCalendar||o?"h:i"+(r.enableSeconds?":S K":" K"):l+" h:i"+(r.enableSeconds?":S":"")+" K"}r.altInputClass||(v.config.altInputClass=v.input.className+" "+v.config.altInputClass),Object.defineProperty(v.config,"minDate",{get:function(){return v.config._minDate},set:ae("min")}),Object.defineProperty(v.config,"maxDate",{get:function(){return v.config._maxDate},set:ae("max")});var d=function(e){return function(t){v.config["min"===e?"_minTime":"_maxTime"]=v.parseDate(t,"H:i")}};Object.defineProperty(v.config,"minTime",{get:function(){return v.config._minTime},set:d("min")}),Object.defineProperty(v.config,"maxTime",{get:function(){return v.config._maxTime},set:d("max")}),"time"===r.mode&&(v.config.noCalendar=!0,v.config.enableTime=!0),Object.assign(v.config,i,r);for(var u=0;u-1?v.config[p]=s(m[p]).map(b).concat(v.config[p]):void 0===r[p]&&(v.config[p]=m[p])}me("onParseConfig")}(),re(),v.input=v.config.wrap?f.querySelector("[data-input]"):f,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=l(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"),v._positionElement=v.config.positionElement||v._input):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&&de(e,v.config.dateFormat),v._initialDate=v.selectedDates.length>0?v.selectedDates[0]:v.config.minDate&&v.config.minDate.getTime()>v.now.getTime()?v.config.minDate:v.config.maxDate&&v.config.maxDate.getTime()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),Object.defineProperty(v,"showTimeInput",{get:function(){return v._showTimeInput},set:function(e){v._showTimeInput=e,v.calendarContainer&&c(v.calendarContainer,"showTimeInput",e),v.isOpen&&ie()}})}(),v.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=v.currentMonth),void 0===t&&(t=v.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:v.l10n.daysInMonth[e]}},v.isMobile||function(){var e=window.document.createDocumentFragment();if(v.calendarContainer=l("div","flatpickr-calendar"),v.calendarContainer.tabIndex=-1,!v.config.noCalendar){if(e.appendChild((v.monthNav=l("div","flatpickr-months"),v.yearElements=[],v.monthElements=[],v.prevMonthNav=l("span","flatpickr-prev-month"),v.prevMonthNav.innerHTML=v.config.prevArrow,v.nextMonthNav=l("span","flatpickr-next-month"),v.nextMonthNav.innerHTML=v.config.nextArrow,U(),Object.defineProperty(v,"_hidePrevMonthArrow",{get:function(){return v.__hidePrevMonthArrow},set:function(e){v.__hidePrevMonthArrow!==e&&(c(v.prevMonthNav,"flatpickr-disabled",e),v.__hidePrevMonthArrow=e)}}),Object.defineProperty(v,"_hideNextMonthArrow",{get:function(){return v.__hideNextMonthArrow},set:function(e){v.__hideNextMonthArrow!==e&&(c(v.nextMonthNav,"flatpickr-disabled",e),v.__hideNextMonthArrow=e)}}),v.currentYearElement=v.yearElements[0],ge(),v.monthNav)),v.innerContainer=l("div","flatpickr-innerContainer"),v.config.weekNumbers){var t=function(){v.calendarContainer.classList.add("hasWeeks");var e=l("div","flatpickr-weekwrapper");e.appendChild(l("span","flatpickr-weekday",v.l10n.weekAbbreviation));var t=l("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;v.innerContainer.appendChild(n),v.weekNumbers=a,v.weekWrapper=n}v.rContainer=l("div","flatpickr-rContainer"),v.rContainer.appendChild(V()),v.daysContainer||(v.daysContainer=l("div","flatpickr-days"),v.daysContainer.tabIndex=-1),H(),v.rContainer.appendChild(v.daysContainer),v.innerContainer.appendChild(v.rContainer),e.appendChild(v.innerContainer)}v.config.enableTime&&e.appendChild(function(){v.calendarContainer.classList.add("hasTime"),v.config.noCalendar&&v.calendarContainer.classList.add("noCalendar"),v.timeContainer=l("div","flatpickr-time"),v.timeContainer.tabIndex=-1;var e=l("span","flatpickr-time-separator",":"),t=m("flatpickr-hour",{"aria-label":v.l10n.hourAriaLabel});v.hourElement=t.getElementsByTagName("input")[0];var n=m("flatpickr-minute",{"aria-label":v.l10n.minuteAriaLabel});if(v.minuteElement=n.getElementsByTagName("input")[0],v.hourElement.tabIndex=v.minuteElement.tabIndex=-1,v.hourElement.value=r(v.latestSelectedDateObj?v.latestSelectedDateObj.getHours():v.config.time_24hr?v.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(v.config.defaultHour)),v.minuteElement.value=r(v.latestSelectedDateObj?v.latestSelectedDateObj.getMinutes():v.config.defaultMinute),v.hourElement.setAttribute("step",v.config.hourIncrement.toString()),v.minuteElement.setAttribute("step",v.config.minuteIncrement.toString()),v.hourElement.setAttribute("min",v.config.time_24hr?"0":"1"),v.hourElement.setAttribute("max",v.config.time_24hr?"23":"12"),v.minuteElement.setAttribute("min","0"),v.minuteElement.setAttribute("max","59"),v.timeContainer.appendChild(t),v.timeContainer.appendChild(e),v.timeContainer.appendChild(n),v.config.time_24hr&&v.timeContainer.classList.add("time24hr"),v.config.enableSeconds){v.timeContainer.classList.add("hasSeconds");var a=m("flatpickr-second");v.secondElement=a.getElementsByTagName("input")[0],v.secondElement.value=r(v.latestSelectedDateObj?v.latestSelectedDateObj.getSeconds():v.config.defaultSeconds),v.secondElement.setAttribute("step",v.minuteElement.getAttribute("step")),v.secondElement.setAttribute("min","0"),v.secondElement.setAttribute("max","59"),v.timeContainer.appendChild(l("span","flatpickr-time-separator",":")),v.timeContainer.appendChild(a)}return v.config.time_24hr||(v.amPM=l("span","flatpickr-am-pm",v.l10n.amPM[i((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}()),c(v.calendarContainer,"rangeMode","range"===v.config.mode),c(v.calendarContainer,"animate",!0===v.config.animate),c(v.calendarContainer,"multiMonth",v.config.showMonths>1),v.calendarContainer.appendChild(e);var o=void 0!==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&&(!o&&v.element.parentNode?v.element.parentNode.insertBefore(v.calendarContainer,v._input.nextSibling):void 0!==v.config.appendTo&&v.config.appendTo.appendChild(v.calendarContainer)),v.config.static)){var s=l("div","flatpickr-wrapper");v.element.parentNode&&v.element.parentNode.insertBefore(s,v.element),s.appendChild(v.element),v.altInput&&s.appendChild(v.altInput),s.appendChild(v.calendarContainer)}v.config.static||v.config.inline||(void 0!==v.config.appendTo?v.config.appendTo:window.document.body).appendChild(v.calendarContainer)}(),function(){if(v.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(v.element.querySelectorAll("[data-"+e+"]"),(function(t){return A(t,"click",v[e])}))})),v.isMobile)!function(){var e=v.config.enableTime?v.config.noCalendar?"time":"datetime-local":"date";v.mobileInput=l("input",v.input.className+" flatpickr-mobile"),v.mobileInput.step=v.input.getAttribute("step")||"any",v.mobileInput.tabIndex=1,v.mobileInput.type=e,v.mobileInput.disabled=v.input.disabled,v.mobileInput.required=v.input.required,v.mobileInput.placeholder=v.input.placeholder,v.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",v.selectedDates.length>0&&(v.mobileInput.defaultValue=v.mobileInput.value=v.formatDate(v.selectedDates[0],v.mobileFormatStr)),v.config.minDate&&(v.mobileInput.min=v.formatDate(v.config.minDate,"Y-m-d")),v.config.maxDate&&(v.mobileInput.max=v.formatDate(v.config.maxDate,"Y-m-d")),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){}A(v.mobileInput,"change",(function(e){v.setDate(e.target.value,!1,v.mobileFormatStr),me("onChange"),me("onClose")}))}();else{var e=o(te,50);if(v._debouncedChange=o(O,300),v.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(v.daysContainer,"mouseover",(function(e){"range"===v.config.mode&&ee(e.target)})),A(window.document.body,"keydown",X),v.config.inline||v.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"touchstart",Z):A(window.document,"mousedown",T(Z)),A(window.document,"focus",Z,{capture:!0}),!0===v.config.clickOpens&&(A(v._input,"focus",v.open),A(v._input,"mousedown",T(v.open))),void 0!==v.daysContainer&&(A(v.monthNav,"mousedown",T(_e)),A(v.monthNav,["keyup","increment"],P),A(v.daysContainer,"mousedown",T(ce))),void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement){A(v.timeContainer,["increment"],C),A(v.timeContainer,"blur",C,{capture:!0}),A(v.timeContainer,"mousedown",T(N)),A([v.hourElement,v.minuteElement],["focus","click"],(function(e){return e.target.select()})),void 0!==v.secondElement&&A(v.secondElement,"focus",(function(){return v.secondElement&&v.secondElement.select()})),void 0!==v.amPM&&A(v.amPM,"mousedown",T((function(e){C(e),O()})))}}}(),(v.selectedDates.length||v.config.noCalendar)&&(v.config.enableTime&&M(v.config.noCalendar?v.latestSelectedDateObj||v.config.minDate:void 0),ve(!1)),x(),v.showTimeInput=v.selectedDates.length>0||v.config.noCalendar;var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!v.isMobile&&a&&ie(),me("onReady")}(),v}function x(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],r=0;rn?a.classList.add("text-danger"):a.classList.remove("text-danger"))})),e.dispatchEvent(new Event("keyup"))}))}(window,document);