File "flatpickr.min.js"
Full Path: /home/rattkxnv/byattorney.com/wp-content/plugins/everest-forms/assets/js/flatpickr/flatpickr.min.js
File size: 48.33 KB
MIME-type: text/plain
Charset: utf-8
/* flatpickr v4.6.3, @license MIT */
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).flatpickr=n()}(this,function(){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var ue=function(){return(ue=Object.assign||function ue(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}).apply(this,arguments)},se=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],fe={_disable:[],_enable:[],allowInput:!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",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var e=new Date(e.getTime()),n=(e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7),new Date(e.getFullYear(),0,4));return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.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:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,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},me={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){e%=100;if(3<e&&e<21)return"th";switch(e%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},ge=function(e){return("0"+e).slice(-2)},pe=function(e){return!0===e?1:0};function he(t,a,i){var o;return void 0===i&&(i=!1),function(){var e=this,n=arguments;null!==o&&clearTimeout(o),o=window.setTimeout(function(){o=null,i||t.apply(e,n)},a),i&&!o&&t.apply(e,n)}}var De=function(e){return e instanceof Array?e:[e]};function we(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function ve(e,n,t){e=window.document.createElement(e);return t=t||"",e.className=n=n||"",t!==undefined&&(e.textContent=t),e}function Ce(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function be(e,n){var t=ve("div","numInputWrapper"),a=ve("input","numInput "+e),e=ve("span","arrowUp"),i=ve("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),n!==undefined)for(var o in n)a.setAttribute(o,n[o]);return t.appendChild(a),t.appendChild(e),t.appendChild(i),t}var e=function(){return undefined},Me=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},D={D:e,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours(parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*pe(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){n=parseInt(n),e=new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0);return e.setDate(e.getDate()-e.getDay()+t.firstDayOfWeek),e},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours(parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:e,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:e,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},ye={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})"},r={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[r.w(e,n,t)]},F:function(e,n,t){return Me(r.n(e,n,t)-1,!1,n)},G:function(e,n,t){return ge(r.h(e,n,t))},H:function(e){return ge(e.getHours())},J:function(e,n){return n.ordinal!==undefined?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[pe(11<e.getHours())]},M:function(e,n){return Me(e.getMonth(),!0,n)},S:function(e){return ge(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return ge(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return ge(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return ge(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)}},xe=function(e){var n=e.config,o=void 0===n?fe:n,n=e.l10n,t=void 0===n?me:n;return function(a,e,n){var i=n||t;return o.formatDate!==undefined?o.formatDate(a,e,i):e.split("").map(function(e,n,t){return r[e]&&"\\"!==t[n-1]?r[e](a,i,o):"\\"!==e?e:""}).join("")}},Ee=function(e){var n=e.config,p=void 0===n?fe:n,n=e.l10n,h=void 0===n?me:n;return function(e,n,t,a){if(0!==e&&!e)return undefined;var i=a||h,a=e;if(e instanceof Date)r=new Date(e.getTime());else if("string"!=typeof e&&e.toFixed!==undefined)r=new Date(e);else if("string"==typeof e){var o=n||(p||fe).dateFormat,n=String(e).trim();if("today"===n)r=new Date,t=!0;else if(/Z$/.test(n)||/GMT$/.test(n))r=new Date(e);else if(p&&p.parseDate)r=p.parseDate(e,o);else{for(var r=p&&p.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),d=void 0,l=[],c=0,u=0,s="";c<o.length;c++){var f=o[c],m="\\"===f,g="\\"===o[c-1]||m;ye[f]&&!g?(s+=ye[f],(g=new RegExp(s).exec(e))&&(d=!0,l["Y"!==f?"push":"unshift"]({fn:D[f],val:g[++u]}))):m||(s+="."),l.forEach(function(e){var n=e.fn;return r=n(r,e.val,i)||r})}r=d?r:undefined}}return r instanceof Date&&!isNaN(r.getTime())?(!0===t&&r.setHours(0,0,0,0),r):(p.errorHandler(new Error("Invalid date provided: "+a)),undefined)}};function Te(e,n,t){return!1!==(t=void 0===t?!0:t)?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}var ke=function(e,n,t){return e>Math.min(n,t)&&e<Math.max(n,t)},Ie={DAY:864e5},Se=("function"!=typeof Object.assign&&(Object.assign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var a=0,i=e;a<i.length;a++)!function(n){n&&Object.keys(n).forEach(function(e){return t[e]=n[e]})}(i[a]);return t}),300);function d(e,P){var g={config:ue({},fe,Oe.defaultConfig),l10n:me};function H(e){return e.bind(g)}function j(){var n=g.config;!1===n.weekNumbers&&1===n.showMonths||!0!==n.noCalendar&&window.requestAnimationFrame(function(){var e;g.calendarContainer!==undefined&&(g.calendarContainer.style.visibility="hidden",g.calendarContainer.style.display="block"),g.daysContainer!==undefined&&(e=(g.days.offsetWidth+1)*n.showMonths,g.daysContainer.style.width=e+"px",g.calendarContainer.style.width=e+(g.weekWrapper!==undefined?g.weekWrapper.offsetWidth:0)+"px",g.calendarContainer.style.removeProperty("visibility"),g.calendarContainer.style.removeProperty("display"))})}function l(e){0===g.selectedDates.length&&V(),e!==undefined&&"blur"!==e.type&&((e=e).preventDefault(),o="keydown"===e.type,n=e.target,g.amPM!==undefined&&e.target===g.amPM&&(g.amPM.textContent=g.l10n.amPM[pe(g.amPM.textContent===g.l10n.amPM[0])]),t=parseFloat(n.getAttribute("min")),d=parseFloat(n.getAttribute("max")),a=parseFloat(n.getAttribute("step")),i=parseInt(n.value,10),o=e.delta||(o?38===e.which?1:-1:0),e=i+a*o,"undefined"!=typeof n.value)&&2===n.value.length&&(o=n===g.hourElement,r=n===g.minuteElement,e<t?(e=d+e+pe(!o)+(pe(o)&&pe(!g.amPM)),r&&u(undefined,-1,g.hourElement)):d<e&&(e=n===g.hourElement?e-d-pe(!g.amPM):t,r)&&u(undefined,1,g.hourElement),g.amPM&&o&&(1===a?e+i===23:Math.abs(e-i)>a)&&(g.amPM.textContent=g.l10n.amPM[pe(g.amPM.textContent===g.l10n.amPM[0])]),n.value=ge(e));var n,t,a,i,o,r,d=g._input.value;c(),T(),g._input.value!==d&&g._debouncedChange()}function c(){var e,n,t,a,i,o;g.hourElement!==undefined&&g.minuteElement!==undefined&&(i=(parseInt(g.hourElement.value.slice(-2),10)||0)%24,e=(parseInt(g.minuteElement.value,10)||0)%60,n=g.secondElement!==undefined?(parseInt(g.secondElement.value,10)||0)%60:0,g.amPM!==undefined&&(t=i,a=g.amPM.textContent,i=t%12+12*pe(a===g.l10n.amPM[1])),t=g.config.minTime!==undefined||g.config.minDate&&g.minDateHasTime&&g.latestSelectedDateObj&&0===Te(g.latestSelectedDateObj,g.config.minDate,!0),(g.config.maxTime!==undefined||g.config.maxDate&&g.maxDateHasTime&&g.latestSelectedDateObj&&0===Te(g.latestSelectedDateObj,g.config.maxDate,!0))&&(a=g.config.maxTime!==undefined?g.config.maxTime:g.config.maxDate,(e=(i=Math.min(i,a.getHours()))===a.getHours()?Math.min(e,a.getMinutes()):e)===a.getMinutes())&&(n=Math.min(n,a.getSeconds())),t&&(o=g.config.minTime!==undefined?g.config.minTime:g.config.minDate,(e=(i=Math.max(i,o.getHours()))===o.getHours()?Math.max(e,o.getMinutes()):e)===o.getMinutes())&&(n=Math.max(n,o.getSeconds())),r(i,e,n))}function a(e){e=e||g.latestSelectedDateObj;e&&r(e.getHours(),e.getMinutes(),e.getSeconds())}function L(){var e,n,t=g.config.defaultHour,a=g.config.defaultMinute,i=g.config.defaultSeconds;g.config.minDate!==undefined&&(e=g.config.minDate.getHours(),n=g.config.minDate.getMinutes(),(t=Math.max(t,e))===e&&(a=Math.max(n,a)),t===e)&&a===n&&(i=g.config.minDate.getSeconds()),g.config.maxDate!==undefined&&(e=g.config.maxDate.getHours(),n=g.config.maxDate.getMinutes(),(t=Math.min(t,e))===e&&(a=Math.min(n,a)),t===e)&&a===n&&(i=g.config.maxDate.getSeconds()),r(t,a,i)}function r(e,n,t){g.latestSelectedDateObj!==undefined&&g.latestSelectedDateObj.setHours(e%24,n,t||0,0),g.hourElement&&g.minuteElement&&!g.isMobile&&(g.hourElement.value=ge(g.config.time_24hr?e:(12+e)%12+12*pe(e%12==0)),g.minuteElement.value=ge(n),g.amPM!==undefined&&(g.amPM.textContent=g.l10n.amPM[pe(12<=e)]),g.secondElement!==undefined)&&(g.secondElement.value=ge(t))}function W(e){var n=parseInt(e.target.value)+(e.delta||0);(1<n/1e3||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&v(n)}function d(n,t,a,i){return t instanceof Array?t.forEach(function(e){return d(n,e,a,i)}):n instanceof Array?n.forEach(function(e){return d(e,t,a,i)}):(n.addEventListener(t,a,i),void g._handlers.push({element:n,event:t,handler:a,options:i}))}function n(n){return function(e){1===e.which&&n(e)}}function o(){x("onChange")}function i(e,n){var e=e!==undefined?g.parseDate(e):g.latestSelectedDateObj||(g.config.minDate&&g.config.minDate>g.now?g.config.minDate:g.config.maxDate&&g.config.maxDate<g.now?g.config.maxDate:g.now),t=g.currentYear,a=g.currentMonth;try{e!==undefined&&(g.currentYear=e.getFullYear(),g.currentMonth=e.getMonth())}catch(i){i.message="Invalid date supplied: "+e,g.config.errorHandler(i)}n&&g.currentYear!==t&&(x("onYearChange"),m()),!n||g.currentYear===t&&g.currentMonth===a||x("onMonthChange"),g.redraw()}function R(e){~e.target.className.indexOf("arrow")&&u(e,e.target.classList.contains("arrowUp")?1:-1)}function u(e,n,t){e=e&&e.target,t=t||e&&e.parentNode&&e.parentNode.firstChild,e=ie("increment");e.delta=n,t&&t.dispatchEvent(e)}function f(e,n,t,a){var i=C(n,!0),o=ve("span","flatpickr-day "+e,n.getDate().toString());return o.dateObj=n,o.$i=a,o.setAttribute("aria-label",g.formatDate(n,g.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===Te(n,g.now)&&((g.todayDateElem=o).classList.add("today"),o.setAttribute("aria-current","date")),i?(o.tabIndex=-1,oe(n)&&(o.classList.add("selected"),g.selectedDateElem=o,"range"===g.config.mode)&&(we(o,"startRange",g.selectedDates[0]&&0===Te(n,g.selectedDates[0],!0)),we(o,"endRange",g.selectedDates[1]&&0===Te(n,g.selectedDates[1],!0)),"nextMonthDay"===e)&&o.classList.add("inRange")):o.classList.add("flatpickr-disabled"),"range"===g.config.mode&&(a=n,!("range"!==g.config.mode||g.selectedDates.length<2))&&0<=Te(a,g.selectedDates[0])&&Te(a,g.selectedDates[1])<=0&&!oe(n)&&o.classList.add("inRange"),g.weekNumbers&&1===g.config.showMonths&&"prevMonthDay"!==e&&t%7==1&&g.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+g.config.getWeek(n)+"</span>"),x("onDayCreate",o),o}function p(e){e.focus(),"range"===g.config.mode&&z(e)}function h(e){for(var n=0<e?0:g.config.showMonths-1,t=0<e?g.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=g.daysContainer.children[a],o=0<e?0:i.children.length-1,r=0<e?i.children.length:-1,d=o;d!=r;d+=e){var l=i.children[d];if(-1===l.className.indexOf("hidden")&&C(l.dateObj))return l}return undefined}function D(e,n){var t=b(document.activeElement||document.body),e=e!==undefined?e:t?document.activeElement:g.selectedDateElem!==undefined&&b(g.selectedDateElem)?g.selectedDateElem:g.todayDateElem!==undefined&&b(g.todayDateElem)?g.todayDateElem:h(0<n?1:-1);if(e===undefined)return g._input.focus();if(!t)return p(e);for(var a=e,i=n,o=-1===a.className.indexOf("Month")?a.dateObj.getMonth():g.currentMonth,r=0<i?g.config.showMonths:-1,d=0<i?1:-1,l=o-g.currentMonth;l!=r;l+=d)for(var c=g.daysContainer.children[l],u=o-g.currentMonth===l?a.$i+i:i<0?c.children.length-1:0,s=c.children.length,f=u;0<=f&&f<s&&f!=(0<i?s:-1);f+=d){var m=c.children[f];if(-1===m.className.indexOf("hidden")&&C(m.dateObj)&&Math.abs(a.$i-f)>=Math.abs(i))return void p(m)}g.changeMonth(d),D(h(d),0),undefined}function s(){if(g.daysContainer!==undefined){Ce(g.daysContainer),g.weekNumbers&&Ce(g.weekNumbers);for(var e=document.createDocumentFragment(),n=0;n<g.config.showMonths;n++){var t=new Date(g.currentYear,g.currentMonth,1);t.setMonth(g.currentMonth+n),e.appendChild(function(e,n){for(var t=(new Date(e,n,1).getDay()-g.l10n.firstDayOfWeek+7)%7,a=g.utils.getDaysInMonth((n-1+12)%12),i=g.utils.getDaysInMonth(n),o=window.document.createDocumentFragment(),r=1<g.config.showMonths,d=r?"prevMonthDay hidden":"prevMonthDay",l=r?"nextMonthDay hidden":"nextMonthDay",c=a+1-t,u=0;c<=a;c++,u++)o.appendChild(f(d,new Date(e,n-1,c),c,u));for(c=1;c<=i;c++,u++)o.appendChild(f("",new Date(e,n,c),c,u));for(var s=i+1;s<=42-t&&(1===g.config.showMonths||u%7!=0);s++,u++)o.appendChild(f(l,new Date(e,n+1,s%i),s,u));return(r=ve("div","dayContainer")).appendChild(o),r}(t.getFullYear(),t.getMonth()))}g.daysContainer.appendChild(e),g.days=g.daysContainer.firstChild,"range"===g.config.mode&&1===g.selectedDates.length&&z()}}function m(){if(!(1<g.config.showMonths||"dropdown"!==g.config.monthSelectorType)){g.monthsDropdownContainer.tabIndex=-1,g.monthsDropdownContainer.innerHTML="";for(var e,n=0;n<12;n++)e=n,g.config.minDate!==undefined&&g.currentYear===g.config.minDate.getFullYear()&&e<g.config.minDate.getMonth()||g.config.maxDate!==undefined&&g.currentYear===g.config.maxDate.getFullYear()&&e>g.config.maxDate.getMonth()||((e=ve("option","flatpickr-monthDropdown-month")).value=new Date(g.currentYear,n).getMonth().toString(),e.textContent=Me(n,g.config.shorthandCurrentMonth,g.l10n),e.tabIndex=-1,g.currentMonth===n&&(e.selected=!0),g.monthsDropdownContainer.appendChild(e))}}function B(){Ce(g.monthNav),g.monthNav.appendChild(g.prevMonthNav),g.config.showMonths&&(g.yearElements=[],g.monthElements=[]);for(var e,n,t,a,i,o=g.config.showMonths;o--;){i=a=r=t=n=e=void 0,e=ve("div","flatpickr-month"),n=window.document.createDocumentFragment(),t=1<g.config.showMonths||"static"===g.config.monthSelectorType?ve("span","cur-month"):(g.monthsDropdownContainer=ve("select","flatpickr-monthDropdown-months"),d(g.monthsDropdownContainer,"change",function(e){e=e.target,e=parseInt(e.value,10);g.changeMonth(e-g.currentMonth),x("onMonthChange")}),m(),g.monthsDropdownContainer),r=be("cur-year",{tabindex:"-1"}),(a=r.getElementsByTagName("input")[0]).setAttribute("aria-label",g.l10n.yearAriaLabel),g.config.minDate&&a.setAttribute("min",g.config.minDate.getFullYear().toString()),g.config.maxDate&&(a.setAttribute("max",g.config.maxDate.getFullYear().toString()),a.disabled=!!g.config.minDate&&g.config.minDate.getFullYear()===g.config.maxDate.getFullYear()),(i=ve("div","flatpickr-current-month")).appendChild(t),i.appendChild(r),n.appendChild(i),e.appendChild(n);var r={container:e,yearElement:a,monthElement:t};g.yearElements.push(r.yearElement),g.monthElements.push(r.monthElement),g.monthNav.appendChild(r.container)}g.monthNav.appendChild(g.nextMonthNav)}function J(){g.weekdayContainer?Ce(g.weekdayContainer):g.weekdayContainer=ve("div","flatpickr-weekdays");for(var e=g.config.showMonths;e--;){var n=ve("div","flatpickr-weekdaycontainer");g.weekdayContainer.appendChild(n)}return K(),g.weekdayContainer}function K(){if(g.weekdayContainer){var e=g.l10n.firstDayOfWeek,n=g.l10n.weekdays.shorthand.slice();0<e&&e<n.length&&(n=n.splice(e,n.length).concat(n.splice(0,e)));for(var t=g.config.showMonths;t--;)g.weekdayContainer.children[t].innerHTML="\n <span class='flatpickr-weekday'>\n "+n.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function U(e,n){n=(n=void 0===n?!0:n)?e:e-g.currentMonth;n<0&&!0===g._hidePrevMonthArrow||0<n&&!0===g._hideNextMonthArrow||(g.currentMonth+=n,(g.currentMonth<0||11<g.currentMonth)&&(g.currentYear+=11<g.currentMonth?1:-1,g.currentMonth=(g.currentMonth+12)%12,x("onYearChange"),m()),s(),x("onMonthChange"),E())}function w(e){return!(!g.config.appendTo||!g.config.appendTo.contains(e))||g.calendarContainer.contains(e)}function q(e){var n,t,a;g.isOpen&&!g.config.inline&&(a=w(n="function"==typeof(a=e).composedPath?a.composedPath()[0]:a.target),t=n===g.input||n===g.altInput||g.element.contains(n)||e.path&&e.path.indexOf&&(~e.path.indexOf(g.input)||~e.path.indexOf(g.altInput)),t="blur"===e.type?t&&e.relatedTarget&&!w(e.relatedTarget):!t&&!a&&!w(e.relatedTarget),a=!g.config.ignoredFocusElements.some(function(e){return e.contains(n)}),t)&&a&&(g.timeContainer!==undefined&&g.minuteElement!==undefined&&g.hourElement!==undefined&&l(),g.close(),"range"===g.config.mode)&&1===g.selectedDates.length&&(g.clear(!1),g.redraw())}function v(e){var n;!e||g.config.minDate&&e<g.config.minDate.getFullYear()||g.config.maxDate&&e>g.config.maxDate.getFullYear()||(n=g.currentYear!==e,g.currentYear=e||g.currentYear,g.config.maxDate&&g.currentYear===g.config.maxDate.getFullYear()?g.currentMonth=Math.min(g.config.maxDate.getMonth(),g.currentMonth):g.config.minDate&&g.currentYear===g.config.minDate.getFullYear()&&(g.currentMonth=Math.max(g.config.minDate.getMonth(),g.currentMonth)),n&&(g.redraw(),x("onYearChange"),m()))}function C(e,n){void 0===n&&(n=!0);var t=g.parseDate(e,undefined,n);if(g.config.minDate&&t&&Te(t,g.config.minDate,n!==undefined?n:!g.minDateHasTime)<0||g.config.maxDate&&t&&0<Te(t,g.config.maxDate,n!==undefined?n:!g.maxDateHasTime))return!1;if(0===g.config.enable.length&&0===g.config.disable.length)return!0;if(t===undefined)return!1;for(var a,i=0<g.config.enable.length,o=i?g.config.enable:g.config.disable,r=0,d=void 0;r<o.length;r++){if("function"==typeof(d=o[r])&&d(t))return i;if(d instanceof Date&&t!==undefined&&d.getTime()===t.getTime())return i;if("string"==typeof d&&t!==undefined)return(a=g.parseDate(d,undefined,!0))&&a.getTime()===t.getTime()?i:!i;if("object"==typeof d&&t!==undefined&&d.from&&d.to&&t.getTime()>=d.from.getTime()&&t.getTime()<=d.to.getTime())return i}return!i}function b(e){return g.daysContainer!==undefined&&-1===e.className.indexOf("hidden")&&g.daysContainer.contains(e)}function $(e){var n=e.target===g._input,t=g.config.allowInput,a=g.isOpen&&(!t||!n),i=g.config.inline&&n&&!t;if(13===e.keyCode&&n){if(t)return g.setDate(g._input.value,!0,e.target===g.altInput?g.config.altFormat:g.config.dateFormat),e.target.blur();g.open()}else if(w(e.target)||a||i){var o,r=!!g.timeContainer&&g.timeContainer.contains(e.target);switch(e.keyCode){case 13:r?(e.preventDefault(),l(),ee()):ne(e);break;case 27:e.preventDefault(),ee();break;case 8:case 46:n&&!g.config.allowInput&&(e.preventDefault(),g.clear());break;case 37:case 39:r||n?g.hourElement&&g.hourElement.focus():(e.preventDefault(),g.daysContainer!==undefined&&(!1===t||document.activeElement&&b(document.activeElement))&&(d=39===e.keyCode?1:-1,e.ctrlKey?(e.stopPropagation(),U(d),D(h(1),0)):D(undefined,d)));break;case 38:case 40:e.preventDefault();var d=40===e.keyCode?1:-1;g.daysContainer&&e.target.$i!==undefined||e.target===g.input||e.target===g.altInput?e.ctrlKey?(e.stopPropagation(),v(g.currentYear-d),D(h(1),0)):r||D(undefined,7*d):e.target===g.currentYearElement?v(g.currentYear-d):g.config.enableTime&&(!r&&g.hourElement&&g.hourElement.focus(),l(e),g._debouncedChange());break;case 9:r?-1!==(o=(d=[g.hourElement,g.minuteElement,g.secondElement,g.amPM].concat(g.pluginElements).filter(function(e){return e})).indexOf(e.target))&&(o=d[o+(e.shiftKey?-1:1)],e.preventDefault(),(o||g._input).focus()):!g.config.noCalendar&&g.daysContainer&&g.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),g._input.focus())}}if(g.amPM!==undefined&&e.target===g.amPM)switch(e.key){case g.l10n.amPM[0].charAt(0):case g.l10n.amPM[0].charAt(0).toLowerCase():g.amPM.textContent=g.l10n.amPM[0],c(),T();break;case g.l10n.amPM[1].charAt(0):case g.l10n.amPM[1].charAt(0).toLowerCase():g.amPM.textContent=g.l10n.amPM[1],c(),T()}(n||w(e.target))&&x("onKeyDown",e)}function z(a){if(1===g.selectedDates.length&&(!a||a.classList.contains("flatpickr-day")&&!a.classList.contains("flatpickr-disabled"))){for(var i=(a||g.days.firstElementChild).dateObj.getTime(),o=g.parseDate(g.selectedDates[0],undefined,!0).getTime(),e=Math.min(i,g.selectedDates[0].getTime()),n=Math.max(i,g.selectedDates[0].getTime()),r=!1,d=0,l=0,t=e;t<n;t+=Ie.DAY)C(new Date(t),!0)||(r=r||e<t&&t<n,t<o&&(!d||d<t)?d=t:o<t&&(!l||t<l)&&(l=t));for(var c=0;c<g.config.showMonths;c++)for(var u=g.daysContainer.children[c],s=0,f=u.children.length;s<f;s++)!function(e){var n=u.children[e],e=n.dateObj.getTime(),t=0<d&&e<d||0<l&&l<e;t?(n.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)})):r&&!t||(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),a!==undefined&&(a.classList.add(i<=g.selectedDates[0].getTime()?"startRange":"endRange"),o<i&&e===o?n.classList.add("startRange"):i<o&&e===o&&n.classList.add("endRange"),d<=e)&&(0===l||e<=l)&&ke(e,o,i)&&n.classList.add("inRange"))}(s)}}function G(){!g.isOpen||g.config["static"]||g.config.inline||M()}function V(){g.setDate(g.config.minDate!==undefined?new Date(g.config.minDate.getTime()):new Date,!0),L(),T()}function Z(t){return function(e){var e=g.config["_"+t+"Date"]=g.parseDate(e,g.config.dateFormat),n=g.config["_"+("min"===t?"max":"min")+"Date"];e!==undefined&&(g["min"===t?"minDateHasTime":"maxDateHasTime"]=0<e.getHours()||0<e.getMinutes()||0<e.getSeconds()),g.selectedDates&&(g.selectedDates=g.selectedDates.filter(function(e){return C(e)}),g.selectedDates.length||"min"!==t||a(e),T()),g.daysContainer&&(X(),e!==undefined?g.currentYearElement[t]=e.getFullYear().toString():g.currentYearElement.removeAttribute(t),g.currentYearElement.disabled=!!n&&e!==undefined&&n.getFullYear()===e.getFullYear())}}function Q(){"object"!=typeof g.config.locale&&"undefined"==typeof Oe.l10ns[g.config.locale]&&g.config.errorHandler(new Error("flatpickr: invalid locale "+g.config.locale)),g.l10n=ue({},Oe.l10ns["default"],"object"==typeof g.config.locale?g.config.locale:"default"!==g.config.locale?Oe.l10ns[g.config.locale]:undefined),ye.K="("+g.l10n.amPM[0]+"|"+g.l10n.amPM[1]+"|"+g.l10n.amPM[0].toLowerCase()+"|"+g.l10n.amPM[1].toLowerCase()+")",ue({},P,JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr===undefined&&Oe.defaultConfig.time_24hr===undefined&&(g.config.time_24hr=g.l10n.time_24hr),g.formatDate=xe(g),g.parseDate=Ee({config:g.config,l10n:g.l10n})}function M(e){var n,t,a,i,o,r;g.calendarContainer===undefined||(x("onPreCalendarPosition"),e=e||g._positionElement,t=Array.prototype.reduce.call(g.calendarContainer.children,function(e,n){return e+n.offsetHeight},0),r=g.calendarContainer.offsetWidth,o=(i=g.config.position.split(" "))[0],i=1<i.length?i[1]:null,n=e.getBoundingClientRect(),a=window.innerHeight-n.bottom,o="above"===o||"below"!==o&&a<t&&n.top>t,a=window.pageYOffset+n.top+(o?-t-2:e.offsetHeight+2),we(g.calendarContainer,"arrowTop",!o),we(g.calendarContainer,"arrowBottom",o),g.config.inline)||(t=window.pageXOffset+n.left-(null!=i&&"center"===i?(r-n.width)/2:0),e=window.document.body.offsetWidth-(window.pageXOffset+n.right),o=t+r>window.document.body.offsetWidth,i=e+r>window.document.body.offsetWidth,we(g.calendarContainer,"rightMost",o),g.config["static"])||(g.calendarContainer.style.top=a+"px",o?i?(a=document.styleSheets[0])!==undefined&&(o=window.document.body.offsetWidth,i=Math.max(0,o/2-r/2),o=a.cssRules.length,r="{left:"+n.left+"px;right:auto;}",we(g.calendarContainer,"rightMost",!1),we(g.calendarContainer,"centerMost",!0),a.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+r,o),g.calendarContainer.style.left=i+"px",g.calendarContainer.style.right="auto"):(g.calendarContainer.style.left="auto",g.calendarContainer.style.right=e+"px"):(g.calendarContainer.style.left=t+"px",g.calendarContainer.style.right="auto"))}function X(){g.config.noCalendar||g.isMobile||(E(),s())}function ee(){g._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||navigator.msMaxTouchPoints!==undefined?setTimeout(g.close,0):g.close()}function ne(e){e.preventDefault(),e.stopPropagation();var n,t,a,e=function i(e,n){return n(e)?e:e.parentNode?i(e.parentNode,n):undefined}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});e!==undefined&&(e=e,n=((t=g.latestSelectedDateObj=new Date(e.dateObj.getTime())).getMonth()<g.currentMonth||t.getMonth()>g.currentMonth+g.config.showMonths-1)&&"range"!==g.config.mode,g.selectedDateElem=e,"single"===g.config.mode?g.selectedDates=[t]:"multiple"===g.config.mode?(a=oe(t))?g.selectedDates.splice(parseInt(a),1):g.selectedDates.push(t):"range"===g.config.mode&&(2===g.selectedDates.length&&g.clear(!1,!1),g.latestSelectedDateObj=t,g.selectedDates.push(t),0!==Te(t,g.selectedDates[0],!0))&&g.selectedDates.sort(function(e,n){return e.getTime()-n.getTime()}),c(),n&&(a=g.currentYear!==t.getFullYear(),g.currentYear=t.getFullYear(),g.currentMonth=t.getMonth(),a&&(x("onYearChange"),m()),x("onMonthChange")),E(),s(),T(),g.config.enableTime&&setTimeout(function(){return g.showTimeInput=!0},50),n||"range"===g.config.mode||1!==g.config.showMonths?g.selectedDateElem!==undefined&&g.hourElement===undefined&&g.selectedDateElem&&g.selectedDateElem.focus():p(e),g.hourElement!==undefined&&g.hourElement!==undefined&&g.hourElement.focus(),g.config.closeOnSelect&&(t="single"===g.config.mode&&!g.config.enableTime,a="range"===g.config.mode&&2===g.selectedDates.length&&!g.config.enableTime,t||a)&&ee(),o())}g.parseDate=Ee({config:g.config,l10n:g.l10n}),g._handlers=[],g.pluginElements=[],g.loadedPlugins=[],g._bind=d,g._setHoursFromDate=a,g._positionCalendar=M,g.changeMonth=U,g.changeYear=v,g.clear=function(e,n){void 0===e&&(e=!0);void 0===n&&(n=!0);g.input.value="",g.altInput!==undefined&&(g.altInput.value="");g.mobileInput!==undefined&&(g.mobileInput.value="");g.selectedDates=[],g.latestSelectedDateObj=undefined,!0===n&&(g.currentYear=g._initialDate.getFullYear(),g.currentMonth=g._initialDate.getMonth());!(g.showTimeInput=!1)===g.config.enableTime&&L();g.redraw(),e&&x("onChange")},g.close=function(){g.isOpen=!1,g.isMobile||(g.calendarContainer!==undefined&&g.calendarContainer.classList.remove("open"),g._input!==undefined&&g._input.classList.remove("active"));x("onClose")},g._createElement=ve,g.destroy=function(){g.config!==undefined&&x("onDestroy");for(var e=g._handlers.length;e--;){var n=g._handlers[e];n.element.removeEventListener(n.event,n.handler,n.options)}if(g._handlers=[],g.mobileInput)g.mobileInput.parentNode&&g.mobileInput.parentNode.removeChild(g.mobileInput),g.mobileInput=undefined;else if(g.calendarContainer&&g.calendarContainer.parentNode)if(g.config["static"]&&g.calendarContainer.parentNode){var t=g.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else g.calendarContainer.parentNode.removeChild(g.calendarContainer);g.altInput&&(g.input.type="text",g.altInput.parentNode&&g.altInput.parentNode.removeChild(g.altInput),delete g.altInput);g.input&&(g.input.type=g.input._type,g.input.classList.remove("flatpickr-input"),g.input.removeAttribute("readonly"),g.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 g[e]}catch(n){}})},g.isEnabled=C,g.jumpToDate=i,g.open=function(e,n){void 0===n&&(n=g._positionElement);var t;!0===g.isMobile?(e&&(e.preventDefault(),e.target)&&e.target.blur(),g.mobileInput!==undefined&&(g.mobileInput.focus(),g.mobileInput.click()),x("onOpen")):g._input.disabled||g.config.inline||(t=g.isOpen,g.isOpen=!0,t||(g.calendarContainer.classList.add("open"),g._input.classList.add("active"),x("onOpen"),M(n)),!0===g.config.enableTime&&!0===g.config.noCalendar&&(0===g.selectedDates.length&&V(),!1!==g.config.allowInput||e!==undefined&&g.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return g.hourElement.select()},50)))},g.redraw=X,g.set=function(e,n){if(null!==e&&"object"==typeof e)for(var t in Object.assign(g.config,e),e)y[t]!==undefined&&y[t].forEach(function(e){return e()});else g.config[e]=n,y[e]!==undefined?y[e].forEach(function(e){return e()}):-1<se.indexOf(e)&&(g.config[e]=De(n));g.redraw(),T(!1)},g.setDate=function(e,n,t){void 0===n&&(n=!1);void 0===t&&(t=g.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return g.clear(n);te(e,t),g.showTimeInput=0<g.selectedDates.length,g.latestSelectedDateObj=g.selectedDates[g.selectedDates.length-1],g.redraw(),i(),a(),0===g.selectedDates.length&&g.clear(!1);T(n),n&&x("onChange")},g.toggle=function(e){if(!0===g.isOpen)return g.close();g.open(e)};var y={locale:[Q,K],showMonths:[B,j,J],minDate:[i],maxDate:[i]};function te(e,n){var t=[];if(e instanceof Array)t=e.map(function(e){return g.parseDate(e,n)});else if(e instanceof Date||"number"==typeof e)t=[g.parseDate(e,n)];else if("string"==typeof e)switch(g.config.mode){case"single":case"time":t=[g.parseDate(e,n)];break;case"multiple":t=e.split(g.config.conjunction).map(function(e){return g.parseDate(e,n)});break;case"range":t=e.split(g.l10n.rangeSeparator).map(function(e){return g.parseDate(e,n)})}else g.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));g.selectedDates=t.filter(function(e){return e instanceof Date&&C(e,!1)}),"range"===g.config.mode&&g.selectedDates.sort(function(e,n){return e.getTime()-n.getTime()})}function ae(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?g.parseDate(e,undefined,!0):e&&"object"==typeof e&&e.from&&e.to?{from:g.parseDate(e.from,undefined),to:g.parseDate(e.to,undefined)}:e}).filter(function(e){return e})}function x(e,n){if(g.config!==undefined){var t=g.config[e];if(t!==undefined&&0<t.length)for(var a=0;t[a]&&a<t.length;a++)t[a](g.selectedDates,g.input.value,g,n);"onChange"===e&&(g.input.dispatchEvent(ie("change")),g.input.dispatchEvent(ie("input")))}}function ie(e){var n=document.createEvent("Event");return n.initEvent(e,!0,!0),n}function oe(e){for(var n=0;n<g.selectedDates.length;n++)if(0===Te(g.selectedDates[n],e))return""+n;return!1}function E(){g.config.noCalendar||g.isMobile||!g.monthNav||(g.yearElements.forEach(function(e,n){var t=new Date(g.currentYear,g.currentMonth,1);t.setMonth(g.currentMonth+n),1<g.config.showMonths||"static"===g.config.monthSelectorType?g.monthElements[n].textContent=Me(t.getMonth(),g.config.shorthandCurrentMonth,g.l10n)+" ":g.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()}),g._hidePrevMonthArrow=g.config.minDate!==undefined&&(g.currentYear===g.config.minDate.getFullYear()?g.currentMonth<=g.config.minDate.getMonth():g.currentYear<g.config.minDate.getFullYear()),g._hideNextMonthArrow=g.config.maxDate!==undefined&&(g.currentYear===g.config.maxDate.getFullYear()?g.currentMonth+1>g.config.maxDate.getMonth():g.currentYear>g.config.maxDate.getFullYear()))}function re(n){return g.selectedDates.map(function(e){return g.formatDate(e,n)}).filter(function(e,n,t){return"range"!==g.config.mode||g.config.enableTime||t.indexOf(e)===n}).join("range"!==g.config.mode?g.config.conjunction:g.l10n.rangeSeparator)}function T(e){void 0===e&&(e=!0),g.mobileInput!==undefined&&g.mobileFormatStr&&(g.mobileInput.value=g.latestSelectedDateObj!==undefined?g.formatDate(g.latestSelectedDateObj,g.mobileFormatStr):""),g.input.value=re(g.config.dateFormat),g.altInput!==undefined&&(g.altInput.value=re(g.config.altFormat)),!1!==e&&x("onValueUpdate")}function de(e){var n=g.prevMonthNav.contains(e.target),t=g.nextMonthNav.contains(e.target);n||t?U(n?-1:1):0<=g.yearElements.indexOf(e.target)?e.target.select():e.target.classList.contains("arrowUp")?g.changeYear(g.currentYear+1):e.target.classList.contains("arrowDown")&&g.changeYear(g.currentYear-1)}g.element=g.input=e,g.isOpen=!1;var t=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],k=ue({},P,JSON.parse(JSON.stringify(e.dataset||{}))),I={},S=(g.config.parseDate=k.parseDate,g.config.formatDate=k.formatDate,Object.defineProperty(g.config,"enable",{get:function(){return g.config._enable},set:function(e){g.config._enable=ae(e)}}),Object.defineProperty(g.config,"disable",{get:function(){return g.config._disable},set:function(e){g.config._disable=ae(e)}}),"time"===k.mode);k.dateFormat||!k.enableTime&&!S||(F=Oe.defaultConfig.dateFormat||fe.dateFormat,I.dateFormat=k.noCalendar||S?"H:i"+(k.enableSeconds?":S":""):F+" H:i"+(k.enableSeconds?":S":"")),k.altInput&&(k.enableTime||S)&&!k.altFormat&&(F=Oe.defaultConfig.altFormat||fe.altFormat,I.altFormat=k.noCalendar||S?"h:i"+(k.enableSeconds?":S K":" K"):F+(" h:i"+(k.enableSeconds?":S":""))+" K"),k.altInputClass||(g.config.altInputClass=g.input.className+" "+g.config.altInputClass),Object.defineProperty(g.config,"minDate",{get:function(){return g.config._minDate},set:Z("min")}),Object.defineProperty(g.config,"maxDate",{get:function(){return g.config._maxDate},set:Z("max")}),S=function(n){return function(e){g.config["min"===n?"_minTime":"_maxTime"]=g.parseDate(e,"H:i:S")}},Object.defineProperty(g.config,"minTime",{get:function(){return g.config._minTime},set:S("min")}),Object.defineProperty(g.config,"maxTime",{get:function(){return g.config._maxTime},set:S("max")}),"time"===k.mode&&(g.config.noCalendar=!0,g.config.enableTime=!0),Object.assign(g.config,I,k);for(var O=0;O<t.length;O++)g.config[t[O]]=!0===g.config[t[O]]||"true"===g.config[t[O]];for(se.filter(function(e){return g.config[e]!==undefined}).forEach(function(e){g.config[e]=De(g.config[e]||[]).map(H)}),g.isMobile=!g.config.disableMobile&&!g.config.inline&&"single"===g.config.mode&&!g.config.disable.length&&!g.config.enable.length&&!g.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),O=0;O<g.config.plugins.length;O++){var _,le=g.config.plugins[O](g)||{};for(_ in le)-1<se.indexOf(_)?g.config[_]=De(le[_]).map(H).concat(g.config[_]):"undefined"==typeof k[_]&&(g.config[_]=le[_])}x("onParseConfig"),Q(),g.input=g.config.wrap?e.querySelector("[data-input]"):e,g.input?(g.input._type=g.input.type,g.input.type="text",g.input.classList.add("flatpickr-input"),g._input=g.input,g.config.altInput&&(g.altInput=ve(g.input.nodeName,g.config.altInputClass),g._input=g.altInput,g.altInput.placeholder=g.input.placeholder,g.altInput.disabled=g.input.disabled,g.altInput.required=g.input.required,g.altInput.tabIndex=g.input.tabIndex,g.altInput.type="text",g.input.setAttribute("type","hidden"),!g.config["static"])&&g.input.parentNode&&g.input.parentNode.insertBefore(g.altInput,g.input.nextSibling),g.config.allowInput||g._input.setAttribute("readonly","readonly"),g._positionElement=g.config.positionElement||g._input):g.config.errorHandler(new Error("Invalid input element specified")),g.selectedDates=[],g.now=g.parseDate(g.config.now)||new Date;var F=g.config.defaultDate||("INPUT"!==g.input.nodeName&&"TEXTAREA"!==g.input.nodeName||!g.input.placeholder||g.input.value!==g.input.placeholder?g.input.value:null);if(F&&te(F,g.config.dateFormat),g._initialDate=0<g.selectedDates.length?g.selectedDates[0]:g.config.minDate&&g.config.minDate.getTime()>g.now.getTime()?g.config.minDate:g.config.maxDate&&g.config.maxDate.getTime()<g.now.getTime()?g.config.maxDate:g.now,g.currentYear=g._initialDate.getFullYear(),g.currentMonth=g._initialDate.getMonth(),0<g.selectedDates.length&&(g.latestSelectedDateObj=g.selectedDates[0]),g.config.minTime!==undefined&&(g.config.minTime=g.parseDate(g.config.minTime,"H:i")),g.config.maxTime!==undefined&&(g.config.maxTime=g.parseDate(g.config.maxTime,"H:i")),g.minDateHasTime=!!g.config.minDate&&(0<g.config.minDate.getHours()||0<g.config.minDate.getMinutes()||0<g.config.minDate.getSeconds()),g.maxDateHasTime=!!g.config.maxDate&&(0<g.config.maxDate.getHours()||0<g.config.maxDate.getMinutes()||0<g.config.maxDate.getSeconds()),Object.defineProperty(g,"showTimeInput",{get:function(){return g._showTimeInput},set:function(e){g._showTimeInput=e,g.calendarContainer&&we(g.calendarContainer,"showTimeInput",e),g.isOpen&&M()}}),g.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=g.currentMonth),void 0===n&&(n=g.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:g.l10n.daysInMonth[e]}},!g.isMobile){var N,S=window.document.createDocumentFragment(),Y=(g.calendarContainer=ve("div","flatpickr-calendar"),g.calendarContainer.tabIndex=-1,g.config.noCalendar||(S.appendChild((g.monthNav=ve("div","flatpickr-months"),g.yearElements=[],g.monthElements=[],g.prevMonthNav=ve("span","flatpickr-prev-month"),g.prevMonthNav.innerHTML=g.config.prevArrow,g.nextMonthNav=ve("span","flatpickr-next-month"),g.nextMonthNav.innerHTML=g.config.nextArrow,B(),Object.defineProperty(g,"_hidePrevMonthArrow",{get:function(){return g.__hidePrevMonthArrow},set:function(e){g.__hidePrevMonthArrow!==e&&(we(g.prevMonthNav,"flatpickr-disabled",e),g.__hidePrevMonthArrow=e)}}),Object.defineProperty(g,"_hideNextMonthArrow",{get:function(){return g.__hideNextMonthArrow},set:function(e){g.__hideNextMonthArrow!==e&&(we(g.nextMonthNav,"flatpickr-disabled",e),g.__hideNextMonthArrow=e)}}),g.currentYearElement=g.yearElements[0],E(),g.monthNav)),g.innerContainer=ve("div","flatpickr-innerContainer"),g.config.weekNumbers&&(Y=function(){g.calendarContainer.classList.add("hasWeeks");var e=ve("div","flatpickr-weekwrapper"),n=(e.appendChild(ve("span","flatpickr-weekday",g.l10n.weekAbbreviation)),ve("div","flatpickr-weeks"));return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),N=Y.weekWrapper,Y=Y.weekNumbers,g.innerContainer.appendChild(N),g.weekNumbers=Y,g.weekWrapper=N),g.rContainer=ve("div","flatpickr-rContainer"),g.rContainer.appendChild(J()),g.daysContainer||(g.daysContainer=ve("div","flatpickr-days"),g.daysContainer.tabIndex=-1),s(),g.rContainer.appendChild(g.daysContainer),g.innerContainer.appendChild(g.rContainer),S.appendChild(g.innerContainer)),g.config.enableTime&&S.appendChild(function(){g.calendarContainer.classList.add("hasTime"),g.config.noCalendar&&g.calendarContainer.classList.add("noCalendar");g.timeContainer=ve("div","flatpickr-time"),g.timeContainer.tabIndex=-1;var e=ve("span","flatpickr-time-separator",":"),n=be("flatpickr-hour",{"aria-label":g.l10n.hourAriaLabel}),t=(g.hourElement=n.getElementsByTagName("input")[0],be("flatpickr-minute",{"aria-label":g.l10n.minuteAriaLabel}));g.minuteElement=t.getElementsByTagName("input")[0],g.hourElement.tabIndex=g.minuteElement.tabIndex=-1,g.hourElement.value=ge(g.latestSelectedDateObj?g.latestSelectedDateObj.getHours():g.config.time_24hr?g.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(g.config.defaultHour)),g.minuteElement.value=ge(g.latestSelectedDateObj?g.latestSelectedDateObj.getMinutes():g.config.defaultMinute),g.hourElement.setAttribute("step",g.config.hourIncrement.toString()),g.minuteElement.setAttribute("step",g.config.minuteIncrement.toString()),g.hourElement.setAttribute("min",g.config.time_24hr?"0":"1"),g.hourElement.setAttribute("max",g.config.time_24hr?"23":"12"),g.minuteElement.setAttribute("min","0"),g.minuteElement.setAttribute("max","59"),g.timeContainer.appendChild(n),g.timeContainer.appendChild(e),g.timeContainer.appendChild(t),g.config.time_24hr&&g.timeContainer.classList.add("time24hr");g.config.enableSeconds&&(g.timeContainer.classList.add("hasSeconds"),n=be("flatpickr-second"),g.secondElement=n.getElementsByTagName("input")[0],g.secondElement.value=ge(g.latestSelectedDateObj?g.latestSelectedDateObj.getSeconds():g.config.defaultSeconds),g.secondElement.setAttribute("step",g.minuteElement.getAttribute("step")),g.secondElement.setAttribute("min","0"),g.secondElement.setAttribute("max","59"),g.timeContainer.appendChild(ve("span","flatpickr-time-separator",":")),g.timeContainer.appendChild(n));g.config.time_24hr||(g.amPM=ve("span","flatpickr-am-pm",g.l10n.amPM[pe(11<(g.latestSelectedDateObj?g.hourElement.value:g.config.defaultHour))]),g.amPM.title=g.l10n.toggleTitle,g.amPM.tabIndex=-1,g.timeContainer.appendChild(g.amPM));return g.timeContainer}()),we(g.calendarContainer,"rangeMode","range"===g.config.mode),we(g.calendarContainer,"animate",!0===g.config.animate),we(g.calendarContainer,"multiMonth",1<g.config.showMonths),g.calendarContainer.appendChild(S),g.config.appendTo!==undefined&&g.config.appendTo.nodeType!==undefined);(g.config.inline||g.config["static"])&&(g.calendarContainer.classList.add(g.config.inline?"inline":"static"),g.config.inline&&(!Y&&g.element.parentNode?g.element.parentNode.insertBefore(g.calendarContainer,g._input.nextSibling):g.config.appendTo!==undefined&&g.config.appendTo.appendChild(g.calendarContainer)),g.config["static"])&&(N=ve("div","flatpickr-wrapper"),g.element.parentNode&&g.element.parentNode.insertBefore(N,g.element),N.appendChild(g.element),g.altInput&&N.appendChild(g.altInput),N.appendChild(g.calendarContainer)),g.config["static"]||g.config.inline||(g.config.appendTo!==undefined?g.config.appendTo:window.document.body).appendChild(g.calendarContainer)}if(g.config.wrap&&["open","close","toggle","clear"].forEach(function(n){Array.prototype.forEach.call(g.element.querySelectorAll("[data-"+n+"]"),function(e){return d(e,"click",g[n])})}),g.isMobile){var A=g.config.enableTime?g.config.noCalendar?"time":"datetime-local":"date";g.mobileInput=ve("input",g.input.className+" flatpickr-mobile"),g.mobileInput.step=g.input.getAttribute("step")||"any",g.mobileInput.tabIndex=1,g.mobileInput.type=A,g.mobileInput.disabled=g.input.disabled,g.mobileInput.required=g.input.required,g.mobileInput.placeholder=g.input.placeholder,g.mobileFormatStr="datetime-local"==A?"Y-m-d\\TH:i:S":"date"==A?"Y-m-d":"H:i:S",0<g.selectedDates.length&&(g.mobileInput.defaultValue=g.mobileInput.value=g.formatDate(g.selectedDates[0],g.mobileFormatStr)),g.config.minDate&&(g.mobileInput.min=g.formatDate(g.config.minDate,"Y-m-d")),g.config.maxDate&&(g.mobileInput.max=g.formatDate(g.config.maxDate,"Y-m-d")),g.input.type="hidden",g.altInput!==undefined&&(g.altInput.type="hidden");try{g.input.parentNode&&g.input.parentNode.insertBefore(g.mobileInput,g.input.nextSibling)}catch(ce){}d(g.mobileInput,"change",function(e){g.setDate(e.target.value,!1,g.mobileFormatStr),x("onChange"),x("onClose")})}else A=he(G,50),g._debouncedChange=he(o,Se),g.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&d(g.daysContainer,"mouseover",function(e){"range"===g.config.mode&&z(e.target)}),d(window.document.body,"keydown",$),g.config.inline||g.config["static"]||d(window,"resize",A),window.ontouchstart!==undefined?d(window.document,"touchstart",q):d(window.document,"mousedown",n(q)),d(window.document,"focus",q,{capture:!0}),!0===g.config.clickOpens&&(d(g._input,"focus",g.open),d(g._input,"mousedown",n(g.open))),g.daysContainer!==undefined&&(d(g.monthNav,"mousedown",n(de)),d(g.monthNav,["keyup","increment"],W),d(g.daysContainer,"mousedown",n(ne))),g.timeContainer!==undefined&&g.minuteElement!==undefined&&g.hourElement!==undefined&&(d(g.timeContainer,["increment"],l),d(g.timeContainer,"blur",l,{capture:!0}),d(g.timeContainer,"mousedown",n(R)),d([g.hourElement,g.minuteElement],["focus","click"],function(e){return e.target.select()}),g.secondElement!==undefined&&d(g.secondElement,"focus",function(){return g.secondElement&&g.secondElement.select()}),g.amPM!==undefined)&&d(g.amPM,"mousedown",n(function(e){l(e),o()}));return(g.selectedDates.length||g.config.noCalendar)&&(g.config.enableTime&&a(g.config.noCalendar?g.latestSelectedDateObj||g.config.minDate:undefined),T(!1)),j(),g.showTimeInput=0<g.selectedDates.length||g.config.noCalendar,I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),!g.isMobile&&I&&M(),x("onReady"),g}function t(e,n){for(var t=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),a=[],i=0;i<t.length;i++){var o=t[i];try{null===o.getAttribute("data-fp-omit")&&(o._flatpickr!==undefined&&(o._flatpickr.destroy(),o._flatpickr=undefined),o._flatpickr=d(o,n||{}),a.push(o._flatpickr))}catch(r){console.error(r)}}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 t(this,e)},HTMLElement.prototype.flatpickr=function(e){return t([this],e)});var Oe=function(e,n){return"string"==typeof e?t(window.document.querySelectorAll(e),n):e instanceof Node?t([e],n):t(e,n)};return Oe.defaultConfig={},Oe.l10ns={en:ue({},me),"default":ue({},me)},Oe.localize=function(e){Oe.l10ns["default"]=ue({},Oe.l10ns["default"],e)},Oe.setDefaults=function(e){Oe.defaultConfig=ue({},Oe.defaultConfig,e)},Oe.parseDate=Ee({}),Oe.formatDate=xe({}),Oe.compareDates=Te,"undefined"!=typeof jQuery&&"undefined"!=typeof jQuery.fn&&(jQuery.fn.flatpickr=function(e){return t(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=Oe),Oe});