persianflatpickr
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1,2 +0,2 @@ | ||
/* flatpickr v0.0.4,, @license MIT */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).flatpickr=t()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var a=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],r=0,l=i.length;r<l;r++,o++)a[o]=i[r];return a}function n(e,t){return e-t*Math.floor(e/t)}function a(e,t,n){return 1721424.5+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*t-362)/12+(2>=t?0:0!=e%4||0==e%100&&0!=e%400?-2:-1)+n)}function o(e){var t,o,i,r;return t=(e=Math.floor(e-.5)+.5)-1721425.5,o=Math.floor(t/146097),i=n(t,146097),t=Math.floor(i/36524),r=n(i,36524),o=400*o+100*t+4*(i=Math.floor(r/1461))+(r=Math.floor(n(r,1461)/365)),4!=t&&4!=r&&o++,[o,t=Math.floor((12*(e-a(o,1,1)+(e<a(o,3,1)?0:0!=o%4||0==o%100&&0!=o%400?2:1))+373)/367),e-a(o,t,1)+1]}function i(e,t,a){var o;return o=474+n(e-=0<=e?474:473,2820),a+(7>=t?31*(t-1):30*(t-1)+6)+Math.floor((682*o-110)/2816)+365*(o-1)+1029983*Math.floor(e/2820)+1948319.5}function r(e){var t,a,o;return a=(e=Math.floor(e)+.5)-i(475,1,1),t=Math.floor(a/1029983),1029982==(o=n(a,1029983))?a=2820:(a=Math.floor(o/366),o=n(o,366),a=Math.floor((2134*a+2816*o+2815)/1028522)+a+1),0>=(t=a+2820*t+474)&&t--,[t,a=186>=(a=e-i(t,1,1)+1)?Math.ceil(a/31):Math.ceil((a-6)/30),e-i(t,a,1)+1]}var l=window.Date;function c(e){return e.replace(/[\u06f0-\u06f9]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)-1728)}))}function s(e){return 10>e?"0"+e:e}function d(e,t,n){if(12<t||0>=t){var a=Math.floor((t-1)/12);e+=a,t-=12*a}return i(e,t,n)}function u(e,t,n,a,i,r,s){if("string"==typeof e){var f;e:{f=c(e);var m=/^(\d|\d\d|\d\d\d\d)(?:([-\/])(\d{1,2})(?:\2(\d|\d\d|\d\d\d\d))?)?(([ T])(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|([+-])(\d{2})(?::?(\d{2}))?)?)?$/.exec(f);if(m){var g=m[2],p=m[6],h=+m[1],v=+m[3]||1,D=+m[4]||1,M="/"!=g&&" "!=m[6],w=+m[7]||0,C=+m[8]||0,b=+m[9]||0,y=1e3*+("0."+(m[10]||"0")),T=m[11];f=M&&(T||!m[5]);var x=("-"==m[12]?-1:1)*(60*(+m[13]||0)+(+m[14]||0));if((!T&&"T"!=p||M)&&1e3<=D!=1e3<=h){if(1e3<=D){if("-"==g){f=void 0;break e}h=D=+m[1]}h=(m=o(d(h,v,D)))[0],v=m[1],D=m[2],h=new l(h,v-1,D,w,C,b,y),f&&h.setUTCMinutes(h.getUTCMinutes()-h.getTimezoneOffset()+x),f=h;break e}}f=void 0}if(this.a=f,!this.a)throw"Cannot parse date string"}else 0==arguments.length?this.a=new l:1==arguments.length?this.a=new l(e instanceof u?e.a:e):(f=o(d(e,(t||0)+1,n||1)),this.a=new l(f[0],f[1]-1,f[2],a||0,i||0,r||0,s||0));this._date=this.a,this.c=null,this.b=[0,0,0],this.e=null,this.d=[0,0,0]}function f(e,t,n,a){var i=g(e);void 0!==a&&(i[2]=a),i[t]=n,t=o(d(i[0],i[1],i[2])),e.a.setUTCFullYear(t[0]),e.a.setUTCMonth(t[1]-1,t[2])}function m(e,t,n,a){var i=p(e);i[t]=n,void 0!==a&&(i[2]=a),t=o(d(i[0],i[1],i[2])),e.a.setFullYear(t[0]),e.a.setMonth(t[1]-1,t[2])}function g(e){return e.e!=+e.a&&(e.e=+e.a,e.d=r(a(e.a.getUTCFullYear(),e.a.getUTCMonth()+1,e.a.getUTCDate()))),e.d}function p(e){return e.c!=+e.a&&(e.c=+e.a,e.b=r(a(e.a.getFullYear(),e.a.getMonth()+1,e.a.getDate()))),e.b}u.prototype={},u.prototype.getDate=function(){return p(this)[2]},u.prototype.getMonth=function(){return p(this)[1]-1},u.prototype.getFullYear=function(){return p(this)[0]},u.prototype.getUTCDate=function(){return g(this)[2]},u.prototype.getUTCMonth=function(){return g(this)[1]-1},u.prototype.getUTCFullYear=function(){return g(this)[0]},u.prototype.setDate=function(e){m(this,2,e)},u.prototype.setFullYear=function(e){m(this,0,e)},u.prototype.setMonth=function(e,t){m(this,1,e+1,t)},u.prototype.setUTCDate=function(e){f(this,2,e)},u.prototype.setUTCFullYear=function(e){f(this,0,e)},u.prototype.setUTCMonth=function(e,t){f(this,1,e+1,t)},u.prototype.toLocaleString=function(){return this.getFullYear()+"/"+s(this.getMonth()+1)+"/"+s(this.getDate())+" "+s(this.getHours())+":"+s(this.getMinutes())+":"+s(this.getSeconds())},u.now=l.now,u.parse=function(e){new u(e).getTime()},u.UTC=function(e,t,n,a,i,r,c){return e=o(d(e,t+1,n||1)),l.UTC(e[0],e[1]-1,e[2],a||0,i||0,r||0,c||0)};var h,v="getHours getMilliseconds getMinutes getSeconds getTime getUTCDay getUTCHours getTimezoneOffset getUTCMilliseconds getUTCMinutes getUTCSeconds setHours setMilliseconds setMinutes setSeconds setTime setUTCHours setUTCMilliseconds setUTCMinutes setUTCSeconds toDateString toISOString toJSON toString toLocaleDateString toLocaleTimeString toTimeString toUTCString valueOf getDay".split(" ");function D(){var e=v[h];return function(){return this.a[e].apply(this.a,arguments)}}for(h=0;h<v.length;h++)u.prototype[v[h]]=D();window.JDate=u;var M=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],w={_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",autoFillDefaultTime:!0,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 t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.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: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},C={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنچشنبه","جمعه","شنبه"]},months:{shorthand:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],longhand:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"]},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",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},b=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},y=function(e){return!0===e?1:0};function T(e,t,n){var a;return void 0===n&&(n=!1),function(){var o=this,i=arguments;null!==a&&clearTimeout(a),a=window.setTimeout((function(){a=null,n||e.apply(o,i)}),t),n&&!a&&e.apply(o,i)}}var x=function(e){return e instanceof Array?e:[e]};function E(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function k(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 S(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function I(e,t){var n=k("div","numInputWrapper"),a=k("input","numInput "+e),o=k("span","arrowUp"),i=k("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(o),n.appendChild(i),n}function O(e){return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}var _=function(){},F=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},Y={D:_,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*y(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),o=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},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:_,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:_,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},N={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})"},A={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[A.w(e,t,n)]},F:function(e,t,n){return F(A.n(e,t,n)-1,!1,t)},G:function(e,t,n){return b(A.h(e,t,n))},H:function(e){return b(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[y(e.getHours()>11)]},M:function(e,t){return F(e.getMonth(),!0,t)},S:function(e){return b(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return b(e.getFullYear(),4)},d:function(e){return b(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return b(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return b(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)}},P=function(e){var t=e.config,n=void 0===t?w:t,a=e.l10n,o=void 0===a?C:a,i=e.isMobile,r=void 0!==i&&i;return function(e,t,a){var i=a||o;return void 0===n.formatDate||r?t.split("").map((function(t,a,o){return A[t]&&"\\"!==o[a-1]?A[t](e,i,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,i)}},H=function(e){var t=e.config,n=void 0===t?w:t,a=e.l10n,o=void 0===a?C:a;return function(e,t,a,i){if(0===e||e){var r,l=i||o,c=e;if(e instanceof Date)r=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)r=new Date(e);else if("string"==typeof e){var s=t||(n||w).dateFormat,d=String(e).trim();if("today"===d)r=new Date,a=!0;else if(/Z$/.test(d)||/GMT$/.test(d))r=new Date(e);else if(n&&n.parseDate)r=n.parseDate(e,s);else{r=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var u=void 0,f=[],m=0,g=0,p="";m<s.length;m++){var h=s[m],v="\\"===h,D="\\"===s[m-1]||v;if(N[h]&&!D){p+=N[h];var M=new RegExp(p).exec(e);M&&(u=!0)&&f["Y"!==h?"push":"unshift"]({fn:Y[h],val:M[++g]})}else v||(p+=".");f.forEach((function(e){var t=e.fn,n=e.val;return r=t(r,n,l)||r}))}r=u?r:void 0}}if(r instanceof Date&&!isNaN(r.getTime()))return!0===a&&r.setHours(0,0,0,0),r;n.errorHandler(new Error("Invalid date provided: "+c))}}};function j(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var L=864e5;"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(t){t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))},o=0,i=t;o<i.length;o++){var r=i[o];a(r)}return e});function U(n,a){var o={config:e(e({},w),R.defaultConfig),l10n:C};function i(e){return e.bind(o)}function r(){var e=o.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==o.calendarContainer&&(o.calendarContainer.style.visibility="hidden",o.calendarContainer.style.display="block"),void 0!==o.daysContainer){var t=(o.days.offsetWidth+1)*e.showMonths;o.daysContainer.style.width=t+"px",o.calendarContainer.style.width=t+(void 0!==o.weekWrapper?o.weekWrapper.offsetWidth:0)+"px",o.calendarContainer.style.removeProperty("visibility"),o.calendarContainer.style.removeProperty("display")}}))}function l(e){0===o.selectedDates.length&&ie(),void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=O(e),a=n;void 0!==o.amPM&&n===o.amPM&&(o.amPM.textContent=o.l10n.amPM[y(o.amPM.textContent===o.l10n.amPM[0])]);var i=parseFloat(a.getAttribute("min")),r=parseFloat(a.getAttribute("max")),l=parseFloat(a.getAttribute("step")),c=parseInt(a.value,10),s=e.delta||(t?38===e.which?1:-1:0),d=c+l*s;if(void 0!==a.value&&2===a.value.length){var u=a===o.hourElement,f=a===o.minuteElement;d<i?(d=r+d+y(!u)+(y(u)&&y(!o.amPM)),f&&D(void 0,-1,o.hourElement)):d>r&&(d=a===o.hourElement?d-r-y(!o.amPM):i,f&&D(void 0,1,o.hourElement)),o.amPM&&u&&(1===l?d+c===23:Math.abs(d-c)>l)&&(o.amPM.textContent=o.l10n.amPM[y(o.amPM.textContent===o.l10n.amPM[0])]),a.value=b(d)}}(e);var t=o._input.value;c(),Ce(),o._input.value!==t&&o._debouncedChange()}function c(){if(void 0!==o.hourElement&&void 0!==o.minuteElement){var e,t,n=(parseInt(o.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(o.minuteElement.value,10)||0)%60,i=void 0!==o.secondElement?(parseInt(o.secondElement.value,10)||0)%60:0;void 0!==o.amPM&&(e=n,t=o.amPM.textContent,n=e%12+12*y(t===o.l10n.amPM[1]));var r=void 0!==o.config.minTime||o.config.minDate&&o.minDateHasTime&&o.latestSelectedDateObj&&0===j(o.latestSelectedDateObj,o.config.minDate,!0);if(void 0!==o.config.maxTime||o.config.maxDate&&o.maxDateHasTime&&o.latestSelectedDateObj&&0===j(o.latestSelectedDateObj,o.config.maxDate,!0)){var l=void 0!==o.config.maxTime?o.config.maxTime:o.config.maxDate;(n=Math.min(n,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(r){var c=void 0!==o.config.minTime?o.config.minTime:o.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}u(n,a,i)}}function s(e){var t=e||o.latestSelectedDateObj;t&&u(t.getHours(),t.getMinutes(),t.getSeconds())}function d(){var e=o.config.defaultHour,t=o.config.defaultMinute,n=o.config.defaultSeconds;if(void 0!==o.config.minDate){var a=o.config.minDate.getHours(),i=o.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=o.config.minDate.getSeconds())}if(void 0!==o.config.maxDate){var r=o.config.maxDate.getHours(),l=o.config.maxDate.getMinutes();(e=Math.min(e,r))===r&&(t=Math.min(l,t)),e===r&&t===l&&(n=o.config.maxDate.getSeconds())}u(e,t,n)}function u(e,t,n){void 0!==o.latestSelectedDateObj&&o.latestSelectedDateObj.setHours(e%24,t,n||0,0),o.hourElement&&o.minuteElement&&!o.isMobile&&(o.hourElement.value=b(o.config.time_24hr?e:(12+e)%12+12*y(e%12==0)),o.minuteElement.value=b(t),void 0!==o.amPM&&(o.amPM.textContent=o.l10n.amPM[y(e>=12)]),void 0!==o.secondElement&&(o.secondElement.value=b(n)))}function f(e){var t=O(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&Q(n)}function m(e,t,n,a){return t instanceof Array?t.forEach((function(t){return m(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return m(e,t,n,a)})):(e.addEventListener(t,n,a),void o._handlers.push({element:e,event:t,handler:n,options:a}))}function g(e){return function(t){1===t.which&&e(t)}}function p(){he("onChange")}function h(e,t){var n=void 0!==e?o.parseDate(e):o.latestSelectedDateObj||(o.config.minDate&&o.config.minDate>o.now?o.config.minDate:o.config.maxDate&&o.config.maxDate<o.now?o.config.maxDate:o.now),a=o.currentYear,i=o.currentMonth;try{void 0!==n&&(o.currentYear=n.getFullYear(),o.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,o.config.errorHandler(e)}t&&o.currentYear!==a&&(he("onYearChange"),K()),!t||o.currentYear===a&&o.currentMonth===i||he("onMonthChange"),o.redraw()}function v(e){var t=O(e);~t.className.indexOf("arrow")&&D(e,t.classList.contains("arrowUp")?1:-1)}function D(e,t,n){var a=e&&O(e),o=n||a&&a.parentNode&&a.parentNode.firstChild,i=ve("increment");i.delta=t,o&&o.dispatchEvent(i)}function _(e,t,n,a){var i=X(t,!0),r=k("span","flatpickr-day "+e,t.getDate().toString());return r.dateObj=t,r.$i=a,r.setAttribute("aria-label",o.formatDate(t,o.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===j(t,o.now)&&(o.todayDateElem=r,r.classList.add("today"),r.setAttribute("aria-current","date")),i?(r.tabIndex=-1,De(t)&&(r.classList.add("selected"),o.selectedDateElem=r,"range"===o.config.mode&&(E(r,"startRange",o.selectedDates[0]&&0===j(t,o.selectedDates[0],!0)),E(r,"endRange",o.selectedDates[1]&&0===j(t,o.selectedDates[1],!0)),"nextMonthDay"===e&&r.classList.add("inRange")))):r.classList.add("flatpickr-disabled"),"range"===o.config.mode&&function(e){return!("range"!==o.config.mode||o.selectedDates.length<2)&&(j(e,o.selectedDates[0])>=0&&j(e,o.selectedDates[1])<=0)}(t)&&!De(t)&&r.classList.add("inRange"),o.weekNumbers&&1===o.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&o.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+o.config.getWeek(t)+"</span>"),he("onDayCreate",r),r}function Y(e){e.focus(),"range"===o.config.mode&&ae(e)}function A(e){for(var t=e>0?0:o.config.showMonths-1,n=e>0?o.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=o.daysContainer.children[a],r=e>0?0:i.children.length-1,l=e>0?i.children.length:-1,c=r;c!=l;c+=e){var s=i.children[c];if(-1===s.className.indexOf("hidden")&&X(s.dateObj))return s}}function U(e,t){var n=ee(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==o.selectedDateElem&&ee(o.selectedDateElem)?o.selectedDateElem:void 0!==o.todayDateElem&&ee(o.todayDateElem)?o.todayDateElem:A(t>0?1:-1);return void 0===a?o._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():o.currentMonth,a=t>0?o.config.showMonths:-1,i=t>0?1:-1,r=n-o.currentMonth;r!=a;r+=i)for(var l=o.daysContainer.children[r],c=n-o.currentMonth===r?e.$i+t:t<0?l.children.length-1:0,s=l.children.length,d=c;d>=0&&d<s&&d!=(t>0?s:-1);d+=i){var u=l.children[d];if(-1===u.className.indexOf("hidden")&&X(u.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return Y(u)}o.changeMonth(i),U(A(i),0)}(a,t):Y(a)}function W(e,t){for(var n=(new Date(e,t,1).getDay()-o.l10n.firstDayOfWeek+7)%7,a=o.utils.getDaysInMonth((t-1+12)%12,e),i=o.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),l=o.config.showMonths>1,c=l?"prevMonthDay hidden":"prevMonthDay",s=l?"nextMonthDay hidden":"nextMonthDay",d=a+1-n,u=0;d<=a;d++,u++)r.appendChild(_(c,new Date(e,t-1,d),d,u));for(d=1;d<=i;d++,u++)r.appendChild(_("",new Date(e,t,d),d,u));for(var f=i+1;f<=42-n&&(1===o.config.showMonths||u%7!=0);f++,u++)r.appendChild(_(s,new Date(e,t+1,f%i),f,u));var m=k("div","dayContainer");return m.appendChild(r),m}function B(){if(void 0!==o.daysContainer){S(o.daysContainer),o.weekNumbers&&S(o.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<o.config.showMonths;t++){var n=new Date(o.currentYear,o.currentMonth,1);n.setMonth(o.currentMonth+t),e.appendChild(W(n.getFullYear(),n.getMonth()))}o.daysContainer.appendChild(e),o.days=o.daysContainer.firstChild,"range"===o.config.mode&&1===o.selectedDates.length&&ae()}}function K(){if(!(o.config.showMonths>1||"dropdown"!==o.config.monthSelectorType)){var e=function(e){return!(void 0!==o.config.minDate&&o.currentYear===o.config.minDate.getFullYear()&&e<o.config.minDate.getMonth())&&!(void 0!==o.config.maxDate&&o.currentYear===o.config.maxDate.getFullYear()&&e>o.config.maxDate.getMonth())};o.monthsDropdownContainer.tabIndex=-1,o.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=k("option","flatpickr-monthDropdown-month");n.value=new Date(o.currentYear,t).getMonth().toString(),n.textContent=F(t,o.config.shorthandCurrentMonth,o.l10n),n.tabIndex=-1,o.currentMonth===t&&(n.selected=!0),o.monthsDropdownContainer.appendChild(n)}}}function J(){var e,t=k("div","flatpickr-month"),n=window.document.createDocumentFragment();o.config.showMonths>1||"static"===o.config.monthSelectorType?e=k("span","cur-month"):(o.monthsDropdownContainer=k("select","flatpickr-monthDropdown-months"),o.monthsDropdownContainer.setAttribute("aria-label",o.l10n.monthAriaLabel),m(o.monthsDropdownContainer,"change",(function(e){var t=O(e),n=parseInt(t.value,10);o.changeMonth(n-o.currentMonth),he("onMonthChange")})),K(),e=o.monthsDropdownContainer);var a=I("cur-year",{tabindex:"-1"}),i=a.getElementsByTagName("input")[0];i.setAttribute("aria-label",o.l10n.yearAriaLabel),o.config.minDate&&i.setAttribute("min",o.config.minDate.getFullYear().toString()),o.config.maxDate&&(i.setAttribute("max",o.config.maxDate.getFullYear().toString()),i.disabled=!!o.config.minDate&&o.config.minDate.getFullYear()===o.config.maxDate.getFullYear());var r=k("div","flatpickr-current-month");return r.appendChild(e),r.appendChild(a),n.appendChild(r),t.appendChild(n),{container:t,yearElement:i,monthElement:e}}function q(){S(o.monthNav),o.monthNav.appendChild(o.prevMonthNav),o.config.showMonths&&(o.yearElements=[],o.monthElements=[]);for(var e=o.config.showMonths;e--;){var t=J();o.yearElements.push(t.yearElement),o.monthElements.push(t.monthElement),o.monthNav.appendChild(t.container)}o.monthNav.appendChild(o.nextMonthNav)}function $(){o.weekdayContainer?S(o.weekdayContainer):o.weekdayContainer=k("div","flatpickr-weekdays");for(var e=o.config.showMonths;e--;){var t=k("div","flatpickr-weekdaycontainer");o.weekdayContainer.appendChild(t)}return z(),o.weekdayContainer}function z(){if(o.weekdayContainer){var e=o.l10n.firstDayOfWeek,n=t(o.l10n.weekdays.shorthand);e>0&&e<n.length&&(n=t(n.splice(e,n.length),n.splice(0,e)));for(var a=o.config.showMonths;a--;)o.weekdayContainer.children[a].innerHTML="\n <span class='flatpickr-weekday'>\n "+n.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function Z(e,t){void 0===t&&(t=!0);var n=t?e:e-o.currentMonth;n<0&&!0===o._hidePrevMonthArrow||n>0&&!0===o._hideNextMonthArrow||(o.currentMonth+=n,(o.currentMonth<0||o.currentMonth>11)&&(o.currentYear+=o.currentMonth>11?1:-1,o.currentMonth=(o.currentMonth+12)%12,he("onYearChange"),K()),B(),he("onMonthChange"),Me())}function G(e){return!(!o.config.appendTo||!o.config.appendTo.contains(e))||o.calendarContainer.contains(e)}function V(e){if(o.isOpen&&!o.config.inline){var t=O(e),n=G(t),a=t===o.input||t===o.altInput||o.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(o.input)||~e.path.indexOf(o.altInput)),i="blur"===e.type?a&&e.relatedTarget&&!G(e.relatedTarget):!a&&!n&&!G(e.relatedTarget),r=!o.config.ignoredFocusElements.some((function(e){return e.contains(t)}));i&&r&&(void 0!==o.timeContainer&&void 0!==o.minuteElement&&void 0!==o.hourElement&&l(),o.close(),o.config&&"range"===o.config.mode&&1===o.selectedDates.length&&(o.clear(!1),o.redraw()))}}function Q(e){if(!(!e||o.config.minDate&&e<o.config.minDate.getFullYear()||o.config.maxDate&&e>o.config.maxDate.getFullYear())){var t=e,n=o.currentYear!==t;o.currentYear=t||o.currentYear,o.config.maxDate&&o.currentYear===o.config.maxDate.getFullYear()?o.currentMonth=Math.min(o.config.maxDate.getMonth(),o.currentMonth):o.config.minDate&&o.currentYear===o.config.minDate.getFullYear()&&(o.currentMonth=Math.max(o.config.minDate.getMonth(),o.currentMonth)),n&&(o.redraw(),he("onYearChange"),K())}}function X(e,t){void 0===t&&(t=!0);var n=o.parseDate(e,void 0,t);if(o.config.minDate&&n&&j(n,o.config.minDate,void 0!==t?t:!o.minDateHasTime)<0||o.config.maxDate&&n&&j(n,o.config.maxDate,void 0!==t?t:!o.maxDateHasTime)>0)return!1;if(0===o.config.enable.length&&0===o.config.disable.length)return!0;if(void 0===n)return!1;for(var a=o.config.enable.length>0,i=a?o.config.enable:o.config.disable,r=0,l=void 0;r<i.length;r++){if("function"==typeof(l=i[r])&&l(n))return a;if(l instanceof Date&&void 0!==n&&l.getTime()===n.getTime())return a;if("string"==typeof l&&void 0!==n){var c=o.parseDate(l,void 0,!0);return c&&c.getTime()===n.getTime()?a:!a}if("object"==typeof l&&void 0!==n&&l.from&&l.to&&n.getTime()>=l.from.getTime()&&n.getTime()<=l.to.getTime())return a}return!a}function ee(e){return void 0!==o.daysContainer&&(-1===e.className.indexOf("hidden")&&o.daysContainer.contains(e))}function te(e){e.target===o._input&&o.setDate(o._input.value,!0,e.target===o.altInput?o.config.altFormat:o.config.dateFormat)}function ne(e){var t=O(e),a=o.config.wrap?n.contains(t):t===o._input,i=o.config.allowInput,r=o.isOpen&&(!i||!a),s=o.config.inline&&a&&!i;if(13===e.keyCode&&a){if(i)return o.setDate(o._input.value,!0,t===o.altInput?o.config.altFormat:o.config.dateFormat),t.blur();o.open()}else if(G(t)||r||s){var d=!!o.timeContainer&&o.timeContainer.contains(t);switch(e.keyCode){case 13:d?(e.preventDefault(),l(),ue()):fe(e);break;case 27:e.preventDefault(),ue();break;case 8:case 46:a&&!o.config.allowInput&&(e.preventDefault(),o.clear());break;case 37:case 39:if(d||a)o.hourElement&&o.hourElement.focus();else if(e.preventDefault(),void 0!==o.daysContainer&&(!1===i||document.activeElement&&ee(document.activeElement))){var u=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),Z(u),U(A(1),0)):U(void 0,u)}break;case 38:case 40:e.preventDefault();var f=40===e.keyCode?1:-1;o.daysContainer&&void 0!==t.$i||t===o.input||t===o.altInput?e.ctrlKey?(e.stopPropagation(),Q(o.currentYear-f),U(A(1),0)):d||U(void 0,7*f):t===o.currentYearElement?Q(o.currentYear-f):o.config.enableTime&&(!d&&o.hourElement&&o.hourElement.focus(),l(e),o._debouncedChange());break;case 9:if(d){var m=[o.hourElement,o.minuteElement,o.secondElement,o.amPM].concat(o.pluginElements).filter((function(e){return e})),g=m.indexOf(t);if(-1!==g){var p=m[g+(e.shiftKey?-1:1)];e.preventDefault(),(p||o._input).focus()}}else!o.config.noCalendar&&o.daysContainer&&o.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),o._input.focus())}}if(void 0!==o.amPM&&t===o.amPM)switch(e.key){case o.l10n.amPM[0].charAt(0):case o.l10n.amPM[0].charAt(0).toLowerCase():o.amPM.textContent=o.l10n.amPM[0],c(),Ce();break;case o.l10n.amPM[1].charAt(0):case o.l10n.amPM[1].charAt(0).toLowerCase():o.amPM.textContent=o.l10n.amPM[1],c(),Ce()}(a||G(t))&&he("onKeyDown",e)}function ae(e){if(1===o.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():o.days.firstElementChild.dateObj.getTime(),n=o.parseDate(o.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,o.selectedDates[0].getTime()),i=Math.max(t,o.selectedDates[0].getTime()),r=!1,l=0,c=0,s=a;s<i;s+=L)X(new Date(s),!0)||(r=r||s>a&&s<i,s<n&&(!l||s>l)?l=s:s>n&&(!c||s<c)&&(c=s));for(var d=0;d<o.config.showMonths;d++)for(var u=o.daysContainer.children[d],f=function(a,i){var s,d,f,m=u.children[a],g=m.dateObj.getTime(),p=l>0&&g<l||c>0&&g>c;return p?(m.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){m.classList.remove(e)})),"continue"):r&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){m.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=o.selectedDates[0].getTime()?"startRange":"endRange"),n<t&&g===n?m.classList.add("startRange"):n>t&&g===n&&m.classList.add("endRange"),g>=l&&(0===c||g<=c)&&(d=n,f=t,(s=g)>Math.min(d,f)&&s<Math.max(d,f))&&m.classList.add("inRange"))))},m=0,g=u.children.length;m<g;m++)f(m)}}function oe(){!o.isOpen||o.config.static||o.config.inline||se()}function ie(){o.config.autoFillDefaultTime&&(o.setDate(void 0!==o.config.minDate?new Date(o.config.minDate.getTime()):new Date,!0),d(),Ce())}function re(e){return function(t){var n=o.config["_"+e+"Date"]=o.parseDate(t,o.config.dateFormat),a=o.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(o["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),o.selectedDates&&(o.selectedDates=o.selectedDates.filter((function(e){return X(e)})),o.selectedDates.length||"min"!==e||s(n),Ce()),o.daysContainer&&(de(),void 0!==n?o.currentYearElement[e]=n.getFullYear().toString():o.currentYearElement.removeAttribute(e),o.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function le(){return o.config.wrap?n.querySelector("[data-input]"):n}function ce(){"object"!=typeof o.config.locale&&void 0===R.l10ns[o.config.locale]&&o.config.errorHandler(new Error("flatpickr: invalid locale "+o.config.locale)),o.l10n=e(e({},R.l10ns.default),"object"==typeof o.config.locale?o.config.locale:"default"!==o.config.locale?R.l10ns[o.config.locale]:void 0),N.K="("+o.l10n.amPM[0]+"|"+o.l10n.amPM[1]+"|"+o.l10n.amPM[0].toLowerCase()+"|"+o.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},a),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr&&void 0===R.defaultConfig.time_24hr&&(o.config.time_24hr=o.l10n.time_24hr),o.formatDate=P(o),o.parseDate=H({config:o.config,l10n:o.l10n})}function se(e){if(void 0!==o.calendarContainer){he("onPreCalendarPosition");var t=e||o._positionElement,n=Array.prototype.reduce.call(o.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),a=o.calendarContainer.offsetWidth,i=o.config.position.split(" "),r=i[0],l=i.length>1?i[1]:null,c=t.getBoundingClientRect(),s=window.innerHeight-c.bottom,d="above"===r||"below"!==r&&s<n&&c.top>n,u=window.pageYOffset+c.top+(d?-n-2:t.offsetHeight+2);if(E(o.calendarContainer,"arrowTop",!d),E(o.calendarContainer,"arrowBottom",d),!o.config.inline){var f=window.pageXOffset+c.left-(null!=l&&"center"===l?(a-c.width)/2:0),m=window.document.body.offsetWidth-(window.pageXOffset+c.right),g=f+a>window.document.body.offsetWidth,p=m+a>window.document.body.offsetWidth;if(E(o.calendarContainer,"rightMost",g),!o.config.static)if(o.calendarContainer.style.top=u+"px",g)if(p){var h=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];try{n.cssRules}catch(e){continue}e=n;break}return null!=e?e:(a=document.createElement("style"),document.head.appendChild(a),a.sheet);var a}();if(void 0===h)return;var v=window.document.body.offsetWidth,D=Math.max(0,v/2-a/2),M=h.cssRules.length,w="{left:"+c.left+"px;right:auto;}";E(o.calendarContainer,"rightMost",!1),E(o.calendarContainer,"centerMost",!0),h.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,M),o.calendarContainer.style.left=D+"px",o.calendarContainer.style.right="auto"}else o.calendarContainer.style.left="auto",o.calendarContainer.style.right=m+"px";else o.calendarContainer.style.left=f+"px",o.calendarContainer.style.right="auto"}}}function de(){o.config.noCalendar||o.isMobile||(K(),Me(),B())}function ue(){o._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(o.close,0):o.close()}function fe(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(O(e),(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=o.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()<o.currentMonth||a.getMonth()>o.currentMonth+o.config.showMonths-1)&&"range"!==o.config.mode;if(o.selectedDateElem=n,"single"===o.config.mode)o.selectedDates=[a];else if("multiple"===o.config.mode){var r=De(a);r?o.selectedDates.splice(parseInt(r),1):o.selectedDates.push(a)}else"range"===o.config.mode&&(2===o.selectedDates.length&&o.clear(!1,!1),o.latestSelectedDateObj=a,o.selectedDates.push(a),0!==j(a,o.selectedDates[0],!0)&&o.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(c(),i){var l=o.currentYear!==a.getFullYear();o.currentYear=a.getFullYear(),o.currentMonth=a.getMonth(),l&&(he("onYearChange"),K()),he("onMonthChange")}if(Me(),B(),Ce(),o.config.enableTime&&setTimeout((function(){return o.showTimeInput=!0}),50),i||"range"===o.config.mode||1!==o.config.showMonths?void 0!==o.selectedDateElem&&void 0===o.hourElement&&o.selectedDateElem&&o.selectedDateElem.focus():Y(n),void 0!==o.hourElement&&void 0!==o.hourElement&&o.hourElement.focus(),o.config.closeOnSelect){var s="single"===o.config.mode&&!o.config.enableTime,d="range"===o.config.mode&&2===o.selectedDates.length&&!o.config.enableTime;(s||d)&&ue()}p()}}o.parseDate=H({config:o.config,l10n:o.l10n}),o._handlers=[],o.pluginElements=[],o.loadedPlugins=[],o._bind=m,o._setHoursFromDate=s,o._positionCalendar=se,o.changeMonth=Z,o.changeYear=Q,o.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);o.input.value="",void 0!==o.altInput&&(o.altInput.value="");void 0!==o.mobileInput&&(o.mobileInput.value="");o.selectedDates=[],o.latestSelectedDateObj=void 0,!0===t&&(o.currentYear=o._initialDate.getFullYear(),o.currentMonth=o._initialDate.getMonth());o.showTimeInput=!1,!0===o.config.enableTime&&d();o.redraw(),e&&he("onChange")},o.close=function(){o.isOpen=!1,o.isMobile||(void 0!==o.calendarContainer&&o.calendarContainer.classList.remove("open"),void 0!==o._input&&o._input.classList.remove("active"));he("onClose")},o._createElement=k,o.destroy=function(){void 0!==o.config&&he("onDestroy");for(var e=o._handlers.length;e--;){var t=o._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(o._handlers=[],o.mobileInput)o.mobileInput.parentNode&&o.mobileInput.parentNode.removeChild(o.mobileInput),o.mobileInput=void 0;else if(o.calendarContainer&&o.calendarContainer.parentNode)if(o.config.static&&o.calendarContainer.parentNode){var n=o.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 o.calendarContainer.parentNode.removeChild(o.calendarContainer);o.altInput&&(o.input.type="text",o.altInput.parentNode&&o.altInput.parentNode.removeChild(o.altInput),delete o.altInput);o.input&&(o.input.type=o.input._type,o.input.classList.remove("flatpickr-input"),o.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 o[e]}catch(e){}}))},o.isEnabled=X,o.jumpToDate=h,o.open=function(e,t){void 0===t&&(t=o._positionElement);if(!0===o.isMobile){if(e){e.preventDefault();var n=O(e);n&&n.blur()}return void 0!==o.mobileInput&&(o.mobileInput.focus(),o.mobileInput.click()),void he("onOpen")}if(o._input.disabled||o.config.inline)return;var a=o.isOpen;o.isOpen=!0,a||(o.calendarContainer.classList.add("open"),o._input.classList.add("active"),he("onOpen"),se(t));!0===o.config.enableTime&&!0===o.config.noCalendar&&(0===o.selectedDates.length&&ie(),!1!==o.config.allowInput||void 0!==e&&o.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return o.hourElement.select()}),50))},o.redraw=de,o.set=function(e,t){if(null!==e&&"object"==typeof e)for(var n in Object.assign(o.config,e),e)void 0!==me[n]&&me[n].forEach((function(e){return e()}));else o.config[e]=t,void 0!==me[e]?me[e].forEach((function(e){return e()})):M.indexOf(e)>-1&&(o.config[e]=x(t));o.redraw(),Ce(!0)},o.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=o.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return o.clear(t);ge(e,n),o.showTimeInput=o.selectedDates.length>0,o.latestSelectedDateObj=o.selectedDates[o.selectedDates.length-1],o.redraw(),h(void 0,t),s(),0===o.selectedDates.length&&o.clear(!1);Ce(t),t&&he("onChange")},o.toggle=function(e){if(!0===o.isOpen)return o.close();o.open(e)};var me={locale:[ce,z],showMonths:[q,r,$],minDate:[h],maxDate:[h]};function ge(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return o.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[o.parseDate(e,t)];else if("string"==typeof e)switch(o.config.mode){case"single":case"time":n=[o.parseDate(e,t)];break;case"multiple":n=e.split(o.config.conjunction).map((function(e){return o.parseDate(e,t)}));break;case"range":n=e.split(o.l10n.rangeSeparator).map((function(e){return o.parseDate(e,t)}))}else o.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));o.selectedDates=n.filter((function(e){return e instanceof Date&&X(e,!1)})),"range"===o.config.mode&&o.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function pe(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?o.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:o.parseDate(e.from,void 0),to:o.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function he(e,t){if(void 0!==o.config){var n=o.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](o.selectedDates,o.input.value,o,t);"onChange"===e&&(o.input.dispatchEvent(ve("change")),o.input.dispatchEvent(ve("input")))}}function ve(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function De(e){for(var t=0;t<o.selectedDates.length;t++)if(0===j(o.selectedDates[t],e))return""+t;return!1}function Me(){o.config.noCalendar||o.isMobile||!o.monthNav||(o.yearElements.forEach((function(e,t){var n=new Date(o.currentYear,o.currentMonth,1);n.setMonth(o.currentMonth+t),o.config.showMonths>1||"static"===o.config.monthSelectorType?o.monthElements[t].textContent=F(n.getMonth(),o.config.shorthandCurrentMonth,o.l10n)+" ":o.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),o._hidePrevMonthArrow=void 0!==o.config.minDate&&(o.currentYear===o.config.minDate.getFullYear()?o.currentMonth<=o.config.minDate.getMonth():o.currentYear<o.config.minDate.getFullYear()),o._hideNextMonthArrow=void 0!==o.config.maxDate&&(o.currentYear===o.config.maxDate.getFullYear()?o.currentMonth+1>o.config.maxDate.getMonth():o.currentYear>o.config.maxDate.getFullYear()))}function we(e){return o.selectedDates.map((function(t){return o.formatDate(t,e)})).filter((function(e,t,n){return"range"!==o.config.mode||o.config.enableTime||n.indexOf(e)===t})).join("range"!==o.config.mode?o.config.conjunction:o.l10n.rangeSeparator)}function Ce(e){void 0===e&&(e=!0),void 0!==o.mobileInput&&o.mobileFormatStr&&(o.mobileInput.value=void 0!==o.latestSelectedDateObj?o.formatDate(o.latestSelectedDateObj,o.mobileFormatStr):""),o.input.value=we(o.config.dateFormat),void 0!==o.altInput&&(o.altInput.value=we(o.config.altFormat)),!1!==e&&he("onValueUpdate")}function be(e){var t=O(e),n=o.prevMonthNav.contains(t),a=o.nextMonthNav.contains(t);n||a?Z(n?-1:1):o.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?o.changeYear(o.currentYear+1):t.classList.contains("arrowDown")&&o.changeYear(o.currentYear-1)}return function(){o.element=o.input=n,o.isOpen=!1,function(){var t=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],r=e(e({},JSON.parse(JSON.stringify(n.dataset||{}))),a),l={};o.config.parseDate=r.parseDate,o.config.formatDate=r.formatDate,Object.defineProperty(o.config,"enable",{get:function(){return o.config._enable},set:function(e){o.config._enable=pe(e)}}),Object.defineProperty(o.config,"disable",{get:function(){return o.config._disable},set:function(e){o.config._disable=pe(e)}});var c="time"===r.mode;if(!r.dateFormat&&(r.enableTime||c)){var s=R.defaultConfig.dateFormat||w.dateFormat;l.dateFormat=r.noCalendar||c?"H:i"+(r.enableSeconds?":S":""):s+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||c)&&!r.altFormat){var d=R.defaultConfig.altFormat||w.altFormat;l.altFormat=r.noCalendar||c?"h:i"+(r.enableSeconds?":S K":" K"):d+" h:i"+(r.enableSeconds?":S":"")+" K"}Object.defineProperty(o.config,"minDate",{get:function(){return o.config._minDate},set:re("min")}),Object.defineProperty(o.config,"maxDate",{get:function(){return o.config._maxDate},set:re("max")});var u=function(e){return function(t){o.config["min"===e?"_minTime":"_maxTime"]=o.parseDate(t,"H:i:S")}};Object.defineProperty(o.config,"minTime",{get:function(){return o.config._minTime},set:u("min")}),Object.defineProperty(o.config,"maxTime",{get:function(){return o.config._maxTime},set:u("max")}),"time"===r.mode&&(o.config.noCalendar=!0,o.config.enableTime=!0);Object.assign(o.config,l,r);for(var f=0;f<t.length;f++)o.config[t[f]]=!0===o.config[t[f]]||"true"===o.config[t[f]];M.filter((function(e){return void 0!==o.config[e]})).forEach((function(e){o.config[e]=x(o.config[e]||[]).map(i)})),o.isMobile=!o.config.disableMobile&&!o.config.inline&&"single"===o.config.mode&&!o.config.disable.length&&!o.config.enable.length&&!o.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(f=0;f<o.config.plugins.length;f++){var m=o.config.plugins[f](o)||{};for(var g in m)M.indexOf(g)>-1?o.config[g]=x(m[g]).map(i).concat(o.config[g]):void 0===r[g]&&(o.config[g]=m[g])}r.altInputClass||(o.config.altInputClass=le().className+" "+o.config.altInputClass);he("onParseConfig")}(),ce(),function(){if(o.input=le(),!o.input)return void o.config.errorHandler(new Error("Invalid input element specified"));o.input._type=o.input.type,o.input.type="text",o.input.classList.add("flatpickr-input"),o._input=o.input,o.config.altInput&&(o.altInput=k(o.input.nodeName,o.config.altInputClass),o._input=o.altInput,o.altInput.placeholder=o.input.placeholder,o.altInput.disabled=o.input.disabled,o.altInput.required=o.input.required,o.altInput.tabIndex=o.input.tabIndex,o.altInput.type="text",o.input.setAttribute("type","hidden"),!o.config.static&&o.input.parentNode&&o.input.parentNode.insertBefore(o.altInput,o.input.nextSibling));o.config.allowInput||o._input.setAttribute("readonly","readonly");o._positionElement=o.config.positionElement||o._input}(),function(){o.selectedDates=[],o.now=o.parseDate(o.config.now)||new Date;var e=o.config.defaultDate||("INPUT"!==o.input.nodeName&&"TEXTAREA"!==o.input.nodeName||!o.input.placeholder||o.input.value!==o.input.placeholder?o.input.value:null);e&&ge(e,o.config.dateFormat);o._initialDate=o.selectedDates.length>0?o.selectedDates[0]:o.config.minDate&&o.config.minDate.getTime()>o.now.getTime()?o.config.minDate:o.config.maxDate&&o.config.maxDate.getTime()<o.now.getTime()?o.config.maxDate:o.now,o.currentYear=o._initialDate.getFullYear(),o.currentMonth=o._initialDate.getMonth(),o.selectedDates.length>0&&(o.latestSelectedDateObj=o.selectedDates[0]);void 0!==o.config.minTime&&(o.config.minTime=o.parseDate(o.config.minTime,"H:i"));void 0!==o.config.maxTime&&(o.config.maxTime=o.parseDate(o.config.maxTime,"H:i"));o.minDateHasTime=!!o.config.minDate&&(o.config.minDate.getHours()>0||o.config.minDate.getMinutes()>0||o.config.minDate.getSeconds()>0),o.maxDateHasTime=!!o.config.maxDate&&(o.config.maxDate.getHours()>0||o.config.maxDate.getMinutes()>0||o.config.maxDate.getSeconds()>0),Object.defineProperty(o,"showTimeInput",{get:function(){return o._showTimeInput},set:function(e){o._showTimeInput=e,o.calendarContainer&&E(o.calendarContainer,"showTimeInput",e),o.isOpen&&se()}})}(),o.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=o.currentMonth),void 0===t&&(t=o.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:o.l10n.daysInMonth[e]}},o.isMobile||function(){var e=window.document.createDocumentFragment();if(o.calendarContainer=k("div","flatpickr-calendar"),o.calendarContainer.tabIndex=-1,!o.config.noCalendar){if(e.appendChild((o.monthNav=k("div","flatpickr-months"),o.yearElements=[],o.monthElements=[],o.prevMonthNav=k("span","flatpickr-prev-month"),o.prevMonthNav.innerHTML=o.config.prevArrow,o.nextMonthNav=k("span","flatpickr-next-month"),o.nextMonthNav.innerHTML=o.config.nextArrow,q(),Object.defineProperty(o,"_hidePrevMonthArrow",{get:function(){return o.__hidePrevMonthArrow},set:function(e){o.__hidePrevMonthArrow!==e&&(E(o.prevMonthNav,"flatpickr-disabled",e),o.__hidePrevMonthArrow=e)}}),Object.defineProperty(o,"_hideNextMonthArrow",{get:function(){return o.__hideNextMonthArrow},set:function(e){o.__hideNextMonthArrow!==e&&(E(o.nextMonthNav,"flatpickr-disabled",e),o.__hideNextMonthArrow=e)}}),o.currentYearElement=o.yearElements[0],Me(),o.monthNav)),o.innerContainer=k("div","flatpickr-innerContainer"),o.config.weekNumbers){var t=function(){o.calendarContainer.classList.add("hasWeeks");var e=k("div","flatpickr-weekwrapper");e.appendChild(k("span","flatpickr-weekday",o.l10n.weekAbbreviation));var t=k("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;o.innerContainer.appendChild(n),o.weekNumbers=a,o.weekWrapper=n}o.rContainer=k("div","flatpickr-rContainer"),o.rContainer.appendChild($()),o.daysContainer||(o.daysContainer=k("div","flatpickr-days"),o.daysContainer.tabIndex=-1),B(),o.rContainer.appendChild(o.daysContainer),o.innerContainer.appendChild(o.rContainer),e.appendChild(o.innerContainer)}o.config.enableTime&&e.appendChild(function(){o.calendarContainer.classList.add("hasTime"),o.config.noCalendar&&o.calendarContainer.classList.add("noCalendar");o.timeContainer=k("div","flatpickr-time"),o.timeContainer.tabIndex=-1;var e=k("span","flatpickr-time-separator",":"),t=I("flatpickr-hour",{"aria-label":o.l10n.hourAriaLabel});o.hourElement=t.getElementsByTagName("input")[0];var n=I("flatpickr-minute",{"aria-label":o.l10n.minuteAriaLabel});o.minuteElement=n.getElementsByTagName("input")[0],o.hourElement.tabIndex=o.minuteElement.tabIndex=-1,o.hourElement.value=b(o.latestSelectedDateObj?o.latestSelectedDateObj.getHours():o.config.time_24hr?o.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(o.config.defaultHour)),o.minuteElement.value=b(o.latestSelectedDateObj?o.latestSelectedDateObj.getMinutes():o.config.defaultMinute),o.hourElement.setAttribute("step",o.config.hourIncrement.toString()),o.minuteElement.setAttribute("step",o.config.minuteIncrement.toString()),o.hourElement.setAttribute("min",o.config.time_24hr?"0":"1"),o.hourElement.setAttribute("max",o.config.time_24hr?"23":"12"),o.minuteElement.setAttribute("min","0"),o.minuteElement.setAttribute("max","59"),o.timeContainer.appendChild(t),o.timeContainer.appendChild(e),o.timeContainer.appendChild(n),o.config.time_24hr&&o.timeContainer.classList.add("time24hr");if(o.config.enableSeconds){o.timeContainer.classList.add("hasSeconds");var a=I("flatpickr-second");o.secondElement=a.getElementsByTagName("input")[0],o.secondElement.value=b(o.latestSelectedDateObj?o.latestSelectedDateObj.getSeconds():o.config.defaultSeconds),o.secondElement.setAttribute("step",o.minuteElement.getAttribute("step")),o.secondElement.setAttribute("min","0"),o.secondElement.setAttribute("max","59"),o.timeContainer.appendChild(k("span","flatpickr-time-separator",":")),o.timeContainer.appendChild(a)}o.config.time_24hr||(o.amPM=k("span","flatpickr-am-pm",o.l10n.amPM[y((o.latestSelectedDateObj?o.hourElement.value:o.config.defaultHour)>11)]),o.amPM.title=o.l10n.toggleTitle,o.amPM.tabIndex=-1,o.timeContainer.appendChild(o.amPM));return o.timeContainer}());E(o.calendarContainer,"rangeMode","range"===o.config.mode),E(o.calendarContainer,"animate",!0===o.config.animate),E(o.calendarContainer,"multiMonth",o.config.showMonths>1),o.calendarContainer.appendChild(e);var i=void 0!==o.config.appendTo&&void 0!==o.config.appendTo.nodeType;if((o.config.inline||o.config.static)&&(o.calendarContainer.classList.add(o.config.inline?"inline":"static"),o.config.inline&&(!i&&o.element.parentNode?o.element.parentNode.insertBefore(o.calendarContainer,o._input.nextSibling):void 0!==o.config.appendTo&&o.config.appendTo.appendChild(o.calendarContainer)),o.config.static)){var r=k("div","flatpickr-wrapper");o.element.parentNode&&o.element.parentNode.insertBefore(r,o.element),r.appendChild(o.element),o.altInput&&r.appendChild(o.altInput),r.appendChild(o.calendarContainer)}o.config.static||o.config.inline||(void 0!==o.config.appendTo?o.config.appendTo:window.document.body).appendChild(o.calendarContainer)}(),function(){o.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(o.element.querySelectorAll("[data-"+e+"]"),(function(t){return m(t,"click",o[e])}))}));if(o.isMobile)return void function(){var e=o.config.enableTime?o.config.noCalendar?"time":"datetime-local":"date";o.mobileInput=k("input",o.input.className+" flatpickr-mobile"),o.mobileInput.tabIndex=1,o.mobileInput.type=e,o.mobileInput.disabled=o.input.disabled,o.mobileInput.required=o.input.required,o.mobileInput.placeholder=o.input.placeholder,o.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",o.selectedDates.length>0&&(o.mobileInput.defaultValue=o.mobileInput.value=o.formatDate(o.selectedDates[0],o.mobileFormatStr));o.config.minDate&&(o.mobileInput.min=o.formatDate(o.config.minDate,"Y-m-d"));o.config.maxDate&&(o.mobileInput.max=o.formatDate(o.config.maxDate,"Y-m-d"));o.input.getAttribute("step")&&(o.mobileInput.step=String(o.input.getAttribute("step")));o.input.type="hidden",void 0!==o.altInput&&(o.altInput.type="hidden");try{o.input.parentNode&&o.input.parentNode.insertBefore(o.mobileInput,o.input.nextSibling)}catch(e){}m(o.mobileInput,"change",(function(e){o.setDate(O(e).value,!1,o.mobileFormatStr),he("onChange"),he("onClose")}))}();var e=T(oe,50);o._debouncedChange=T(p,300),o.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(o.daysContainer,"mouseover",(function(e){"range"===o.config.mode&&ae(O(e))}));m(window.document.body,"keydown",ne),o.config.inline||o.config.static||m(window,"resize",e);void 0!==window.ontouchstart?m(window.document,"touchstart",V):m(window.document,"click",g(V));m(window.document,"focus",V,{capture:!0}),!0===o.config.clickOpens&&(m(o._input,"focus",o.open),m(o._input,"click",g(o.open)));void 0!==o.daysContainer&&(m(o.monthNav,"click",g(be)),m(o.monthNav,["keyup","increment"],f),m(o.daysContainer,"click",g(fe)));if(void 0!==o.timeContainer&&void 0!==o.minuteElement&&void 0!==o.hourElement){m(o.timeContainer,["increment"],l),m(o.timeContainer,"blur",l,{capture:!0}),m(o.timeContainer,"click",g(v)),m([o.hourElement,o.minuteElement],["focus","click"],(function(e){return O(e).select()})),void 0!==o.secondElement&&m(o.secondElement,"focus",(function(){return o.secondElement&&o.secondElement.select()})),void 0!==o.amPM&&m(o.amPM,"click",g((function(e){l(e),p()})))}o.config.allowInput&&m(o._input,"blur",te)}(),(o.selectedDates.length||o.config.noCalendar)&&(o.config.enableTime&&s(o.config.noCalendar?o.latestSelectedDateObj||o.config.minDate:void 0),Ce(!1)),r(),o.showTimeInput=o.selectedDates.length>0||o.config.noCalendar;var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!o.isMobile&&t&&se(),he("onReady")}(),o}function W(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],o=0;o<n.length;o++){var i=n[o];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=U(i,t||{}),a.push(i._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}window.Date=u,"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return W(this,e)},HTMLElement.prototype.flatpickr=function(e){return W([this],e)});var R=function(e,t){return"string"==typeof e?W(window.document.querySelectorAll(e),t):e instanceof Node?W([e],t):W(e,t)};return R.defaultConfig={},R.l10ns={en:e({},C),default:e({},C)},R.localize=function(t){R.l10ns.default=e(e({},R.l10ns.default),t)},R.setDefaults=function(t){R.defaultConfig=e(e({},R.defaultConfig),t)},R.parseDate=H({}),R.formatDate=P({}),R.compareDates=j,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return W(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=R),R})); | ||
/* flatpickr v0.0.5,, @license MIT */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).flatpickr=t()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var a=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],r=0,l=i.length;r<l;r++,o++)a[o]=i[r];return a}function n(e,t){return e-t*Math.floor(e/t)}function a(e,t,n){return 1721424.5+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*t-362)/12+(2>=t?0:0!=e%4||0==e%100&&0!=e%400?-2:-1)+n)}function o(e){var t,o,i,r;return t=(e=Math.floor(e-.5)+.5)-1721425.5,o=Math.floor(t/146097),i=n(t,146097),t=Math.floor(i/36524),r=n(i,36524),o=400*o+100*t+4*(i=Math.floor(r/1461))+(r=Math.floor(n(r,1461)/365)),4!=t&&4!=r&&o++,[o,t=Math.floor((12*(e-a(o,1,1)+(e<a(o,3,1)?0:0!=o%4||0==o%100&&0!=o%400?2:1))+373)/367),e-a(o,t,1)+1]}function i(e,t,a){var o;return o=474+n(e-=0<=e?474:473,2820),a+(7>=t?31*(t-1):30*(t-1)+6)+Math.floor((682*o-110)/2816)+365*(o-1)+1029983*Math.floor(e/2820)+1948319.5}function r(e){var t,a,o;return a=(e=Math.floor(e)+.5)-i(475,1,1),t=Math.floor(a/1029983),1029982==(o=n(a,1029983))?a=2820:(a=Math.floor(o/366),o=n(o,366),a=Math.floor((2134*a+2816*o+2815)/1028522)+a+1),0>=(t=a+2820*t+474)&&t--,[t,a=186>=(a=e-i(t,1,1)+1)?Math.ceil(a/31):Math.ceil((a-6)/30),e-i(t,a,1)+1]}var l=window.Date;function c(e){return e.replace(/[\u06f0-\u06f9]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)-1728)}))}function s(e){return 10>e?"0"+e:e}function d(e,t,n){if(12<t||0>=t){var a=Math.floor((t-1)/12);e+=a,t-=12*a}return i(e,t,n)}function u(e,t,n,a,i,r,s){if("string"==typeof e){var f;e:{f=c(e);var m=/^(\d|\d\d|\d\d\d\d)(?:([-\/])(\d{1,2})(?:\2(\d|\d\d|\d\d\d\d))?)?(([ T])(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|([+-])(\d{2})(?::?(\d{2}))?)?)?$/.exec(f);if(m){var g=m[2],p=m[6],h=+m[1],v=+m[3]||1,D=+m[4]||1,M="/"!=g&&" "!=m[6],w=+m[7]||0,C=+m[8]||0,b=+m[9]||0,y=1e3*+("0."+(m[10]||"0")),T=m[11];f=M&&(T||!m[5]);var x=("-"==m[12]?-1:1)*(60*(+m[13]||0)+(+m[14]||0));if((!T&&"T"!=p||M)&&1e3<=D!=1e3<=h){if(1e3<=D){if("-"==g){f=void 0;break e}h=D=+m[1]}h=(m=o(d(h,v,D)))[0],v=m[1],D=m[2],h=new l(h,v-1,D,w,C,b,y),f&&h.setUTCMinutes(h.getUTCMinutes()-h.getTimezoneOffset()+x),f=h;break e}}f=void 0}if(this.a=f,!this.a)throw"Cannot parse date string"}else 0==arguments.length?this.a=new l:1==arguments.length?this.a=new l(e instanceof u?e.a:e):(f=o(d(e,(t||0)+1,n||1)),this.a=new l(f[0],f[1]-1,f[2],a||0,i||0,r||0,s||0));this._date=this.a,this.c=null,this.b=[0,0,0],this.e=null,this.d=[0,0,0]}function f(e,t,n,a){var i=g(e);void 0!==a&&(i[2]=a),i[t]=n,t=o(d(i[0],i[1],i[2])),e.a.setUTCFullYear(t[0]),e.a.setUTCMonth(t[1]-1,t[2])}function m(e,t,n,a){var i=p(e);i[t]=n,void 0!==a&&(i[2]=a),t=o(d(i[0],i[1],i[2])),e.a.setFullYear(t[0]),e.a.setMonth(t[1]-1,t[2])}function g(e){return e.e!=+e.a&&(e.e=+e.a,e.d=r(a(e.a.getUTCFullYear(),e.a.getUTCMonth()+1,e.a.getUTCDate()))),e.d}function p(e){return e.c!=+e.a&&(e.c=+e.a,e.b=r(a(e.a.getFullYear(),e.a.getMonth()+1,e.a.getDate()))),e.b}u.prototype={},u.prototype.getDate=function(){return p(this)[2]},u.prototype.getMonth=function(){return p(this)[1]-1},u.prototype.getFullYear=function(){return p(this)[0]},u.prototype.getUTCDate=function(){return g(this)[2]},u.prototype.getUTCMonth=function(){return g(this)[1]-1},u.prototype.getUTCFullYear=function(){return g(this)[0]},u.prototype.setDate=function(e){m(this,2,e)},u.prototype.setFullYear=function(e){m(this,0,e)},u.prototype.setMonth=function(e,t){m(this,1,e+1,t)},u.prototype.setUTCDate=function(e){f(this,2,e)},u.prototype.setUTCFullYear=function(e){f(this,0,e)},u.prototype.setUTCMonth=function(e,t){f(this,1,e+1,t)},u.prototype.toLocaleString=function(){return this.getFullYear()+"/"+s(this.getMonth()+1)+"/"+s(this.getDate())+" "+s(this.getHours())+":"+s(this.getMinutes())+":"+s(this.getSeconds())},u.now=l.now,u.parse=function(e){new u(e).getTime()},u.UTC=function(e,t,n,a,i,r,c){return e=o(d(e,t+1,n||1)),l.UTC(e[0],e[1]-1,e[2],a||0,i||0,r||0,c||0)};var h,v="getHours getMilliseconds getMinutes getSeconds getTime getUTCDay getUTCHours getTimezoneOffset getUTCMilliseconds getUTCMinutes getUTCSeconds setHours setMilliseconds setMinutes setSeconds setTime setUTCHours setUTCMilliseconds setUTCMinutes setUTCSeconds toDateString toISOString toJSON toString toLocaleDateString toLocaleTimeString toTimeString toUTCString valueOf getDay".split(" ");function D(){var e=v[h];return function(){return this.a[e].apply(this.a,arguments)}}for(h=0;h<v.length;h++)u.prototype[v[h]]=D();window.JDate=u;var M=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],w={_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",autoFillDefaultTime:!0,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 t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.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: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},C={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",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},b=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},y=function(e){return!0===e?1:0};function T(e,t,n){var a;return void 0===n&&(n=!1),function(){var o=this,i=arguments;null!==a&&clearTimeout(a),a=window.setTimeout((function(){a=null,n||e.apply(o,i)}),t),n&&!a&&e.apply(o,i)}}var x=function(e){return e instanceof Array?e:[e]};function E(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function k(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 S(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function I(e,t){var n=k("div","numInputWrapper"),a=k("input","numInput "+e),o=k("span","arrowUp"),i=k("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(o),n.appendChild(i),n}function O(e){return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}var _=function(){},F=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},Y={D:_,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*y(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),o=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},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:_,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:_,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},N={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})"},A={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[A.w(e,t,n)]},F:function(e,t,n){return F(A.n(e,t,n)-1,!1,t)},G:function(e,t,n){return b(A.h(e,t,n))},H:function(e){return b(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[y(e.getHours()>11)]},M:function(e,t){return F(e.getMonth(),!0,t)},S:function(e){return b(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return b(e.getFullYear(),4)},d:function(e){return b(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return b(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return b(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)}},P=function(e){var t=e.config,n=void 0===t?w:t,a=e.l10n,o=void 0===a?C:a,i=e.isMobile,r=void 0!==i&&i;return function(e,t,a){var i=a||o;return void 0===n.formatDate||r?t.split("").map((function(t,a,o){return A[t]&&"\\"!==o[a-1]?A[t](e,i,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,i)}},H=function(e){var t=e.config,n=void 0===t?w:t,a=e.l10n,o=void 0===a?C:a;return function(e,t,a,i){if(0===e||e){var r,l=i||o,c=e;if(e instanceof Date)r=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)r=new Date(e);else if("string"==typeof e){var s=t||(n||w).dateFormat,d=String(e).trim();if("today"===d)r=new Date,a=!0;else if(/Z$/.test(d)||/GMT$/.test(d))r=new Date(e);else if(n&&n.parseDate)r=n.parseDate(e,s);else{r=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var u=void 0,f=[],m=0,g=0,p="";m<s.length;m++){var h=s[m],v="\\"===h,D="\\"===s[m-1]||v;if(N[h]&&!D){p+=N[h];var M=new RegExp(p).exec(e);M&&(u=!0)&&f["Y"!==h?"push":"unshift"]({fn:Y[h],val:M[++g]})}else v||(p+=".");f.forEach((function(e){var t=e.fn,n=e.val;return r=t(r,n,l)||r}))}r=u?r:void 0}}if(r instanceof Date&&!isNaN(r.getTime()))return!0===a&&r.setHours(0,0,0,0),r;n.errorHandler(new Error("Invalid date provided: "+c))}}};function j(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var L=864e5;"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(t){t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))},o=0,i=t;o<i.length;o++){var r=i[o];a(r)}return e});function U(n,a){var o={config:e(e({},w),R.defaultConfig),l10n:C};function i(e){return e.bind(o)}function r(){var e=o.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==o.calendarContainer&&(o.calendarContainer.style.visibility="hidden",o.calendarContainer.style.display="block"),void 0!==o.daysContainer){var t=(o.days.offsetWidth+1)*e.showMonths;o.daysContainer.style.width=t+"px",o.calendarContainer.style.width=t+(void 0!==o.weekWrapper?o.weekWrapper.offsetWidth:0)+"px",o.calendarContainer.style.removeProperty("visibility"),o.calendarContainer.style.removeProperty("display")}}))}function l(e){0===o.selectedDates.length&&ie(),void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=O(e),a=n;void 0!==o.amPM&&n===o.amPM&&(o.amPM.textContent=o.l10n.amPM[y(o.amPM.textContent===o.l10n.amPM[0])]);var i=parseFloat(a.getAttribute("min")),r=parseFloat(a.getAttribute("max")),l=parseFloat(a.getAttribute("step")),c=parseInt(a.value,10),s=e.delta||(t?38===e.which?1:-1:0),d=c+l*s;if(void 0!==a.value&&2===a.value.length){var u=a===o.hourElement,f=a===o.minuteElement;d<i?(d=r+d+y(!u)+(y(u)&&y(!o.amPM)),f&&D(void 0,-1,o.hourElement)):d>r&&(d=a===o.hourElement?d-r-y(!o.amPM):i,f&&D(void 0,1,o.hourElement)),o.amPM&&u&&(1===l?d+c===23:Math.abs(d-c)>l)&&(o.amPM.textContent=o.l10n.amPM[y(o.amPM.textContent===o.l10n.amPM[0])]),a.value=b(d)}}(e);var t=o._input.value;c(),Ce(),o._input.value!==t&&o._debouncedChange()}function c(){if(void 0!==o.hourElement&&void 0!==o.minuteElement){var e,t,n=(parseInt(o.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(o.minuteElement.value,10)||0)%60,i=void 0!==o.secondElement?(parseInt(o.secondElement.value,10)||0)%60:0;void 0!==o.amPM&&(e=n,t=o.amPM.textContent,n=e%12+12*y(t===o.l10n.amPM[1]));var r=void 0!==o.config.minTime||o.config.minDate&&o.minDateHasTime&&o.latestSelectedDateObj&&0===j(o.latestSelectedDateObj,o.config.minDate,!0);if(void 0!==o.config.maxTime||o.config.maxDate&&o.maxDateHasTime&&o.latestSelectedDateObj&&0===j(o.latestSelectedDateObj,o.config.maxDate,!0)){var l=void 0!==o.config.maxTime?o.config.maxTime:o.config.maxDate;(n=Math.min(n,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(i=Math.min(i,l.getSeconds()))}if(r){var c=void 0!==o.config.minTime?o.config.minTime:o.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}u(n,a,i)}}function s(e){var t=e||o.latestSelectedDateObj;t&&u(t.getHours(),t.getMinutes(),t.getSeconds())}function d(){var e=o.config.defaultHour,t=o.config.defaultMinute,n=o.config.defaultSeconds;if(void 0!==o.config.minDate){var a=o.config.minDate.getHours(),i=o.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(i,t)),e===a&&t===i&&(n=o.config.minDate.getSeconds())}if(void 0!==o.config.maxDate){var r=o.config.maxDate.getHours(),l=o.config.maxDate.getMinutes();(e=Math.min(e,r))===r&&(t=Math.min(l,t)),e===r&&t===l&&(n=o.config.maxDate.getSeconds())}u(e,t,n)}function u(e,t,n){void 0!==o.latestSelectedDateObj&&o.latestSelectedDateObj.setHours(e%24,t,n||0,0),o.hourElement&&o.minuteElement&&!o.isMobile&&(o.hourElement.value=b(o.config.time_24hr?e:(12+e)%12+12*y(e%12==0)),o.minuteElement.value=b(t),void 0!==o.amPM&&(o.amPM.textContent=o.l10n.amPM[y(e>=12)]),void 0!==o.secondElement&&(o.secondElement.value=b(n)))}function f(e){var t=O(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&Q(n)}function m(e,t,n,a){return t instanceof Array?t.forEach((function(t){return m(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return m(e,t,n,a)})):(e.addEventListener(t,n,a),void o._handlers.push({element:e,event:t,handler:n,options:a}))}function g(e){return function(t){1===t.which&&e(t)}}function p(){he("onChange")}function h(e,t){var n=void 0!==e?o.parseDate(e):o.latestSelectedDateObj||(o.config.minDate&&o.config.minDate>o.now?o.config.minDate:o.config.maxDate&&o.config.maxDate<o.now?o.config.maxDate:o.now),a=o.currentYear,i=o.currentMonth;try{void 0!==n&&(o.currentYear=n.getFullYear(),o.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,o.config.errorHandler(e)}t&&o.currentYear!==a&&(he("onYearChange"),B()),!t||o.currentYear===a&&o.currentMonth===i||he("onMonthChange"),o.redraw()}function v(e){var t=O(e);~t.className.indexOf("arrow")&&D(e,t.classList.contains("arrowUp")?1:-1)}function D(e,t,n){var a=e&&O(e),o=n||a&&a.parentNode&&a.parentNode.firstChild,i=ve("increment");i.delta=t,o&&o.dispatchEvent(i)}function _(e,t,n,a){var i=X(t,!0),r=k("span","flatpickr-day "+e,t.getDate().toString());return r.dateObj=t,r.$i=a,r.setAttribute("aria-label",o.formatDate(t,o.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===j(t,o.now)&&(o.todayDateElem=r,r.classList.add("today"),r.setAttribute("aria-current","date")),i?(r.tabIndex=-1,De(t)&&(r.classList.add("selected"),o.selectedDateElem=r,"range"===o.config.mode&&(E(r,"startRange",o.selectedDates[0]&&0===j(t,o.selectedDates[0],!0)),E(r,"endRange",o.selectedDates[1]&&0===j(t,o.selectedDates[1],!0)),"nextMonthDay"===e&&r.classList.add("inRange")))):r.classList.add("flatpickr-disabled"),"range"===o.config.mode&&function(e){return!("range"!==o.config.mode||o.selectedDates.length<2)&&(j(e,o.selectedDates[0])>=0&&j(e,o.selectedDates[1])<=0)}(t)&&!De(t)&&r.classList.add("inRange"),o.weekNumbers&&1===o.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&o.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+o.config.getWeek(t)+"</span>"),he("onDayCreate",r),r}function Y(e){e.focus(),"range"===o.config.mode&&ae(e)}function A(e){for(var t=e>0?0:o.config.showMonths-1,n=e>0?o.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=o.daysContainer.children[a],r=e>0?0:i.children.length-1,l=e>0?i.children.length:-1,c=r;c!=l;c+=e){var s=i.children[c];if(-1===s.className.indexOf("hidden")&&X(s.dateObj))return s}}function U(e,t){var n=ee(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==o.selectedDateElem&&ee(o.selectedDateElem)?o.selectedDateElem:void 0!==o.todayDateElem&&ee(o.todayDateElem)?o.todayDateElem:A(t>0?1:-1);return void 0===a?o._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():o.currentMonth,a=t>0?o.config.showMonths:-1,i=t>0?1:-1,r=n-o.currentMonth;r!=a;r+=i)for(var l=o.daysContainer.children[r],c=n-o.currentMonth===r?e.$i+t:t<0?l.children.length-1:0,s=l.children.length,d=c;d>=0&&d<s&&d!=(t>0?s:-1);d+=i){var u=l.children[d];if(-1===u.className.indexOf("hidden")&&X(u.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return Y(u)}o.changeMonth(i),U(A(i),0)}(a,t):Y(a)}function W(e,t){for(var n=(new Date(e,t,1).getDay()-o.l10n.firstDayOfWeek+7)%7,a=o.utils.getDaysInMonth((t-1+12)%12,e),i=o.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),l=o.config.showMonths>1,c=l?"prevMonthDay hidden":"prevMonthDay",s=l?"nextMonthDay hidden":"nextMonthDay",d=a+1-n,u=0;d<=a;d++,u++)r.appendChild(_(c,new Date(e,t-1,d),d,u));for(d=1;d<=i;d++,u++)r.appendChild(_("",new Date(e,t,d),d,u));for(var f=i+1;f<=42-n&&(1===o.config.showMonths||u%7!=0);f++,u++)r.appendChild(_(s,new Date(e,t+1,f%i),f,u));var m=k("div","dayContainer");return m.appendChild(r),m}function J(){if(void 0!==o.daysContainer){S(o.daysContainer),o.weekNumbers&&S(o.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<o.config.showMonths;t++){var n=new Date(o.currentYear,o.currentMonth,1);n.setMonth(o.currentMonth+t),e.appendChild(W(n.getFullYear(),n.getMonth()))}o.daysContainer.appendChild(e),o.days=o.daysContainer.firstChild,"range"===o.config.mode&&1===o.selectedDates.length&&ae()}}function B(){if(!(o.config.showMonths>1||"dropdown"!==o.config.monthSelectorType)){var e=function(e){return!(void 0!==o.config.minDate&&o.currentYear===o.config.minDate.getFullYear()&&e<o.config.minDate.getMonth())&&!(void 0!==o.config.maxDate&&o.currentYear===o.config.maxDate.getFullYear()&&e>o.config.maxDate.getMonth())};o.monthsDropdownContainer.tabIndex=-1,o.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=k("option","flatpickr-monthDropdown-month");n.value=new Date(o.currentYear,t).getMonth().toString(),n.textContent=F(t,o.config.shorthandCurrentMonth,o.l10n),n.tabIndex=-1,o.currentMonth===t&&(n.selected=!0),o.monthsDropdownContainer.appendChild(n)}}}function K(){var e,t=k("div","flatpickr-month"),n=window.document.createDocumentFragment();o.config.showMonths>1||"static"===o.config.monthSelectorType?e=k("span","cur-month"):(o.monthsDropdownContainer=k("select","flatpickr-monthDropdown-months"),o.monthsDropdownContainer.setAttribute("aria-label",o.l10n.monthAriaLabel),m(o.monthsDropdownContainer,"change",(function(e){var t=O(e),n=parseInt(t.value,10);o.changeMonth(n-o.currentMonth),he("onMonthChange")})),B(),e=o.monthsDropdownContainer);var a=I("cur-year",{tabindex:"-1"}),i=a.getElementsByTagName("input")[0];i.setAttribute("aria-label",o.l10n.yearAriaLabel),o.config.minDate&&i.setAttribute("min",o.config.minDate.getFullYear().toString()),o.config.maxDate&&(i.setAttribute("max",o.config.maxDate.getFullYear().toString()),i.disabled=!!o.config.minDate&&o.config.minDate.getFullYear()===o.config.maxDate.getFullYear());var r=k("div","flatpickr-current-month");return r.appendChild(e),r.appendChild(a),n.appendChild(r),t.appendChild(n),{container:t,yearElement:i,monthElement:e}}function q(){S(o.monthNav),o.monthNav.appendChild(o.prevMonthNav),o.config.showMonths&&(o.yearElements=[],o.monthElements=[]);for(var e=o.config.showMonths;e--;){var t=K();o.yearElements.push(t.yearElement),o.monthElements.push(t.monthElement),o.monthNav.appendChild(t.container)}o.monthNav.appendChild(o.nextMonthNav)}function $(){o.weekdayContainer?S(o.weekdayContainer):o.weekdayContainer=k("div","flatpickr-weekdays");for(var e=o.config.showMonths;e--;){var t=k("div","flatpickr-weekdaycontainer");o.weekdayContainer.appendChild(t)}return z(),o.weekdayContainer}function z(){if(o.weekdayContainer){var e=o.l10n.firstDayOfWeek,n=t(o.l10n.weekdays.shorthand);e>0&&e<n.length&&(n=t(n.splice(e,n.length),n.splice(0,e)));for(var a=o.config.showMonths;a--;)o.weekdayContainer.children[a].innerHTML="\n <span class='flatpickr-weekday'>\n "+n.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function Z(e,t){void 0===t&&(t=!0);var n=t?e:e-o.currentMonth;n<0&&!0===o._hidePrevMonthArrow||n>0&&!0===o._hideNextMonthArrow||(o.currentMonth+=n,(o.currentMonth<0||o.currentMonth>11)&&(o.currentYear+=o.currentMonth>11?1:-1,o.currentMonth=(o.currentMonth+12)%12,he("onYearChange"),B()),J(),he("onMonthChange"),Me())}function G(e){return!(!o.config.appendTo||!o.config.appendTo.contains(e))||o.calendarContainer.contains(e)}function V(e){if(o.isOpen&&!o.config.inline){var t=O(e),n=G(t),a=t===o.input||t===o.altInput||o.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(o.input)||~e.path.indexOf(o.altInput)),i="blur"===e.type?a&&e.relatedTarget&&!G(e.relatedTarget):!a&&!n&&!G(e.relatedTarget),r=!o.config.ignoredFocusElements.some((function(e){return e.contains(t)}));i&&r&&(void 0!==o.timeContainer&&void 0!==o.minuteElement&&void 0!==o.hourElement&&l(),o.close(),o.config&&"range"===o.config.mode&&1===o.selectedDates.length&&(o.clear(!1),o.redraw()))}}function Q(e){if(!(!e||o.config.minDate&&e<o.config.minDate.getFullYear()||o.config.maxDate&&e>o.config.maxDate.getFullYear())){var t=e,n=o.currentYear!==t;o.currentYear=t||o.currentYear,o.config.maxDate&&o.currentYear===o.config.maxDate.getFullYear()?o.currentMonth=Math.min(o.config.maxDate.getMonth(),o.currentMonth):o.config.minDate&&o.currentYear===o.config.minDate.getFullYear()&&(o.currentMonth=Math.max(o.config.minDate.getMonth(),o.currentMonth)),n&&(o.redraw(),he("onYearChange"),B())}}function X(e,t){void 0===t&&(t=!0);var n=o.parseDate(e,void 0,t);if(o.config.minDate&&n&&j(n,o.config.minDate,void 0!==t?t:!o.minDateHasTime)<0||o.config.maxDate&&n&&j(n,o.config.maxDate,void 0!==t?t:!o.maxDateHasTime)>0)return!1;if(0===o.config.enable.length&&0===o.config.disable.length)return!0;if(void 0===n)return!1;for(var a=o.config.enable.length>0,i=a?o.config.enable:o.config.disable,r=0,l=void 0;r<i.length;r++){if("function"==typeof(l=i[r])&&l(n))return a;if(l instanceof Date&&void 0!==n&&l.getTime()===n.getTime())return a;if("string"==typeof l&&void 0!==n){var c=o.parseDate(l,void 0,!0);return c&&c.getTime()===n.getTime()?a:!a}if("object"==typeof l&&void 0!==n&&l.from&&l.to&&n.getTime()>=l.from.getTime()&&n.getTime()<=l.to.getTime())return a}return!a}function ee(e){return void 0!==o.daysContainer&&(-1===e.className.indexOf("hidden")&&o.daysContainer.contains(e))}function te(e){e.target===o._input&&o.setDate(o._input.value,!0,e.target===o.altInput?o.config.altFormat:o.config.dateFormat)}function ne(e){var t=O(e),a=o.config.wrap?n.contains(t):t===o._input,i=o.config.allowInput,r=o.isOpen&&(!i||!a),s=o.config.inline&&a&&!i;if(13===e.keyCode&&a){if(i)return o.setDate(o._input.value,!0,t===o.altInput?o.config.altFormat:o.config.dateFormat),t.blur();o.open()}else if(G(t)||r||s){var d=!!o.timeContainer&&o.timeContainer.contains(t);switch(e.keyCode){case 13:d?(e.preventDefault(),l(),ue()):fe(e);break;case 27:e.preventDefault(),ue();break;case 8:case 46:a&&!o.config.allowInput&&(e.preventDefault(),o.clear());break;case 37:case 39:if(d||a)o.hourElement&&o.hourElement.focus();else if(e.preventDefault(),void 0!==o.daysContainer&&(!1===i||document.activeElement&&ee(document.activeElement))){var u=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),Z(u),U(A(1),0)):U(void 0,u)}break;case 38:case 40:e.preventDefault();var f=40===e.keyCode?1:-1;o.daysContainer&&void 0!==t.$i||t===o.input||t===o.altInput?e.ctrlKey?(e.stopPropagation(),Q(o.currentYear-f),U(A(1),0)):d||U(void 0,7*f):t===o.currentYearElement?Q(o.currentYear-f):o.config.enableTime&&(!d&&o.hourElement&&o.hourElement.focus(),l(e),o._debouncedChange());break;case 9:if(d){var m=[o.hourElement,o.minuteElement,o.secondElement,o.amPM].concat(o.pluginElements).filter((function(e){return e})),g=m.indexOf(t);if(-1!==g){var p=m[g+(e.shiftKey?-1:1)];e.preventDefault(),(p||o._input).focus()}}else!o.config.noCalendar&&o.daysContainer&&o.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),o._input.focus())}}if(void 0!==o.amPM&&t===o.amPM)switch(e.key){case o.l10n.amPM[0].charAt(0):case o.l10n.amPM[0].charAt(0).toLowerCase():o.amPM.textContent=o.l10n.amPM[0],c(),Ce();break;case o.l10n.amPM[1].charAt(0):case o.l10n.amPM[1].charAt(0).toLowerCase():o.amPM.textContent=o.l10n.amPM[1],c(),Ce()}(a||G(t))&&he("onKeyDown",e)}function ae(e){if(1===o.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():o.days.firstElementChild.dateObj.getTime(),n=o.parseDate(o.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,o.selectedDates[0].getTime()),i=Math.max(t,o.selectedDates[0].getTime()),r=!1,l=0,c=0,s=a;s<i;s+=L)X(new Date(s),!0)||(r=r||s>a&&s<i,s<n&&(!l||s>l)?l=s:s>n&&(!c||s<c)&&(c=s));for(var d=0;d<o.config.showMonths;d++)for(var u=o.daysContainer.children[d],f=function(a,i){var s,d,f,m=u.children[a],g=m.dateObj.getTime(),p=l>0&&g<l||c>0&&g>c;return p?(m.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){m.classList.remove(e)})),"continue"):r&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){m.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=o.selectedDates[0].getTime()?"startRange":"endRange"),n<t&&g===n?m.classList.add("startRange"):n>t&&g===n&&m.classList.add("endRange"),g>=l&&(0===c||g<=c)&&(d=n,f=t,(s=g)>Math.min(d,f)&&s<Math.max(d,f))&&m.classList.add("inRange"))))},m=0,g=u.children.length;m<g;m++)f(m)}}function oe(){!o.isOpen||o.config.static||o.config.inline||se()}function ie(){o.config.autoFillDefaultTime&&(o.setDate(void 0!==o.config.minDate?new Date(o.config.minDate.getTime()):new Date,!0),d(),Ce())}function re(e){return function(t){var n=o.config["_"+e+"Date"]=o.parseDate(t,o.config.dateFormat),a=o.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(o["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),o.selectedDates&&(o.selectedDates=o.selectedDates.filter((function(e){return X(e)})),o.selectedDates.length||"min"!==e||s(n),Ce()),o.daysContainer&&(de(),void 0!==n?o.currentYearElement[e]=n.getFullYear().toString():o.currentYearElement.removeAttribute(e),o.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function le(){return o.config.wrap?n.querySelector("[data-input]"):n}function ce(){"object"!=typeof o.config.locale&&void 0===R.l10ns[o.config.locale]&&o.config.errorHandler(new Error("flatpickr: invalid locale "+o.config.locale)),o.l10n=e(e({},R.l10ns.default),"object"==typeof o.config.locale?o.config.locale:"default"!==o.config.locale?R.l10ns[o.config.locale]:void 0),N.K="("+o.l10n.amPM[0]+"|"+o.l10n.amPM[1]+"|"+o.l10n.amPM[0].toLowerCase()+"|"+o.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},a),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr&&void 0===R.defaultConfig.time_24hr&&(o.config.time_24hr=o.l10n.time_24hr),o.formatDate=P(o),o.parseDate=H({config:o.config,l10n:o.l10n})}function se(e){if(void 0!==o.calendarContainer){he("onPreCalendarPosition");var t=e||o._positionElement,n=Array.prototype.reduce.call(o.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),a=o.calendarContainer.offsetWidth,i=o.config.position.split(" "),r=i[0],l=i.length>1?i[1]:null,c=t.getBoundingClientRect(),s=window.innerHeight-c.bottom,d="above"===r||"below"!==r&&s<n&&c.top>n,u=window.pageYOffset+c.top+(d?-n-2:t.offsetHeight+2);if(E(o.calendarContainer,"arrowTop",!d),E(o.calendarContainer,"arrowBottom",d),!o.config.inline){var f=window.pageXOffset+c.left-(null!=l&&"center"===l?(a-c.width)/2:0),m=window.document.body.offsetWidth-(window.pageXOffset+c.right),g=f+a>window.document.body.offsetWidth,p=m+a>window.document.body.offsetWidth;if(E(o.calendarContainer,"rightMost",g),!o.config.static)if(o.calendarContainer.style.top=u+"px",g)if(p){var h=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];try{n.cssRules}catch(e){continue}e=n;break}return null!=e?e:(a=document.createElement("style"),document.head.appendChild(a),a.sheet);var a}();if(void 0===h)return;var v=window.document.body.offsetWidth,D=Math.max(0,v/2-a/2),M=h.cssRules.length,w="{left:"+c.left+"px;right:auto;}";E(o.calendarContainer,"rightMost",!1),E(o.calendarContainer,"centerMost",!0),h.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,M),o.calendarContainer.style.left=D+"px",o.calendarContainer.style.right="auto"}else o.calendarContainer.style.left="auto",o.calendarContainer.style.right=m+"px";else o.calendarContainer.style.left=f+"px",o.calendarContainer.style.right="auto"}}}function de(){o.config.noCalendar||o.isMobile||(B(),Me(),J())}function ue(){o._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(o.close,0):o.close()}function fe(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(O(e),(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=o.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()<o.currentMonth||a.getMonth()>o.currentMonth+o.config.showMonths-1)&&"range"!==o.config.mode;if(o.selectedDateElem=n,"single"===o.config.mode)o.selectedDates=[a];else if("multiple"===o.config.mode){var r=De(a);r?o.selectedDates.splice(parseInt(r),1):o.selectedDates.push(a)}else"range"===o.config.mode&&(2===o.selectedDates.length&&o.clear(!1,!1),o.latestSelectedDateObj=a,o.selectedDates.push(a),0!==j(a,o.selectedDates[0],!0)&&o.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(c(),i){var l=o.currentYear!==a.getFullYear();o.currentYear=a.getFullYear(),o.currentMonth=a.getMonth(),l&&(he("onYearChange"),B()),he("onMonthChange")}if(Me(),J(),Ce(),o.config.enableTime&&setTimeout((function(){return o.showTimeInput=!0}),50),i||"range"===o.config.mode||1!==o.config.showMonths?void 0!==o.selectedDateElem&&void 0===o.hourElement&&o.selectedDateElem&&o.selectedDateElem.focus():Y(n),void 0!==o.hourElement&&void 0!==o.hourElement&&o.hourElement.focus(),o.config.closeOnSelect){var s="single"===o.config.mode&&!o.config.enableTime,d="range"===o.config.mode&&2===o.selectedDates.length&&!o.config.enableTime;(s||d)&&ue()}p()}}o.parseDate=H({config:o.config,l10n:o.l10n}),o._handlers=[],o.pluginElements=[],o.loadedPlugins=[],o._bind=m,o._setHoursFromDate=s,o._positionCalendar=se,o.changeMonth=Z,o.changeYear=Q,o.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);o.input.value="",void 0!==o.altInput&&(o.altInput.value="");void 0!==o.mobileInput&&(o.mobileInput.value="");o.selectedDates=[],o.latestSelectedDateObj=void 0,!0===t&&(o.currentYear=o._initialDate.getFullYear(),o.currentMonth=o._initialDate.getMonth());o.showTimeInput=!1,!0===o.config.enableTime&&d();o.redraw(),e&&he("onChange")},o.close=function(){o.isOpen=!1,o.isMobile||(void 0!==o.calendarContainer&&o.calendarContainer.classList.remove("open"),void 0!==o._input&&o._input.classList.remove("active"));he("onClose")},o._createElement=k,o.destroy=function(){void 0!==o.config&&he("onDestroy");for(var e=o._handlers.length;e--;){var t=o._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(o._handlers=[],o.mobileInput)o.mobileInput.parentNode&&o.mobileInput.parentNode.removeChild(o.mobileInput),o.mobileInput=void 0;else if(o.calendarContainer&&o.calendarContainer.parentNode)if(o.config.static&&o.calendarContainer.parentNode){var n=o.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 o.calendarContainer.parentNode.removeChild(o.calendarContainer);o.altInput&&(o.input.type="text",o.altInput.parentNode&&o.altInput.parentNode.removeChild(o.altInput),delete o.altInput);o.input&&(o.input.type=o.input._type,o.input.classList.remove("flatpickr-input"),o.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 o[e]}catch(e){}}))},o.isEnabled=X,o.jumpToDate=h,o.open=function(e,t){void 0===t&&(t=o._positionElement);if(!0===o.isMobile){if(e){e.preventDefault();var n=O(e);n&&n.blur()}return void 0!==o.mobileInput&&(o.mobileInput.focus(),o.mobileInput.click()),void he("onOpen")}if(o._input.disabled||o.config.inline)return;var a=o.isOpen;o.isOpen=!0,a||(o.calendarContainer.classList.add("open"),o._input.classList.add("active"),he("onOpen"),se(t));!0===o.config.enableTime&&!0===o.config.noCalendar&&(0===o.selectedDates.length&&ie(),!1!==o.config.allowInput||void 0!==e&&o.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return o.hourElement.select()}),50))},o.redraw=de,o.set=function(e,t){if(null!==e&&"object"==typeof e)for(var n in Object.assign(o.config,e),e)void 0!==me[n]&&me[n].forEach((function(e){return e()}));else o.config[e]=t,void 0!==me[e]?me[e].forEach((function(e){return e()})):M.indexOf(e)>-1&&(o.config[e]=x(t));o.redraw(),Ce(!0)},o.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=o.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return o.clear(t);ge(e,n),o.showTimeInput=o.selectedDates.length>0,o.latestSelectedDateObj=o.selectedDates[o.selectedDates.length-1],o.redraw(),h(void 0,t),s(),0===o.selectedDates.length&&o.clear(!1);Ce(t),t&&he("onChange")},o.toggle=function(e){if(!0===o.isOpen)return o.close();o.open(e)};var me={locale:[ce,z],showMonths:[q,r,$],minDate:[h],maxDate:[h]};function ge(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return o.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[o.parseDate(e,t)];else if("string"==typeof e)switch(o.config.mode){case"single":case"time":n=[o.parseDate(e,t)];break;case"multiple":n=e.split(o.config.conjunction).map((function(e){return o.parseDate(e,t)}));break;case"range":n=e.split(o.l10n.rangeSeparator).map((function(e){return o.parseDate(e,t)}))}else o.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));o.selectedDates=n.filter((function(e){return e instanceof Date&&X(e,!1)})),"range"===o.config.mode&&o.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function pe(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?o.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:o.parseDate(e.from,void 0),to:o.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function he(e,t){if(void 0!==o.config){var n=o.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](o.selectedDates,o.input.value,o,t);"onChange"===e&&(o.input.dispatchEvent(ve("change")),o.input.dispatchEvent(ve("input")))}}function ve(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function De(e){for(var t=0;t<o.selectedDates.length;t++)if(0===j(o.selectedDates[t],e))return""+t;return!1}function Me(){o.config.noCalendar||o.isMobile||!o.monthNav||(o.yearElements.forEach((function(e,t){var n=new Date(o.currentYear,o.currentMonth,1);n.setMonth(o.currentMonth+t),o.config.showMonths>1||"static"===o.config.monthSelectorType?o.monthElements[t].textContent=F(n.getMonth(),o.config.shorthandCurrentMonth,o.l10n)+" ":o.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),o._hidePrevMonthArrow=void 0!==o.config.minDate&&(o.currentYear===o.config.minDate.getFullYear()?o.currentMonth<=o.config.minDate.getMonth():o.currentYear<o.config.minDate.getFullYear()),o._hideNextMonthArrow=void 0!==o.config.maxDate&&(o.currentYear===o.config.maxDate.getFullYear()?o.currentMonth+1>o.config.maxDate.getMonth():o.currentYear>o.config.maxDate.getFullYear()))}function we(e){return o.selectedDates.map((function(t){return o.formatDate(t,e)})).filter((function(e,t,n){return"range"!==o.config.mode||o.config.enableTime||n.indexOf(e)===t})).join("range"!==o.config.mode?o.config.conjunction:o.l10n.rangeSeparator)}function Ce(e){void 0===e&&(e=!0),void 0!==o.mobileInput&&o.mobileFormatStr&&(o.mobileInput.value=void 0!==o.latestSelectedDateObj?o.formatDate(o.latestSelectedDateObj,o.mobileFormatStr):""),o.input.value=we(o.config.dateFormat),void 0!==o.altInput&&(o.altInput.value=we(o.config.altFormat)),!1!==e&&he("onValueUpdate")}function be(e){var t=O(e),n=o.prevMonthNav.contains(t),a=o.nextMonthNav.contains(t);n||a?Z(n?-1:1):o.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?o.changeYear(o.currentYear+1):t.classList.contains("arrowDown")&&o.changeYear(o.currentYear-1)}return function(){o.element=o.input=n,o.isOpen=!1,function(){var t=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],r=e(e({},JSON.parse(JSON.stringify(n.dataset||{}))),a),l={};o.config.parseDate=r.parseDate,o.config.formatDate=r.formatDate,Object.defineProperty(o.config,"enable",{get:function(){return o.config._enable},set:function(e){o.config._enable=pe(e)}}),Object.defineProperty(o.config,"disable",{get:function(){return o.config._disable},set:function(e){o.config._disable=pe(e)}});var c="time"===r.mode;if(!r.dateFormat&&(r.enableTime||c)){var s=R.defaultConfig.dateFormat||w.dateFormat;l.dateFormat=r.noCalendar||c?"H:i"+(r.enableSeconds?":S":""):s+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||c)&&!r.altFormat){var d=R.defaultConfig.altFormat||w.altFormat;l.altFormat=r.noCalendar||c?"h:i"+(r.enableSeconds?":S K":" K"):d+" h:i"+(r.enableSeconds?":S":"")+" K"}Object.defineProperty(o.config,"minDate",{get:function(){return o.config._minDate},set:re("min")}),Object.defineProperty(o.config,"maxDate",{get:function(){return o.config._maxDate},set:re("max")});var u=function(e){return function(t){o.config["min"===e?"_minTime":"_maxTime"]=o.parseDate(t,"H:i:S")}};Object.defineProperty(o.config,"minTime",{get:function(){return o.config._minTime},set:u("min")}),Object.defineProperty(o.config,"maxTime",{get:function(){return o.config._maxTime},set:u("max")}),"time"===r.mode&&(o.config.noCalendar=!0,o.config.enableTime=!0);Object.assign(o.config,l,r);for(var f=0;f<t.length;f++)o.config[t[f]]=!0===o.config[t[f]]||"true"===o.config[t[f]];M.filter((function(e){return void 0!==o.config[e]})).forEach((function(e){o.config[e]=x(o.config[e]||[]).map(i)})),o.isMobile=!o.config.disableMobile&&!o.config.inline&&"single"===o.config.mode&&!o.config.disable.length&&!o.config.enable.length&&!o.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(f=0;f<o.config.plugins.length;f++){var m=o.config.plugins[f](o)||{};for(var g in m)M.indexOf(g)>-1?o.config[g]=x(m[g]).map(i).concat(o.config[g]):void 0===r[g]&&(o.config[g]=m[g])}r.altInputClass||(o.config.altInputClass=le().className+" "+o.config.altInputClass);he("onParseConfig")}(),ce(),function(){if(o.input=le(),!o.input)return void o.config.errorHandler(new Error("Invalid input element specified"));o.input._type=o.input.type,o.input.type="text",o.input.classList.add("flatpickr-input"),o._input=o.input,o.config.altInput&&(o.altInput=k(o.input.nodeName,o.config.altInputClass),o._input=o.altInput,o.altInput.placeholder=o.input.placeholder,o.altInput.disabled=o.input.disabled,o.altInput.required=o.input.required,o.altInput.tabIndex=o.input.tabIndex,o.altInput.type="text",o.input.setAttribute("type","hidden"),!o.config.static&&o.input.parentNode&&o.input.parentNode.insertBefore(o.altInput,o.input.nextSibling));o.config.allowInput||o._input.setAttribute("readonly","readonly");o._positionElement=o.config.positionElement||o._input}(),function(){o.selectedDates=[],o.now=o.parseDate(o.config.now)||new Date;var e=o.config.defaultDate||("INPUT"!==o.input.nodeName&&"TEXTAREA"!==o.input.nodeName||!o.input.placeholder||o.input.value!==o.input.placeholder?o.input.value:null);e&&ge(e,o.config.dateFormat);o._initialDate=o.selectedDates.length>0?o.selectedDates[0]:o.config.minDate&&o.config.minDate.getTime()>o.now.getTime()?o.config.minDate:o.config.maxDate&&o.config.maxDate.getTime()<o.now.getTime()?o.config.maxDate:o.now,o.currentYear=o._initialDate.getFullYear(),o.currentMonth=o._initialDate.getMonth(),o.selectedDates.length>0&&(o.latestSelectedDateObj=o.selectedDates[0]);void 0!==o.config.minTime&&(o.config.minTime=o.parseDate(o.config.minTime,"H:i"));void 0!==o.config.maxTime&&(o.config.maxTime=o.parseDate(o.config.maxTime,"H:i"));o.minDateHasTime=!!o.config.minDate&&(o.config.minDate.getHours()>0||o.config.minDate.getMinutes()>0||o.config.minDate.getSeconds()>0),o.maxDateHasTime=!!o.config.maxDate&&(o.config.maxDate.getHours()>0||o.config.maxDate.getMinutes()>0||o.config.maxDate.getSeconds()>0),Object.defineProperty(o,"showTimeInput",{get:function(){return o._showTimeInput},set:function(e){o._showTimeInput=e,o.calendarContainer&&E(o.calendarContainer,"showTimeInput",e),o.isOpen&&se()}})}(),o.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=o.currentMonth),void 0===t&&(t=o.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:o.l10n.daysInMonth[e]}},o.isMobile||function(){var e=window.document.createDocumentFragment();if(o.calendarContainer=k("div","flatpickr-calendar"),o.calendarContainer.tabIndex=-1,!o.config.noCalendar){if(e.appendChild((o.monthNav=k("div","flatpickr-months"),o.yearElements=[],o.monthElements=[],o.prevMonthNav=k("span","flatpickr-prev-month"),o.prevMonthNav.innerHTML=o.config.prevArrow,o.nextMonthNav=k("span","flatpickr-next-month"),o.nextMonthNav.innerHTML=o.config.nextArrow,q(),Object.defineProperty(o,"_hidePrevMonthArrow",{get:function(){return o.__hidePrevMonthArrow},set:function(e){o.__hidePrevMonthArrow!==e&&(E(o.prevMonthNav,"flatpickr-disabled",e),o.__hidePrevMonthArrow=e)}}),Object.defineProperty(o,"_hideNextMonthArrow",{get:function(){return o.__hideNextMonthArrow},set:function(e){o.__hideNextMonthArrow!==e&&(E(o.nextMonthNav,"flatpickr-disabled",e),o.__hideNextMonthArrow=e)}}),o.currentYearElement=o.yearElements[0],Me(),o.monthNav)),o.innerContainer=k("div","flatpickr-innerContainer"),o.config.weekNumbers){var t=function(){o.calendarContainer.classList.add("hasWeeks");var e=k("div","flatpickr-weekwrapper");e.appendChild(k("span","flatpickr-weekday",o.l10n.weekAbbreviation));var t=k("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;o.innerContainer.appendChild(n),o.weekNumbers=a,o.weekWrapper=n}o.rContainer=k("div","flatpickr-rContainer"),o.rContainer.appendChild($()),o.daysContainer||(o.daysContainer=k("div","flatpickr-days"),o.daysContainer.tabIndex=-1),J(),o.rContainer.appendChild(o.daysContainer),o.innerContainer.appendChild(o.rContainer),e.appendChild(o.innerContainer)}o.config.enableTime&&e.appendChild(function(){o.calendarContainer.classList.add("hasTime"),o.config.noCalendar&&o.calendarContainer.classList.add("noCalendar");o.timeContainer=k("div","flatpickr-time"),o.timeContainer.tabIndex=-1;var e=k("span","flatpickr-time-separator",":"),t=I("flatpickr-hour",{"aria-label":o.l10n.hourAriaLabel});o.hourElement=t.getElementsByTagName("input")[0];var n=I("flatpickr-minute",{"aria-label":o.l10n.minuteAriaLabel});o.minuteElement=n.getElementsByTagName("input")[0],o.hourElement.tabIndex=o.minuteElement.tabIndex=-1,o.hourElement.value=b(o.latestSelectedDateObj?o.latestSelectedDateObj.getHours():o.config.time_24hr?o.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(o.config.defaultHour)),o.minuteElement.value=b(o.latestSelectedDateObj?o.latestSelectedDateObj.getMinutes():o.config.defaultMinute),o.hourElement.setAttribute("step",o.config.hourIncrement.toString()),o.minuteElement.setAttribute("step",o.config.minuteIncrement.toString()),o.hourElement.setAttribute("min",o.config.time_24hr?"0":"1"),o.hourElement.setAttribute("max",o.config.time_24hr?"23":"12"),o.minuteElement.setAttribute("min","0"),o.minuteElement.setAttribute("max","59"),o.timeContainer.appendChild(t),o.timeContainer.appendChild(e),o.timeContainer.appendChild(n),o.config.time_24hr&&o.timeContainer.classList.add("time24hr");if(o.config.enableSeconds){o.timeContainer.classList.add("hasSeconds");var a=I("flatpickr-second");o.secondElement=a.getElementsByTagName("input")[0],o.secondElement.value=b(o.latestSelectedDateObj?o.latestSelectedDateObj.getSeconds():o.config.defaultSeconds),o.secondElement.setAttribute("step",o.minuteElement.getAttribute("step")),o.secondElement.setAttribute("min","0"),o.secondElement.setAttribute("max","59"),o.timeContainer.appendChild(k("span","flatpickr-time-separator",":")),o.timeContainer.appendChild(a)}o.config.time_24hr||(o.amPM=k("span","flatpickr-am-pm",o.l10n.amPM[y((o.latestSelectedDateObj?o.hourElement.value:o.config.defaultHour)>11)]),o.amPM.title=o.l10n.toggleTitle,o.amPM.tabIndex=-1,o.timeContainer.appendChild(o.amPM));return o.timeContainer}());E(o.calendarContainer,"rangeMode","range"===o.config.mode),E(o.calendarContainer,"animate",!0===o.config.animate),E(o.calendarContainer,"multiMonth",o.config.showMonths>1),o.calendarContainer.appendChild(e);var i=void 0!==o.config.appendTo&&void 0!==o.config.appendTo.nodeType;if((o.config.inline||o.config.static)&&(o.calendarContainer.classList.add(o.config.inline?"inline":"static"),o.config.inline&&(!i&&o.element.parentNode?o.element.parentNode.insertBefore(o.calendarContainer,o._input.nextSibling):void 0!==o.config.appendTo&&o.config.appendTo.appendChild(o.calendarContainer)),o.config.static)){var r=k("div","flatpickr-wrapper");o.element.parentNode&&o.element.parentNode.insertBefore(r,o.element),r.appendChild(o.element),o.altInput&&r.appendChild(o.altInput),r.appendChild(o.calendarContainer)}o.config.static||o.config.inline||(void 0!==o.config.appendTo?o.config.appendTo:window.document.body).appendChild(o.calendarContainer)}(),function(){o.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(o.element.querySelectorAll("[data-"+e+"]"),(function(t){return m(t,"click",o[e])}))}));if(o.isMobile)return void function(){var e=o.config.enableTime?o.config.noCalendar?"time":"datetime-local":"date";o.mobileInput=k("input",o.input.className+" flatpickr-mobile"),o.mobileInput.tabIndex=1,o.mobileInput.type=e,o.mobileInput.disabled=o.input.disabled,o.mobileInput.required=o.input.required,o.mobileInput.placeholder=o.input.placeholder,o.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",o.selectedDates.length>0&&(o.mobileInput.defaultValue=o.mobileInput.value=o.formatDate(o.selectedDates[0],o.mobileFormatStr));o.config.minDate&&(o.mobileInput.min=o.formatDate(o.config.minDate,"Y-m-d"));o.config.maxDate&&(o.mobileInput.max=o.formatDate(o.config.maxDate,"Y-m-d"));o.input.getAttribute("step")&&(o.mobileInput.step=String(o.input.getAttribute("step")));o.input.type="hidden",void 0!==o.altInput&&(o.altInput.type="hidden");try{o.input.parentNode&&o.input.parentNode.insertBefore(o.mobileInput,o.input.nextSibling)}catch(e){}m(o.mobileInput,"change",(function(e){o.setDate(O(e).value,!1,o.mobileFormatStr),he("onChange"),he("onClose")}))}();var e=T(oe,50);o._debouncedChange=T(p,300),o.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(o.daysContainer,"mouseover",(function(e){"range"===o.config.mode&&ae(O(e))}));m(window.document.body,"keydown",ne),o.config.inline||o.config.static||m(window,"resize",e);void 0!==window.ontouchstart?m(window.document,"touchstart",V):m(window.document,"click",g(V));m(window.document,"focus",V,{capture:!0}),!0===o.config.clickOpens&&(m(o._input,"focus",o.open),m(o._input,"click",g(o.open)));void 0!==o.daysContainer&&(m(o.monthNav,"click",g(be)),m(o.monthNav,["keyup","increment"],f),m(o.daysContainer,"click",g(fe)));if(void 0!==o.timeContainer&&void 0!==o.minuteElement&&void 0!==o.hourElement){m(o.timeContainer,["increment"],l),m(o.timeContainer,"blur",l,{capture:!0}),m(o.timeContainer,"click",g(v)),m([o.hourElement,o.minuteElement],["focus","click"],(function(e){return O(e).select()})),void 0!==o.secondElement&&m(o.secondElement,"focus",(function(){return o.secondElement&&o.secondElement.select()})),void 0!==o.amPM&&m(o.amPM,"click",g((function(e){l(e),p()})))}o.config.allowInput&&m(o._input,"blur",te)}(),(o.selectedDates.length||o.config.noCalendar)&&(o.config.enableTime&&s(o.config.noCalendar?o.latestSelectedDateObj||o.config.minDate:void 0),Ce(!1)),r(),o.showTimeInput=o.selectedDates.length>0||o.config.noCalendar;var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!o.isMobile&&t&&se(),he("onReady")}(),o}function W(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],o=0;o<n.length;o++){var i=n[o];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=U(i,t||{}),a.push(i._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}window.Date=u,"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return W(this,e)},HTMLElement.prototype.flatpickr=function(e){return W([this],e)});var R=function(e,t){return"string"==typeof e?W(window.document.querySelectorAll(e),t):e instanceof Node?W([e],t):W(e,t)};return R.defaultConfig={},R.l10ns={en:e({},C),default:e({},C)},R.localize=function(t){R.l10ns.default=e(e({},R.l10ns.default),t)},R.setDefaults=function(t){R.defaultConfig=e(e({},R.defaultConfig),t)},R.parseDate=H({}),R.formatDate=P({}),R.compareDates=j,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return W(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=R),R})); |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.default = {})); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.default = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
var english = { | ||
weekdays: { | ||
shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
longhand: [ | ||
"یکشنبه", | ||
"دوشنبه", | ||
"سهشنبه", | ||
"چهارشنبه", | ||
"پنچشنبه", | ||
"جمعه", | ||
"شنبه", | ||
], | ||
}, | ||
months: { | ||
shorthand: [ | ||
"فروردین", | ||
"اردیبهشت", | ||
"خرداد", | ||
"تیر", | ||
"مرداد", | ||
"شهریور", | ||
"مهر", | ||
"آبان", | ||
"آذر", | ||
"دی", | ||
"بهمن", | ||
"اسفند", | ||
], | ||
longhand: [ | ||
"فروردین", | ||
"اردیبهشت", | ||
"خرداد", | ||
"تیر", | ||
"مرداد", | ||
"شهریور", | ||
"مهر", | ||
"آبان", | ||
"آذر", | ||
"دی", | ||
"بهمن", | ||
"اسفند", | ||
], | ||
}, | ||
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], | ||
firstDayOfWeek: 0, | ||
ordinal: function (nth) { | ||
var s = nth % 100; | ||
if (s > 3 && s < 21) | ||
return "th"; | ||
switch (s % 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", | ||
time_24hr: false, | ||
}; | ||
var english = { | ||
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 (nth) { | ||
var s = nth % 100; | ||
if (s > 3 && s < 21) | ||
return "th"; | ||
switch (s % 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", | ||
time_24hr: false, | ||
}; | ||
exports.default = english; | ||
exports.english = english; | ||
exports.default = english; | ||
exports.english = english; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); |
@@ -156,9 +156,9 @@ (function (global, factory) { | ||
longhand: [ | ||
"یکشنبه", | ||
"دوشنبه", | ||
"سهشنبه", | ||
"چهارشنبه", | ||
"پنچشنبه", | ||
"جمعه", | ||
"شنبه", | ||
"Sunday", | ||
"Monday", | ||
"Tuesday", | ||
"Wednesday", | ||
"Thursday", | ||
"Friday", | ||
"Saturday", | ||
], | ||
@@ -168,28 +168,28 @@ }, | ||
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", | ||
], | ||
@@ -196,0 +196,0 @@ }, |
{ | ||
"name": "persianflatpickr", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A lightweight, powerful javascript persian datetime picker", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
831655