File manager - Edit - /home/premiey/www/wp-includes/images/media/flatpickr.tar
Back
flatpickr.css 0000666 00000052174 15165577052 0007267 0 ustar 00 .flatpickr-calendar { background: transparent; overflow: hidden; max-height: 0; opacity: 0; visibility: hidden; text-align: center; padding: 0; -webkit-animation: none; animation: none; direction: ltr; border: 0; font-size: 14px; line-height: 24px; border-radius: 5px; position: absolute; width: 307.875px; -webkit-box-sizing: border-box; box-sizing: border-box; -ms-touch-action: manipulation; touch-action: manipulation; background: #fff; -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08); box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08); } .flatpickr-calendar.open, .flatpickr-calendar.inline { opacity: 1; visibility: visible; overflow: visible; max-height: 640px; } .flatpickr-calendar.open { display: inline-block; z-index: 99999; } .flatpickr-calendar.animate.open { -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-calendar.inline { display: block; position: relative; top: 2px; } .flatpickr-calendar.static { position: absolute; top: calc(100% + 2px); } .flatpickr-calendar.static.open { z-index: 999; display: block; } .flatpickr-calendar.hasWeeks { width: auto; } .flatpickr-calendar .hasWeeks .dayContainer, .flatpickr-calendar .hasTime .dayContainer { border-bottom: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .flatpickr-calendar .hasWeeks .dayContainer { border-left: 0; } .flatpickr-calendar.showTimeInput.hasTime .flatpickr-time { height: 40px; border-top: 1px solid #e6e6e6; } .flatpickr-calendar.noCalendar.hasTime .flatpickr-time { height: auto; } .flatpickr-calendar:before, .flatpickr-calendar:after { position: absolute; display: block; pointer-events: none; border: solid transparent; content: ''; height: 0; width: 0; left: 22px; } .flatpickr-calendar.rightMost:before, .flatpickr-calendar.rightMost:after { left: auto; right: 22px; } .flatpickr-calendar:before { border-width: 5px; margin: 0 -5px; } .flatpickr-calendar:after { border-width: 4px; margin: 0 -4px; } .flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after { bottom: 100%; } .flatpickr-calendar.arrowTop:before { border-bottom-color: #e6e6e6; } .flatpickr-calendar.arrowTop:after { border-bottom-color: #fff; } .flatpickr-calendar.arrowBottom:before, .flatpickr-calendar.arrowBottom:after { top: 100%; } .flatpickr-calendar.arrowBottom:before { border-top-color: #e6e6e6; } .flatpickr-calendar.arrowBottom:after { border-top-color: #fff; } .flatpickr-calendar:focus { outline: 0; } .flatpickr-wrapper { position: relative; display: inline-block; } .flatpickr-month { background: transparent; color: rgba(0,0,0,0.9); fill: rgba(0,0,0,0.9); height: 28px; line-height: 1; text-align: center; position: relative; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; overflow: hidden; } .flatpickr-prev-month, .flatpickr-next-month { text-decoration: none; cursor: pointer; position: absolute; top: 0px; line-height: 16px; height: 28px; padding: 10px calc(3.57% - 1.5px); z-index: 3; } .flatpickr-prev-month i, .flatpickr-next-month i { position: relative; } .flatpickr-prev-month.flatpickr-prev-month, .flatpickr-next-month.flatpickr-prev-month { /* /*rtl:begin:ignore*/ /* */ left: 0; /* /*rtl:end:ignore*/ /* */ } /* /*rtl:begin:ignore*/ /* /*rtl:end:ignore*/ .flatpickr-prev-month.flatpickr-next-month, .flatpickr-next-month.flatpickr-next-month { /* /*rtl:begin:ignore*/ /* */ right: 0; /* /*rtl:end:ignore*/ /* */ } /* /*rtl:begin:ignore*/ /* /*rtl:end:ignore*/ .flatpickr-prev-month:hover, .flatpickr-next-month:hover { color: #959ea9; } .flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg { fill: #f64747; } .flatpickr-prev-month svg, .flatpickr-next-month svg { width: 14px; } .flatpickr-prev-month svg path, .flatpickr-next-month svg path { -webkit-transition: fill 0.1s; transition: fill 0.1s; fill: inherit; } .numInputWrapper { position: relative; height: auto; } .numInputWrapper input, .numInputWrapper span { display: inline-block; } .numInputWrapper input { width: 100%; } .numInputWrapper span { position: absolute; right: 0; width: 14px; padding: 0 4px 0 2px; height: 50%; line-height: 50%; opacity: 0; cursor: pointer; border: 1px solid rgba(57,57,57,0.05); -webkit-box-sizing: border-box; box-sizing: border-box; } .numInputWrapper span:hover { background: rgba(0,0,0,0.1); } .numInputWrapper span:active { background: rgba(0,0,0,0.2); } .numInputWrapper span:after { display: block; content: ""; position: absolute; top: 33%; } .numInputWrapper span.arrowUp { top: 0; border-bottom: 0; } .numInputWrapper span.arrowUp:after { border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid rgba(57,57,57,0.6); } .numInputWrapper span.arrowDown { top: 50%; } .numInputWrapper span.arrowDown:after { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid rgba(57,57,57,0.6); } .numInputWrapper span svg { width: inherit; height: auto; } .numInputWrapper span svg path { fill: rgba(0,0,0,0.5); } .numInputWrapper:hover { background: rgba(0,0,0,0.05); } .numInputWrapper:hover span { opacity: 1; } .flatpickr-current-month { font-size: 135%; line-height: inherit; font-weight: 300; color: inherit; position: absolute; width: 75%; left: 12.5%; padding: 6.16px 0 0 0; line-height: 1; height: 28px; display: inline-block; text-align: center; -webkit-transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px); } .flatpickr-current-month.slideLeft { -webkit-transform: translate3d(-100%, 0px, 0px); transform: translate3d(-100%, 0px, 0px); -webkit-animation: fpFadeOut 400ms ease, fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeOut 400ms ease, fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-current-month.slideLeftNew { -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); -webkit-animation: fpFadeIn 400ms ease, fpSlideLeftNew 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeIn 400ms ease, fpSlideLeftNew 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-current-month.slideRight { -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); -webkit-animation: fpFadeOut 400ms ease, fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeOut 400ms ease, fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-current-month.slideRightNew { -webkit-transform: translate3d(0, 0, 0px); transform: translate3d(0, 0, 0px); -webkit-animation: fpFadeIn 400ms ease, fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeIn 400ms ease, fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-current-month span.cur-month { font-family: inherit; font-weight: 700; color: inherit; display: inline-block; margin-left: 0.5ch; padding: 0; } .flatpickr-current-month span.cur-month:hover { background: rgba(0,0,0,0.05); } .flatpickr-current-month .numInputWrapper { width: 6ch; width: 7ch\0; display: inline-block; } .flatpickr-current-month .numInputWrapper span.arrowUp:after { border-bottom-color: rgba(0,0,0,0.9); } .flatpickr-current-month .numInputWrapper span.arrowDown:after { border-top-color: rgba(0,0,0,0.9); } .flatpickr-current-month input.cur-year { background: transparent; -webkit-box-sizing: border-box; box-sizing: border-box; color: inherit; cursor: default; padding: 0 0 0 0.5ch; margin: 0; display: inline-block; font-size: inherit; font-family: inherit; font-weight: 300; line-height: inherit; height: initial; border: 0; border-radius: 0; vertical-align: initial; } .flatpickr-current-month input.cur-year:focus { outline: 0; } .flatpickr-current-month input.cur-year[disabled], .flatpickr-current-month input.cur-year[disabled]:hover { font-size: 100%; color: rgba(0,0,0,0.5); background: transparent; pointer-events: none; } .flatpickr-weekdays { background: transparent; text-align: center; overflow: hidden; width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; height: 28px; } span.flatpickr-weekday { cursor: default; font-size: 90%; background: transparent; color: rgba(0,0,0,0.54); line-height: 1; margin: 0; text-align: center; display: block; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; font-weight: bolder; } .dayContainer, .flatpickr-weeks { padding: 1px 0 0 0; } .flatpickr-days { position: relative; overflow: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; width: 307.875px; } .flatpickr-days:focus { outline: 0; } .dayContainer { padding: 0; outline: 0; text-align: left; width: 307.875px; min-width: 307.875px; max-width: 307.875px; -webkit-box-sizing: border-box; box-sizing: border-box; display: inline-block; display: -ms-flexbox; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -ms-flex-wrap: wrap; -ms-flex-pack: justify; -webkit-justify-content: space-around; justify-content: space-around; -webkit-transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px); opacity: 1; } .flatpickr-calendar.animate .dayContainer.slideLeft { -webkit-animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-calendar.animate .dayContainer.slideLeft, .flatpickr-calendar.animate .dayContainer.slideLeftNew { -webkit-transform: translate3d(-100%, 0px, 0px); transform: translate3d(-100%, 0px, 0px); } .flatpickr-calendar.animate .dayContainer.slideLeftNew { -webkit-animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-calendar.animate .dayContainer.slideRight { -webkit-animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); } .flatpickr-calendar.animate .dayContainer.slideRightNew { -webkit-animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); } .flatpickr-day { background: none; border: 1px solid transparent; border-radius: 150px; -webkit-box-sizing: border-box; box-sizing: border-box; color: #393939; cursor: pointer; font-weight: 400; width: 14.2857143%; -webkit-flex-basis: 14.2857143%; -ms-flex-preferred-size: 14.2857143%; flex-basis: 14.2857143%; max-width: 39px; height: 39px; line-height: 39px; margin: 0; display: inline-block; position: relative; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; } .flatpickr-day.inRange, .flatpickr-day.prevMonthDay.inRange, .flatpickr-day.nextMonthDay.inRange, .flatpickr-day.today.inRange, .flatpickr-day.prevMonthDay.today.inRange, .flatpickr-day.nextMonthDay.today.inRange, .flatpickr-day:hover, .flatpickr-day.prevMonthDay:hover, .flatpickr-day.nextMonthDay:hover, .flatpickr-day:focus, .flatpickr-day.prevMonthDay:focus, .flatpickr-day.nextMonthDay:focus { cursor: pointer; outline: 0; background: #e6e6e6; border-color: #e6e6e6; } .flatpickr-day.today { border-color: #959ea9; } .flatpickr-day.today:hover, .flatpickr-day.today:focus { border-color: #959ea9; background: #959ea9; color: #fff; } .flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay { background: #569ff7; -webkit-box-shadow: none; box-shadow: none; color: #fff; border-color: #569ff7; } .flatpickr-day.selected.startRange, .flatpickr-day.startRange.startRange, .flatpickr-day.endRange.startRange { border-radius: 50px 0 0 50px; } .flatpickr-day.selected.endRange, .flatpickr-day.startRange.endRange, .flatpickr-day.endRange.endRange { border-radius: 0 50px 50px 0; } .flatpickr-day.selected.startRange + .endRange, .flatpickr-day.startRange.startRange + .endRange, .flatpickr-day.endRange.startRange + .endRange { -webkit-box-shadow: -10px 0 0 #569ff7; box-shadow: -10px 0 0 #569ff7; } .flatpickr-day.selected.startRange.endRange, .flatpickr-day.startRange.startRange.endRange, .flatpickr-day.endRange.startRange.endRange { border-radius: 50px; } .flatpickr-day.inRange { border-radius: 0; -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6; box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6; } .flatpickr-day.disabled, .flatpickr-day.disabled:hover { pointer-events: none; } .flatpickr-day.disabled, .flatpickr-day.disabled:hover, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay, .flatpickr-day.notAllowed, .flatpickr-day.notAllowed.prevMonthDay, .flatpickr-day.notAllowed.nextMonthDay { color: rgba(57,57,57,0.3); background: transparent; border-color: transparent; cursor: default; } .flatpickr-day.week.selected { border-radius: 0; -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7; box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7; } .rangeMode .flatpickr-day { margin-top: 1px; } .flatpickr-weekwrapper { display: inline-block; float: left; } .flatpickr-weekwrapper .flatpickr-weeks { padding: 0 12px; -webkit-box-shadow: 1px 0 0 #e6e6e6; box-shadow: 1px 0 0 #e6e6e6; } .flatpickr-weekwrapper .flatpickr-weekday { float: none; width: 100%; line-height: 28px; } .flatpickr-weekwrapper span.flatpickr-day { display: block; width: 100%; max-width: none; } .flatpickr-innerContainer { display: block; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-sizing: border-box; box-sizing: border-box; overflow: hidden; } .flatpickr-rContainer { display: inline-block; padding: 0; -webkit-box-sizing: border-box; box-sizing: border-box; } .flatpickr-time { text-align: center; outline: 0; display: block; height: 0; line-height: 40px; max-height: 40px; -webkit-box-sizing: border-box; box-sizing: border-box; overflow: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .flatpickr-time:after { content: ""; display: table; clear: both; } .flatpickr-time .numInputWrapper { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; width: 40%; height: 40px; float: left; } .flatpickr-time .numInputWrapper span.arrowUp:after { border-bottom-color: #393939; } .flatpickr-time .numInputWrapper span.arrowDown:after { border-top-color: #393939; } .flatpickr-time.hasSeconds .numInputWrapper { width: 26%; } .flatpickr-time.time24hr .numInputWrapper { width: 49%; } .flatpickr-time input { background: transparent; -webkit-box-shadow: none; box-shadow: none; border: 0; border-radius: 0; text-align: center; margin: 0; padding: 0; height: inherit; line-height: inherit; cursor: pointer; color: #393939; font-size: 14px; position: relative; -webkit-box-sizing: border-box; box-sizing: border-box; } .flatpickr-time input.flatpickr-hour { font-weight: bold; } .flatpickr-time input.flatpickr-minute, .flatpickr-time input.flatpickr-second { font-weight: 400; } .flatpickr-time input:focus { outline: 0; border: 0; } .flatpickr-time .flatpickr-time-separator, .flatpickr-time .flatpickr-am-pm { height: inherit; display: inline-block; float: left; line-height: inherit; color: #393939; font-weight: bold; width: 2%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-align-self: center; -ms-flex-item-align: center; align-self: center; } .flatpickr-time .flatpickr-am-pm { outline: 0; width: 18%; cursor: pointer; text-align: center; font-weight: 400; } .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time .flatpickr-am-pm:focus { background: #f0f0f0; } .flatpickr-input[readonly] { cursor: pointer; } @-webkit-keyframes fpFadeInDown { from { opacity: 0; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } to { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @keyframes fpFadeInDown { from { opacity: 0; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } to { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes fpSlideLeft { from { -webkit-transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px); } to { -webkit-transform: translate3d(-100%, 0px, 0px); transform: translate3d(-100%, 0px, 0px); } } @keyframes fpSlideLeft { from { -webkit-transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px); } to { -webkit-transform: translate3d(-100%, 0px, 0px); transform: translate3d(-100%, 0px, 0px); } } @-webkit-keyframes fpSlideLeftNew { from { -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); } to { -webkit-transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px); } } @keyframes fpSlideLeftNew { from { -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); } to { -webkit-transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px); } } @-webkit-keyframes fpSlideRight { from { -webkit-transform: translate3d(0, 0, 0px); transform: translate3d(0, 0, 0px); } to { -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); } } @keyframes fpSlideRight { from { -webkit-transform: translate3d(0, 0, 0px); transform: translate3d(0, 0, 0px); } to { -webkit-transform: translate3d(100%, 0px, 0px); transform: translate3d(100%, 0px, 0px); } } @-webkit-keyframes fpSlideRightNew { from { -webkit-transform: translate3d(-100%, 0, 0px); transform: translate3d(-100%, 0, 0px); } to { -webkit-transform: translate3d(0, 0, 0px); transform: translate3d(0, 0, 0px); } } @keyframes fpSlideRightNew { from { -webkit-transform: translate3d(-100%, 0, 0px); transform: translate3d(-100%, 0, 0px); } to { -webkit-transform: translate3d(0, 0, 0px); transform: translate3d(0, 0, 0px); } } @-webkit-keyframes fpFadeOut { from { opacity: 1; } to { opacity: 0; } } @keyframes fpFadeOut { from { opacity: 1; } to { opacity: 0; } } @-webkit-keyframes fpFadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fpFadeIn { from { opacity: 0; } to { opacity: 1; } } flatpickr.js 0000666 00000222276 15165577052 0007115 0 ustar 00 /* flatpickr v4.1.4, @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.flatpickr = factory()); }(this, (function () { 'use strict'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /* global Reflect, Promise */ var __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; function compareDates(date1, date2, timeless) { if (timeless !== false) { return (new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0)); } return date1.getTime() - date2.getTime(); } var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; }; var getWeek = function (givenDate) { var onejan = new Date(givenDate.getFullYear(), 0, 1); return Math.ceil(((givenDate.getTime() - onejan.getTime()) / 86400000 + onejan.getDay() + 1) / 7); }; var duration = { DAY: 86400000, }; var defaults = { _disable: [], _enable: [], allowInput: false, altFormat: "F j, Y", altInput: false, altInputClass: "form-control input", animate: typeof window === "object" && window.navigator.userAgent.indexOf("MSIE") === -1, ariaDateFormat: "F j, Y", clickOpens: true, closeOnSelect: true, conjunction: ", ", dateFormat: "Y-m-d", defaultHour: 12, defaultMinute: 0, defaultSeconds: 0, disable: [], disableMobile: false, enable: [], enableSeconds: false, enableTime: false, errorHandler: console.warn, getWeek: getWeek, hourIncrement: 1, ignoredFocusElements: [], inline: false, locale: "default", minuteIncrement: 5, mode: "single", 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: false, onChange: [], onClose: [], onDayCreate: [], onDestroy: [], onKeyDown: [], onMonthChange: [], onOpen: [], onParseConfig: [], onReady: [], onValueUpdate: [], onYearChange: [], plugins: [], position: "auto", positionElement: undefined, prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>", shorthandCurrentMonth: false, static: false, time_24hr: false, weekNumbers: false, wrap: 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"], }; var pad = function (number) { return ("0" + number).slice(-2); }; var int = function (bool) { return (bool === true ? 1 : 0); }; function debounce(func, wait, immediate) { if (immediate === void 0) { immediate = false; } var timeout; return function () { var context = this, args = arguments; timeout !== null && clearTimeout(timeout); timeout = window.setTimeout(function () { timeout = null; if (!immediate) func.apply(context, args); }, wait); if (immediate && !timeout) func.apply(context, args); }; } var arrayify = function (obj) { return obj instanceof Array ? obj : [obj]; }; function mouseDelta(e) { var delta = e.wheelDelta || -e.deltaY; return delta >= 0 ? 1 : -1; } function toggleClass(elem, className, bool) { if (bool === true) return elem.classList.add(className); elem.classList.remove(className); } function createElement(tag, className, content) { var e = window.document.createElement(tag); className = className || ""; content = content || ""; e.className = className; if (content !== undefined) e.textContent = content; return e; } function clearNode(node) { while (node.firstChild) node.removeChild(node.firstChild); } function findParent(node, condition) { if (condition(node)) return node; else if (node.parentNode) return findParent(node.parentNode, condition); return undefined; } function createNumberInput(inputClassName) { var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown"); numInput.type = "text"; numInput.pattern = "\\d*"; wrapper.appendChild(numInput); wrapper.appendChild(arrowUp); wrapper.appendChild(arrowDown); return wrapper; } var do_nothing = function () { return undefined; }; var revFormat = { D: do_nothing, F: function (dateObj, monthName, locale) { dateObj.setMonth(locale.months.longhand.indexOf(monthName)); }, G: function (dateObj, hour) { dateObj.setHours(parseFloat(hour)); }, H: function (dateObj, hour) { dateObj.setHours(parseFloat(hour)); }, J: function (dateObj, day) { dateObj.setDate(parseFloat(day)); }, K: function (dateObj, amPM, locale) { dateObj.setHours(dateObj.getHours() % 12 + 12 * int(new RegExp(locale.amPM[1], "i").test(amPM))); }, M: function (dateObj, shortMonth, locale) { dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth)); }, S: function (dateObj, seconds) { dateObj.setSeconds(parseFloat(seconds)); }, U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); }, W: function (dateObj, weekNum) { var weekNumber = parseInt(weekNum); return new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0); }, Y: function (dateObj, year) { dateObj.setFullYear(parseFloat(year)); }, Z: function (_, ISODate) { return new Date(ISODate); }, d: function (dateObj, day) { dateObj.setDate(parseFloat(day)); }, h: function (dateObj, hour) { dateObj.setHours(parseFloat(hour)); }, i: function (dateObj, minutes) { dateObj.setMinutes(parseFloat(minutes)); }, j: function (dateObj, day) { dateObj.setDate(parseFloat(day)); }, l: do_nothing, m: function (dateObj, month) { dateObj.setMonth(parseFloat(month) - 1); }, n: function (dateObj, month) { dateObj.setMonth(parseFloat(month) - 1); }, s: function (dateObj, seconds) { dateObj.setSeconds(parseFloat(seconds)); }, w: do_nothing, y: function (dateObj, year) { dateObj.setFullYear(2000 + parseFloat(year)); }, }; var tokenRegex = { 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)", w: "(\\d\\d|\\d)", y: "(\\d{2})", }; var formats = { Z: function (date) { return date.toISOString(); }, D: function (date, locale, options) { return locale.weekdays.shorthand[formats.w(date, locale, options)]; }, F: function (date, locale, options) { return monthToStr(formats.n(date, locale, options) - 1, false, locale); }, G: function (date, locale, options) { return pad(formats.h(date, locale, options)); }, H: function (date) { return pad(date.getHours()); }, J: function (date, locale) { return locale.ordinal !== undefined ? date.getDate() + locale.ordinal(date.getDate()) : date.getDate(); }, K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; }, M: function (date, locale) { return monthToStr(date.getMonth(), true, locale); }, S: function (date) { return pad(date.getSeconds()); }, U: function (date) { return date.getTime() / 1000; }, W: function (date, _, options) { return options.getWeek(date); }, Y: function (date) { return date.getFullYear(); }, d: function (date) { return pad(date.getDate()); }, h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); }, i: function (date) { return pad(date.getMinutes()); }, j: function (date) { return date.getDate(); }, l: function (date, locale) { return locale.weekdays.longhand[date.getDay()]; }, m: function (date) { return pad(date.getMonth() + 1); }, n: function (date) { return date.getMonth() + 1; }, s: function (date) { return date.getSeconds(); }, w: function (date) { return date.getDay(); }, y: function (date) { return String(date.getFullYear()).substring(2); }, }; if (typeof Object.assign !== "function") { Object.assign = function (target) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } if (!target) { throw TypeError("Cannot convert undefined or null to object"); } var _loop_1 = function (source) { if (source) { Object.keys(source).forEach(function (key) { return (target[key] = source[key]); }); } }; for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { var source = args_1[_a]; _loop_1(source); } return target; }; } function FlatpickrInstance(element, instanceConfig) { var self = {}; self.parseDate = parseDate; self.formatDate = formatDate; self._animationLoop = []; self._handlers = []; self._bind = bind; self._setHoursFromDate = setHoursFromDate; self.changeMonth = changeMonth; self.changeYear = changeYear; self.clear = clear; self.close = close; self._createElement = createElement; self.destroy = destroy; self.isEnabled = isEnabled; self.jumpToDate = jumpToDate; self.open = open; self.redraw = redraw; self.set = set; self.setDate = setDate; self.toggle = toggle; function setupHelperFunctions() { self.utils = { getDaysInMonth: function (month, yr) { if (month === void 0) { month = self.currentMonth; } if (yr === void 0) { yr = self.currentYear; } if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0)) return 29; return self.l10n.daysInMonth[month]; }, }; } function init() { self.element = self.input = element; self.isOpen = false; parseConfig(); setupLocale(); setupInputs(); setupDates(); setupHelperFunctions(); if (!self.isMobile) build(); bindEvents(); if (self.selectedDates.length || self.config.noCalendar) { if (self.config.enableTime) { setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj || self.config.minDate : undefined); } updateValue(false); } self.showTimeInput = self.selectedDates.length > 0 || self.config.noCalendar; if (self.weekWrapper !== undefined && self.daysContainer !== undefined) { self.calendarContainer.style.width = self.daysContainer.offsetWidth + self.weekWrapper.offsetWidth + "px"; } if (!self.isMobile) positionCalendar(); triggerEvent("onReady"); } function bindToInstance(fn) { return fn.bind(self); } function updateTime(e) { if (self.config.noCalendar && self.selectedDates.length === 0) { var minDate = self.config.minDate; self.setDate(new Date().setHours(!minDate ? self.config.defaultHour : minDate.getHours(), !minDate ? self.config.defaultMinute : minDate.getMinutes(), !minDate || !self.config.enableSeconds ? self.config.defaultSeconds : minDate.getSeconds()), false); setHoursFromInputs(); updateValue(); } timeWrapper(e); if (self.selectedDates.length === 0) return; if (!self.minDateHasTime || e.type !== "input" || e.target.value.length >= 2) { setHoursFromInputs(); updateValue(); } else { setTimeout(function () { setHoursFromInputs(); updateValue(); }, 1000); } } function ampm2military(hour, amPM) { return hour % 12 + 12 * int(amPM === self.l10n.amPM[1]); } function military2ampm(hour) { switch (hour % 24) { case 0: case 12: return 12; default: return hour % 12; } } function setHoursFromInputs() { if (self.hourElement === undefined || self.minuteElement === undefined) return; var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0; if (self.amPM !== undefined) hours = ampm2military(hours, self.amPM.textContent); if (self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate) === 0) { hours = Math.max(hours, self.config.minDate.getHours()); if (hours === self.config.minDate.getHours()) minutes = Math.max(minutes, self.config.minDate.getMinutes()); } if (self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate) === 0) { hours = Math.min(hours, self.config.maxDate.getHours()); if (hours === self.config.maxDate.getHours()) minutes = Math.min(minutes, self.config.maxDate.getMinutes()); } setHours(hours, minutes, seconds); } function setHoursFromDate(dateObj) { var date = dateObj || self.latestSelectedDateObj; if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds()); } function setHours(hours, minutes, seconds) { if (self.latestSelectedDateObj !== undefined) { self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0); } if (!self.hourElement || !self.minuteElement || self.isMobile) return; self.hourElement.value = pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * int(hours % 12 === 0) : hours); self.minuteElement.value = pad(minutes); if (self.amPM !== undefined) self.amPM.textContent = self.l10n.amPM[int(hours >= 12)]; if (self.secondElement !== undefined) self.secondElement.value = pad(seconds); } function onYearInput(event) { var year = parseInt(event.target.value) + (event.delta || 0); if (year.toString().length === 4 || event.key === "Enter") { self.currentYearElement.blur(); if (!/[^\d]/.test(year.toString())) changeYear(year); } } function bind(element, event, handler) { if (event instanceof Array) return event.forEach(function (ev) { return bind(element, ev, handler); }); if (element instanceof Array) return element.forEach(function (el) { return bind(el, event, handler); }); element.addEventListener(event, handler); self._handlers.push({ element: element, event: event, handler: handler }); } function onClick(handler) { return function (evt) { evt.which === 1 && handler(evt); }; } function triggerChange() { triggerEvent("onChange"); } function bindEvents() { if (self.config.wrap) { ["open", "close", "toggle", "clear"].forEach(function (evt) { Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) { return bind(el, "click", self[evt]); }); }); } if (self.isMobile) { setupMobile(); return; } var debouncedResize = debounce(onResize, 50); self._debouncedChange = debounce(triggerChange, 300); if (self.config.mode === "range" && self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) bind(self.daysContainer, "mouseover", function (e) { return onMouseOver(e.target); }); bind(window.document.body, "keydown", onKeyDown); if (!self.config.static) bind(self._input, "keydown", onKeyDown); if (!self.config.inline && !self.config.static) bind(window, "resize", debouncedResize); if (window.ontouchstart !== undefined) bind(window.document.body, "touchstart", documentClick); bind(window.document.body, "mousedown", onClick(documentClick)); bind(self._input, "blur", documentClick); if (self.config.clickOpens === true) { bind(self._input, "focus", self.open); bind(self._input, "mousedown", onClick(self.open)); } if (self.daysContainer !== undefined) { self.monthNav.addEventListener("wheel", function (e) { return e.preventDefault(); }); bind(self.monthNav, "wheel", debounce(onMonthNavScroll, 10)); bind(self.monthNav, "mousedown", onClick(onMonthNavClick)); bind(self.monthNav, ["keyup", "increment"], onYearInput); bind(self.daysContainer, "mousedown", onClick(selectDate)); if (self.config.animate) { bind(self.daysContainer, ["webkitAnimationEnd", "animationend"], animateDays); bind(self.monthNav, ["webkitAnimationEnd", "animationend"], animateMonths); } } if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) { var selText = function (e) { return e.target.select(); }; bind(self.timeContainer, ["wheel", "input", "increment"], updateTime); bind(self.timeContainer, "mousedown", onClick(timeIncrement)); bind(self.timeContainer, ["wheel", "increment"], self._debouncedChange); bind(self.timeContainer, "input", triggerChange); bind([self.hourElement, self.minuteElement], ["focus", "click"], selText); if (self.secondElement !== undefined) bind(self.secondElement, "focus", function () { return self.secondElement && self.secondElement.select(); }); if (self.amPM !== undefined) { bind(self.amPM, "mousedown", onClick(function (e) { updateTime(e); triggerChange(); })); } } } function processPostDayAnimation() { self._animationLoop.forEach(function (f) { return f(); }); self._animationLoop = []; } function animateDays(e) { if (self.daysContainer && self.daysContainer.childNodes.length > 1) { switch (e.animationName) { case "fpSlideLeft": self.daysContainer.lastChild && self.daysContainer.lastChild.classList.remove("slideLeftNew"); self.daysContainer.removeChild(self.daysContainer .firstChild); self.days = self.daysContainer.firstChild; processPostDayAnimation(); break; case "fpSlideRight": self.daysContainer.firstChild && self.daysContainer.firstChild.classList.remove("slideRightNew"); self.daysContainer.removeChild(self.daysContainer .lastChild); self.days = self.daysContainer.firstChild; processPostDayAnimation(); break; default: break; } } } function animateMonths(e) { switch (e.animationName) { case "fpSlideLeftNew": case "fpSlideRightNew": self.navigationCurrentMonth.classList.remove("slideLeftNew"); self.navigationCurrentMonth.classList.remove("slideRightNew"); var nav = self.navigationCurrentMonth; while (nav.nextSibling && /curr/.test(nav.nextSibling.className)) self.monthNav.removeChild(nav.nextSibling); while (nav.previousSibling && /curr/.test(nav.previousSibling.className)) self.monthNav.removeChild(nav.previousSibling); self.oldCurMonth = undefined; break; } } function jumpToDate(jumpDate) { var jumpTo = jumpDate !== undefined ? parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate && self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now); try { if (jumpTo !== undefined) { self.currentYear = jumpTo.getFullYear(); self.currentMonth = jumpTo.getMonth(); } } catch (e) { e.message = "Invalid date supplied: " + jumpTo; self.config.errorHandler(e); } self.redraw(); } function timeIncrement(e) { if (~e.target.className.indexOf("arrow")) incrementNumInput(e, e.target.classList.contains("arrowUp") ? 1 : -1); } function incrementNumInput(e, delta, inputElem) { var target = e && e.target; var input = inputElem || (target && target.parentNode && target.parentNode.firstChild); var event = createEvent("increment"); event.delta = delta; input && input.dispatchEvent(event); } function build() { var fragment = window.document.createDocumentFragment(); self.calendarContainer = createElement("div", "flatpickr-calendar"); self.calendarContainer.tabIndex = -1; if (!self.config.noCalendar) { fragment.appendChild(buildMonthNav()); self.innerContainer = createElement("div", "flatpickr-innerContainer"); if (self.config.weekNumbers) { var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers; self.innerContainer.appendChild(weekWrapper); self.weekNumbers = weekNumbers; self.weekWrapper = weekWrapper; } self.rContainer = createElement("div", "flatpickr-rContainer"); self.rContainer.appendChild(buildWeekdays()); if (!self.daysContainer) { self.daysContainer = createElement("div", "flatpickr-days"); self.daysContainer.tabIndex = -1; } buildDays(); self.rContainer.appendChild(self.daysContainer); self.innerContainer.appendChild(self.rContainer); fragment.appendChild(self.innerContainer); } if (self.config.enableTime) { fragment.appendChild(buildTime()); } toggleClass(self.calendarContainer, "rangeMode", self.config.mode === "range"); toggleClass(self.calendarContainer, "animate", self.config.animate); self.calendarContainer.appendChild(fragment); var customAppend = self.config.appendTo !== undefined && self.config.appendTo.nodeType; if (self.config.inline || self.config.static) { self.calendarContainer.classList.add(self.config.inline ? "inline" : "static"); if (self.config.inline) { if (!customAppend && self.element.parentNode) self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling); else if (self.config.appendTo !== undefined) self.config.appendTo.appendChild(self.calendarContainer); } if (self.config.static) { var wrapper = createElement("div", "flatpickr-wrapper"); if (self.element.parentNode) self.element.parentNode.insertBefore(wrapper, self.element); wrapper.appendChild(self.element); if (self.altInput) wrapper.appendChild(self.altInput); wrapper.appendChild(self.calendarContainer); } } if (!self.config.static && !self.config.inline) (self.config.appendTo !== undefined ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer); } function createDay(className, date, dayNumber, i) { var dateIsEnabled = isEnabled(date, true), dayElement = createElement("span", "flatpickr-day " + className, date.getDate().toString()); dayElement.dateObj = date; dayElement.$i = i; dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat)); if (compareDates(date, self.now) === 0) { self.todayDateElem = dayElement; dayElement.classList.add("today"); } if (dateIsEnabled) { dayElement.tabIndex = -1; if (isDateSelected(date)) { dayElement.classList.add("selected"); self.selectedDateElem = dayElement; if (self.config.mode === "range") { toggleClass(dayElement, "startRange", self.selectedDates[0] && compareDates(date, self.selectedDates[0]) === 0); toggleClass(dayElement, "endRange", self.selectedDates[1] && compareDates(date, self.selectedDates[1]) === 0); } } } else { dayElement.classList.add("disabled"); if (self.selectedDates[0] && self.minRangeDate && date > self.minRangeDate && date < self.selectedDates[0]) self.minRangeDate = date; else if (self.selectedDates[0] && self.maxRangeDate && date < self.maxRangeDate && date > self.selectedDates[0]) self.maxRangeDate = date; } if (self.config.mode === "range") { if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add("inRange"); if (self.selectedDates.length === 1 && self.minRangeDate !== undefined && self.maxRangeDate !== undefined && (date < self.minRangeDate || date > self.maxRangeDate)) dayElement.classList.add("notAllowed"); } if (self.weekNumbers && className !== "prevMonthDay" && dayNumber % 7 === 1) { self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='disabled flatpickr-day'>" + self.config.getWeek(date) + "</span>"); } triggerEvent("onDayCreate", dayElement); return dayElement; } function focusOnDay(currentIndex, offset) { var newIndex = currentIndex + offset || 0, targetNode = (currentIndex !== undefined ? self.days.childNodes[newIndex] : self.selectedDateElem || self.todayDateElem || self.days.childNodes[0]); var focus = function () { targetNode = targetNode || self.days.childNodes[newIndex]; targetNode.focus(); if (self.config.mode === "range") onMouseOver(targetNode); }; if (targetNode === undefined && offset !== 0) { if (offset > 0) { self.changeMonth(1, true, undefined, true); newIndex = newIndex % 42; } else if (offset < 0) { self.changeMonth(-1, true, undefined, true); newIndex += 42; } return afterDayAnim(focus); } focus(); } function afterDayAnim(fn) { self.config.animate === true ? self._animationLoop.push(fn) : fn(); } function buildDays(delta) { if (self.daysContainer === undefined) { return; } var firstOfMonth = (new Date(self.currentYear, self.currentMonth, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7, isRangeMode = self.config.mode === "range"; var prevMonthDays = self.utils.getDaysInMonth((self.currentMonth - 1 + 12) % 12); var daysInMonth = self.utils.getDaysInMonth(), days = window.document.createDocumentFragment(); var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0; if (self.weekNumbers && self.weekNumbers.firstChild) self.weekNumbers.textContent = ""; if (isRangeMode) { self.minRangeDate = new Date(self.currentYear, self.currentMonth - 1, dayNumber); self.maxRangeDate = new Date(self.currentYear, self.currentMonth + 1, (42 - firstOfMonth) % daysInMonth); } for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) { days.appendChild(createDay("prevMonthDay", new Date(self.currentYear, self.currentMonth - 1, dayNumber), dayNumber, dayIndex)); } for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) { days.appendChild(createDay("", new Date(self.currentYear, self.currentMonth, dayNumber), dayNumber, dayIndex)); } for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth; dayNum++, dayIndex++) { days.appendChild(createDay("nextMonthDay", new Date(self.currentYear, self.currentMonth + 1, dayNum % daysInMonth), dayNum, dayIndex)); } if (isRangeMode && self.selectedDates.length === 1 && days.childNodes[0]) { self._hidePrevMonthArrow = self._hidePrevMonthArrow || (!!self.minRangeDate && self.minRangeDate > days.childNodes[0].dateObj); self._hideNextMonthArrow = self._hideNextMonthArrow || (!!self.maxRangeDate && self.maxRangeDate < new Date(self.currentYear, self.currentMonth + 1, 1)); } else updateNavigationCurrentMonth(); var dayContainer = createElement("div", "dayContainer"); dayContainer.appendChild(days); if (!self.config.animate || delta === undefined) clearNode(self.daysContainer); else { while (self.daysContainer.childNodes.length > 1) self.daysContainer.removeChild(self.daysContainer.firstChild); } if (delta && delta >= 0) self.daysContainer.appendChild(dayContainer); else self.daysContainer.insertBefore(dayContainer, self.daysContainer.firstChild); self.days = self.daysContainer.childNodes[0]; } function buildMonthNav() { var monthNavFragment = window.document.createDocumentFragment(); self.monthNav = createElement("div", "flatpickr-month"); self.prevMonthNav = createElement("span", "flatpickr-prev-month"); self.prevMonthNav.innerHTML = self.config.prevArrow; self.currentMonthElement = createElement("span", "cur-month"); self.currentMonthElement.title = self.l10n.scrollTitle; var yearInput = createNumberInput("cur-year"); self.currentYearElement = yearInput.childNodes[0]; self.currentYearElement.title = self.l10n.scrollTitle; if (self.config.minDate) self.currentYearElement.min = self.config.minDate .getFullYear() .toString(); if (self.config.maxDate) { self.currentYearElement.max = self.config.maxDate .getFullYear() .toString(); self.currentYearElement.disabled = !!self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear(); } self.nextMonthNav = createElement("span", "flatpickr-next-month"); self.nextMonthNav.innerHTML = self.config.nextArrow; self.navigationCurrentMonth = createElement("div", "flatpickr-current-month"); self.navigationCurrentMonth.appendChild(self.currentMonthElement); self.navigationCurrentMonth.appendChild(yearInput); monthNavFragment.appendChild(self.prevMonthNav); monthNavFragment.appendChild(self.navigationCurrentMonth); monthNavFragment.appendChild(self.nextMonthNav); self.monthNav.appendChild(monthNavFragment); Object.defineProperty(self, "_hidePrevMonthArrow", { get: function () { return self.__hidePrevMonthArrow; }, set: function (bool) { if (self.__hidePrevMonthArrow !== bool) self.prevMonthNav.style.display = bool ? "none" : "block"; self.__hidePrevMonthArrow = bool; }, }); Object.defineProperty(self, "_hideNextMonthArrow", { get: function () { return self.__hideNextMonthArrow; }, set: function (bool) { if (self.__hideNextMonthArrow !== bool) self.nextMonthNav.style.display = bool ? "none" : "block"; self.__hideNextMonthArrow = bool; }, }); updateNavigationCurrentMonth(); return self.monthNav; } function buildTime() { self.calendarContainer.classList.add("hasTime"); if (self.config.noCalendar) self.calendarContainer.classList.add("noCalendar"); self.timeContainer = createElement("div", "flatpickr-time"); self.timeContainer.tabIndex = -1; var separator = createElement("span", "flatpickr-time-separator", ":"); var hourInput = createNumberInput("flatpickr-hour"); self.hourElement = hourInput.childNodes[0]; var minuteInput = createNumberInput("flatpickr-minute"); self.minuteElement = minuteInput.childNodes[0]; self.hourElement.tabIndex = self.minuteElement.tabIndex = -1; self.hourElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.time_24hr ? self.config.defaultHour : military2ampm(self.config.defaultHour)); self.minuteElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : self.config.defaultMinute); self.hourElement.step = self.config.hourIncrement.toString(); self.minuteElement.step = self.config.minuteIncrement.toString(); self.hourElement.min = self.config.time_24hr ? "0" : "1"; self.hourElement.max = self.config.time_24hr ? "23" : "12"; self.minuteElement.min = "0"; self.minuteElement.max = "59"; self.hourElement.title = self.minuteElement.title = self.l10n.scrollTitle; self.timeContainer.appendChild(hourInput); self.timeContainer.appendChild(separator); self.timeContainer.appendChild(minuteInput); if (self.config.time_24hr) self.timeContainer.classList.add("time24hr"); if (self.config.enableSeconds) { self.timeContainer.classList.add("hasSeconds"); var secondInput = createNumberInput("flatpickr-second"); self.secondElement = secondInput.childNodes[0]; self.secondElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getSeconds() : self.config.defaultSeconds); self.secondElement.step = self.minuteElement.step; self.secondElement.min = self.minuteElement.min; self.secondElement.max = self.minuteElement.max; self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":")); self.timeContainer.appendChild(secondInput); } if (!self.config.time_24hr) { self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj ? self.hourElement.value : self.config.defaultHour) > 11)]); self.amPM.title = self.l10n.toggleTitle; self.amPM.tabIndex = -1; self.timeContainer.appendChild(self.amPM); } return self.timeContainer; } function buildWeekdays() { if (!self.weekdayContainer) self.weekdayContainer = createElement("div", "flatpickr-weekdays"); var firstDayOfWeek = self.l10n.firstDayOfWeek; var weekdays = self.l10n.weekdays.shorthand.slice(); if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) { weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek)); } self.weekdayContainer.innerHTML = "\n <span class=flatpickr-weekday>\n " + weekdays.join("</span><span class=flatpickr-weekday>") + "\n </span>\n "; return self.weekdayContainer; } function buildWeeks() { self.calendarContainer.classList.add("hasWeeks"); var weekWrapper = createElement("div", "flatpickr-weekwrapper"); weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation)); var weekNumbers = createElement("div", "flatpickr-weeks"); weekWrapper.appendChild(weekNumbers); return { weekWrapper: weekWrapper, weekNumbers: weekNumbers, }; } function changeMonth(value, is_offset, animate, from_keyboard) { if (is_offset === void 0) { is_offset = true; } if (animate === void 0) { animate = self.config.animate; } if (from_keyboard === void 0) { from_keyboard = false; } var delta = is_offset ? value : value - self.currentMonth; if ((delta < 0 && self._hidePrevMonthArrow) || (delta > 0 && self._hideNextMonthArrow)) return; self.currentMonth += delta; if (self.currentMonth < 0 || self.currentMonth > 11) { self.currentYear += self.currentMonth > 11 ? 1 : -1; self.currentMonth = (self.currentMonth + 12) % 12; triggerEvent("onYearChange"); } buildDays(animate ? delta : undefined); if (!animate) { triggerEvent("onMonthChange"); return updateNavigationCurrentMonth(); } var nav = self.navigationCurrentMonth; if (delta < 0) { while (nav.nextSibling && /curr/.test(nav.nextSibling.className)) self.monthNav.removeChild(nav.nextSibling); } else if (delta > 0) { while (nav.previousSibling && /curr/.test(nav.previousSibling.className)) self.monthNav.removeChild(nav.previousSibling); } self.oldCurMonth = self.navigationCurrentMonth; self.navigationCurrentMonth = self.monthNav.insertBefore(self.oldCurMonth.cloneNode(true), delta > 0 ? self.oldCurMonth.nextSibling : self.oldCurMonth); var daysContainer = self.daysContainer; if (daysContainer.firstChild && daysContainer.lastChild) { if (delta > 0) { daysContainer.firstChild.classList.add("slideLeft"); daysContainer.lastChild.classList.add("slideLeftNew"); self.oldCurMonth.classList.add("slideLeft"); self.navigationCurrentMonth.classList.add("slideLeftNew"); } else if (delta < 0) { daysContainer.firstChild.classList.add("slideRightNew"); daysContainer.lastChild.classList.add("slideRight"); self.oldCurMonth.classList.add("slideRight"); self.navigationCurrentMonth.classList.add("slideRightNew"); } } self.currentMonthElement = self.navigationCurrentMonth .firstChild; self.currentYearElement = self.navigationCurrentMonth.lastChild .childNodes[0]; updateNavigationCurrentMonth(); if (self.oldCurMonth.firstChild) self.oldCurMonth.firstChild.textContent = monthToStr(self.currentMonth - delta, self.config.shorthandCurrentMonth, self.l10n); afterDayAnim(function () { return triggerEvent("onMonthChange"); }); if (from_keyboard && document.activeElement && document.activeElement.$i) { var index_1 = document.activeElement.$i; afterDayAnim(function () { focusOnDay(index_1, 0); }); } } function clear(triggerChangeEvent) { if (triggerChangeEvent === void 0) { triggerChangeEvent = true; } self.input.value = ""; if (self.altInput) self.altInput.value = ""; if (self.mobileInput) self.mobileInput.value = ""; self.selectedDates = []; self.latestSelectedDateObj = undefined; self.showTimeInput = false; self.redraw(); if (triggerChangeEvent) triggerEvent("onChange"); } function close() { self.isOpen = false; if (!self.isMobile) { self.calendarContainer.classList.remove("open"); self._input.classList.remove("active"); } triggerEvent("onClose"); } function destroy() { if (self.config !== undefined) triggerEvent("onDestroy"); for (var i = self._handlers.length; i--;) { var h = self._handlers[i]; h.element.removeEventListener(h.event, h.handler); } self._handlers = []; if (self.mobileInput) { if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput); self.mobileInput = undefined; } else if (self.calendarContainer && self.calendarContainer.parentNode) self.calendarContainer.parentNode.removeChild(self.calendarContainer); if (self.altInput) { self.input.type = "text"; if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput); delete self.altInput; } if (self.input) { self.input.type = self.input._type; self.input.classList.remove("flatpickr-input"); self.input.removeAttribute("readonly"); self.input.value = ""; } [ "_showTimeInput", "latestSelectedDateObj", "_hideNextMonthArrow", "_hidePrevMonthArrow", "__hideNextMonthArrow", "__hidePrevMonthArrow", "isMobile", "isOpen", "selectedDateElem", "minDateHasTime", "maxDateHasTime", "days", "daysContainer", "_input", "_positionElement", "innerContainer", "rContainer", "monthNav", "todayDateElem", "calendarContainer", "weekdayContainer", "prevMonthNav", "nextMonthNav", "currentMonthElement", "currentYearElement", "navigationCurrentMonth", "selectedDateElem", "config", ].forEach(function (k) { try { delete self[k]; } catch (_) { } }); } function isCalendarElem(elem) { if (self.config.appendTo && self.config.appendTo.contains(elem)) return true; return self.calendarContainer.contains(elem); } function documentClick(e) { if (self.isOpen && !self.config.inline) { var isCalendarElement = isCalendarElem(e.target); var isInput = e.target === self.input || e.target === self.altInput || self.element.contains(e.target) || (e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput))); var lostFocus = e.type === "blur" ? isInput && e.relatedTarget && !isCalendarElem(e.relatedTarget) : !isInput && !isCalendarElement; if (lostFocus && self.config.ignoredFocusElements.indexOf(e.target) === -1) { self.close(); if (self.config.mode === "range" && self.selectedDates.length === 1) { self.clear(false); self.redraw(); } } } } function changeYear(newYear) { if (!newYear || (self.currentYearElement.min && newYear < parseInt(self.currentYearElement.min)) || (self.currentYearElement.max && newYear > parseInt(self.currentYearElement.max))) return; var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum; self.currentYear = newYearNum || self.currentYear; if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) { self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth); } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) { self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth); } if (isNewYear) { self.redraw(); triggerEvent("onYearChange"); } } function isEnabled(date, timeless) { if (timeless === void 0) { timeless = true; } var dateToCheck = self.parseDate(date, undefined, timeless); if ((self.config.minDate && dateToCheck && compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) || (self.config.maxDate && dateToCheck && compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0)) return false; if (!self.config.enable.length && !self.config.disable.length) return true; if (dateToCheck === undefined) return false; var bool = self.config.enable.length > 0, array = bool ? self.config.enable : self.config.disable; for (var i = 0, d = void 0; i < array.length; i++) { d = array[i]; if (typeof d === "function" && d(dateToCheck)) return bool; else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) return bool; else if (typeof d === "string" && dateToCheck !== undefined) { var parsed = self.parseDate(d, undefined, true); return parsed && parsed.getTime() === dateToCheck.getTime() ? bool : !bool; } else if (typeof d === "object" && dateToCheck !== undefined && d.from && d.to && dateToCheck.getTime() >= d.from.getTime() && dateToCheck.getTime() <= d.to.getTime()) return bool; } return !bool; } function onKeyDown(e) { var isInput = e.target === self._input; var calendarElem = isCalendarElem(e.target); var allowInput = self.config.allowInput; var allowKeydown = self.isOpen && (!allowInput || !isInput); var allowInlineKeydown = self.config.inline && isInput && !allowInput; if (e.key === "Enter" && isInput) { if (allowInput) { self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat); return e.target.blur(); } else self.open(); } else if (calendarElem || allowKeydown || allowInlineKeydown) { var isTimeObj = !!self.timeContainer && self.timeContainer.contains(e.target); switch (e.key) { case "Enter": if (isTimeObj) updateValue(); else selectDate(e); break; case "Escape": e.preventDefault(); self.close(); break; case "Backspace": case "Delete": if (isInput && !self.config.allowInput) self.clear(); break; case "ArrowLeft": case "ArrowRight": if (!isTimeObj) { e.preventDefault(); if (self.daysContainer) { var delta_1 = e.key === "ArrowRight" ? 1 : -1; if (!e.ctrlKey) focusOnDay(e.target.$i, delta_1); else changeMonth(delta_1, true, undefined, true); } } else if (self.hourElement) self.hourElement.focus(); break; case "ArrowUp": case "ArrowDown": e.preventDefault(); var delta = e.key === "ArrowDown" ? 1 : -1; if (self.daysContainer && e.target.$i !== undefined) { if (e.ctrlKey) { changeYear(self.currentYear - delta); focusOnDay(e.target.$i, 0); } else if (!isTimeObj) focusOnDay(e.target.$i, delta * 7); } else if (self.config.enableTime) { if (!isTimeObj && self.hourElement) self.hourElement.focus(); updateTime(e); self._debouncedChange(); } break; case "Tab": if (e.target === self.hourElement) { e.preventDefault(); self.minuteElement.select(); } else if (e.target === self.minuteElement && (self.secondElement || self.amPM)) { e.preventDefault(); if (self.secondElement !== undefined) self.secondElement.focus(); else if (self.amPM !== undefined) self.amPM.focus(); } else if (e.target === self.secondElement && self.amPM) { e.preventDefault(); self.amPM.focus(); } break; case self.l10n.amPM[0].charAt(0): if (self.amPM !== undefined && e.target === self.amPM) { self.amPM.textContent = self.l10n.amPM[0]; setHoursFromInputs(); updateValue(); } break; case self.l10n.amPM[1].charAt(0): if (self.amPM !== undefined && e.target === self.amPM) { self.amPM.textContent = self.l10n.amPM[1]; setHoursFromInputs(); updateValue(); } break; default: break; } triggerEvent("onKeyDown", e); } } function onMouseOver(elem) { if (self.selectedDates.length !== 1 || !elem.classList.contains("flatpickr-day") || self.minRangeDate === undefined || self.maxRangeDate === undefined) return; var hoverDate = elem.dateObj, initialDate = self.parseDate(self.selectedDates[0], undefined, true), rangeStartDate = Math.min(hoverDate.getTime(), self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate.getTime(), self.selectedDates[0].getTime()), containsDisabled = false; for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) { if (!isEnabled(new Date(t))) { containsDisabled = true; break; } } var _loop_1 = function (i, date) { var timestamp = date.getTime(); var outOfRange = timestamp < self.minRangeDate.getTime() || timestamp > self.maxRangeDate.getTime(), dayElem = self.days.childNodes[i]; if (outOfRange) { dayElem.classList.add("notAllowed"); ["inRange", "startRange", "endRange"].forEach(function (c) { dayElem.classList.remove(c); }); return "continue"; } else if (containsDisabled && !outOfRange) return "continue"; ["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) { dayElem.classList.remove(c); }); var minRangeDate = Math.max(self.minRangeDate.getTime(), rangeStartDate), maxRangeDate = Math.min(self.maxRangeDate.getTime(), rangeEndDate); elem.classList.add(hoverDate < self.selectedDates[0] ? "startRange" : "endRange"); if (initialDate < hoverDate && timestamp === initialDate.getTime()) dayElem.classList.add("startRange"); else if (initialDate > hoverDate && timestamp === initialDate.getTime()) dayElem.classList.add("endRange"); if (timestamp >= minRangeDate && timestamp <= maxRangeDate) dayElem.classList.add("inRange"); }; for (var i = 0, date = self.days.childNodes[i].dateObj; i < 42; i++, date = self.days.childNodes[i] && self.days.childNodes[i].dateObj) { _loop_1(i, date); } } function onResize() { if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar(); } function open(e, positionElement) { if (positionElement === void 0) { positionElement = self._input; } if (self.isMobile) { if (e) { e.preventDefault(); e.target && e.target.blur(); } setTimeout(function () { self.mobileInput !== undefined && self.mobileInput.click(); }, 0); triggerEvent("onOpen"); return; } if (self._input.disabled || self.config.inline) return; var wasOpen = self.isOpen; self.isOpen = true; positionCalendar(positionElement); self.calendarContainer.classList.add("open"); self._input.classList.add("active"); !wasOpen && triggerEvent("onOpen"); } function minMaxDateSetter(type) { return function (date) { var dateObj = (self.config["_" + type + "Date"] = self.parseDate(date)); var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"]; if (dateObj !== undefined) { self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] = dateObj.getHours() > 0 || dateObj.getMinutes() > 0 || dateObj.getSeconds() > 0; } if (self.selectedDates) { self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); }); if (!self.selectedDates.length && type === "min") setHoursFromDate(dateObj); updateValue(); } if (self.daysContainer) { redraw(); if (dateObj !== undefined) self.currentYearElement[type] = dateObj.getFullYear().toString(); else self.currentYearElement.removeAttribute(type); self.currentYearElement.disabled = !!inverseDateObj && dateObj !== undefined && inverseDateObj.getFullYear() === dateObj.getFullYear(); } }; } function parseConfig() { var boolOpts = [ "wrap", "weekNumbers", "allowInput", "clickOpens", "time_24hr", "enableTime", "noCalendar", "altInput", "shorthandCurrentMonth", "inline", "static", "enableSeconds", "disableMobile", ]; var hooks = [ "onChange", "onClose", "onDayCreate", "onDestroy", "onKeyDown", "onMonthChange", "onOpen", "onParseConfig", "onReady", "onValueUpdate", "onYearChange", ]; self.config = __assign({}, flatpickr.defaultConfig); var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {}))); var formats$$1 = {}; Object.defineProperty(self.config, "enable", { get: function () { return self.config._enable || []; }, set: function (dates) { self.config._enable = parseDateRules(dates); }, }); Object.defineProperty(self.config, "disable", { get: function () { return self.config._disable || []; }, set: function (dates) { self.config._disable = parseDateRules(dates); }, }); if (!userConfig.dateFormat && userConfig.enableTime) { formats$$1.dateFormat = userConfig.noCalendar ? "H:i" + (userConfig.enableSeconds ? ":S" : "") : flatpickr.defaultConfig.dateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : ""); } if (userConfig.altInput && userConfig.enableTime && !userConfig.altFormat) { formats$$1.altFormat = userConfig.noCalendar ? "h:i" + (userConfig.enableSeconds ? ":S K" : " K") : flatpickr.defaultConfig.altFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K"); } Object.defineProperty(self.config, "minDate", { get: function () { return self.config._minDate; }, set: minMaxDateSetter("min"), }); Object.defineProperty(self.config, "maxDate", { get: function () { return self.config._maxDate; }, set: minMaxDateSetter("max"), }); Object.assign(self.config, formats$$1, userConfig); for (var i = 0; i < boolOpts.length; i++) self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === "true"; for (var i = hooks.length; i--;) { if (self.config[hooks[i]] !== undefined) { self.config[hooks[i]] = arrayify(self.config[hooks[i]] || []).map(bindToInstance); } } for (var i = 0; i < self.config.plugins.length; i++) { var pluginConf = self.config.plugins[i](self) || {}; for (var key in pluginConf) { if (~hooks.indexOf(key)) { self.config[key] = arrayify(pluginConf[key]) .map(bindToInstance) .concat(self.config[key]); } else if (typeof userConfig[key] === "undefined") self.config[key] = pluginConf[key]; } } self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === "single" && !self.config.disable.length && !self.config.enable.length && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); triggerEvent("onParseConfig"); } function setupLocale() { if (typeof self.config.locale !== "object" && typeof flatpickr.l10ns[self.config.locale] === "undefined") self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale)); self.l10n = __assign({}, flatpickr.l10ns.default, typeof self.config.locale === "object" ? self.config.locale : self.config.locale !== "default" ? flatpickr.l10ns[self.config.locale] : undefined); tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")"; } function positionCalendar(positionElement) { if (positionElement === void 0) { positionElement = self._positionElement; } if (self.calendarContainer === undefined) return; var calendarHeight = self.calendarContainer.offsetHeight, calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPos === "above" || (configPos !== "below" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight); var top = window.pageYOffset + inputBounds.top + (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2); toggleClass(self.calendarContainer, "arrowTop", !showOnTop); toggleClass(self.calendarContainer, "arrowBottom", showOnTop); if (self.config.inline) return; var left = window.pageXOffset + inputBounds.left; var right = window.document.body.offsetWidth - inputBounds.right; var rightMost = left + calendarWidth > window.document.body.offsetWidth; toggleClass(self.calendarContainer, "rightMost", rightMost); if (self.config.static) return; self.calendarContainer.style.top = top + "px"; if (!rightMost) { self.calendarContainer.style.left = left + "px"; self.calendarContainer.style.right = "auto"; } else { self.calendarContainer.style.left = "auto"; self.calendarContainer.style.right = right + "px"; } } function redraw() { if (self.config.noCalendar || self.isMobile) return; buildWeekdays(); updateNavigationCurrentMonth(); buildDays(); } function selectDate(e) { e.preventDefault(); e.stopPropagation(); var isSelectable = function (day) { return day.classList && day.classList.contains("flatpickr-day") && !day.classList.contains("disabled") && !day.classList.contains("notAllowed"); }; var t = findParent(e.target, isSelectable); if (t === undefined) return; var target = t; var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime())); var shouldChangeMonth = selectedDate.getMonth() !== self.currentMonth && self.config.mode !== "range"; self.selectedDateElem = target; if (self.config.mode === "single") self.selectedDates = [selectedDate]; else if (self.config.mode === "multiple") { var selectedIndex = isDateSelected(selectedDate); if (selectedIndex) self.selectedDates.splice(parseInt(selectedIndex), 1); else self.selectedDates.push(selectedDate); } else if (self.config.mode === "range") { if (self.selectedDates.length === 2) self.clear(); self.selectedDates.push(selectedDate); if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); }); } setHoursFromInputs(); if (shouldChangeMonth) { var isNewYear = self.currentYear !== selectedDate.getFullYear(); self.currentYear = selectedDate.getFullYear(); self.currentMonth = selectedDate.getMonth(); if (isNewYear) triggerEvent("onYearChange"); triggerEvent("onMonthChange"); } buildDays(); if (self.config.minDate && self.minDateHasTime && self.config.enableTime && compareDates(selectedDate, self.config.minDate) === 0) setHoursFromDate(self.config.minDate); updateValue(); if (self.config.enableTime) setTimeout(function () { return (self.showTimeInput = true); }, 50); if (self.config.mode === "range") { if (self.selectedDates.length === 1) { onMouseOver(target); self._hidePrevMonthArrow = self._hidePrevMonthArrow || (self.minRangeDate !== undefined && self.minRangeDate > self.days.childNodes[0].dateObj); self._hideNextMonthArrow = self._hideNextMonthArrow || (self.maxRangeDate !== undefined && self.maxRangeDate < new Date(self.currentYear, self.currentMonth + 1, 1)); } else updateNavigationCurrentMonth(); } triggerEvent("onChange"); if (!shouldChangeMonth) focusOnDay(target.$i, 0); else afterDayAnim(function () { return self.selectedDateElem && self.selectedDateElem.focus(); }); if (self.hourElement !== undefined) setTimeout(function () { return self.hourElement !== undefined && self.hourElement.select(); }, 451); if (self.config.closeOnSelect) { var single = self.config.mode === "single" && !self.config.enableTime; var range = self.config.mode === "range" && self.selectedDates.length === 2 && !self.config.enableTime; if (single || range) self.close(); } } function set(option, value) { if (option !== null && typeof option === "object") Object.assign(self.config, option); else self.config[option] = value; self.redraw(); jumpToDate(); } function setSelectedDate(inputDate, format) { var dates = []; if (inputDate instanceof Array) dates = inputDate.map(function (d) { return self.parseDate(d, format); }); else if (inputDate instanceof Date || typeof inputDate === "number") dates = [self.parseDate(inputDate, format)]; else if (typeof inputDate === "string") { switch (self.config.mode) { case "single": dates = [self.parseDate(inputDate, format)]; break; case "multiple": dates = inputDate .split(self.config.conjunction) .map(function (date) { return self.parseDate(date, format); }); break; case "range": dates = inputDate .split(self.l10n.rangeSeparator) .map(function (date) { return self.parseDate(date, format); }); break; default: break; } } else self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate))); self.selectedDates = dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }); self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); }); } function setDate(date, triggerChange, format) { if (triggerChange === void 0) { triggerChange = false; } if (date !== 0 && !date) return self.clear(triggerChange); setSelectedDate(date, format); self.showTimeInput = self.selectedDates.length > 0; self.latestSelectedDateObj = self.selectedDates[0]; self.redraw(); jumpToDate(); setHoursFromDate(); updateValue(triggerChange); if (triggerChange) triggerEvent("onChange"); } function parseDateRules(arr) { return arr .map(function (rule) { if (typeof rule === "string" || typeof rule === "number" || rule instanceof Date) { return self.parseDate(rule, undefined, true); } else if (rule && typeof rule === "object" && rule.from && rule.to) return { from: self.parseDate(rule.from, undefined), to: self.parseDate(rule.to, undefined), }; return rule; }) .filter(function (x) { return x; }); } function setupDates() { self.selectedDates = []; self.now = new Date(); var preloadedDate = self.config.defaultDate || self.input.value; if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat); var initialDate = self.selectedDates.length ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now.getTime() ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now.getTime() ? self.config.maxDate : self.now; self.currentYear = initialDate.getFullYear(); self.currentMonth = initialDate.getMonth(); if (self.selectedDates.length) self.latestSelectedDateObj = self.selectedDates[0]; self.minDateHasTime = !!self.config.minDate && (self.config.minDate.getHours() > 0 || self.config.minDate.getMinutes() > 0 || self.config.minDate.getSeconds() > 0); self.maxDateHasTime = !!self.config.maxDate && (self.config.maxDate.getHours() > 0 || self.config.maxDate.getMinutes() > 0 || self.config.maxDate.getSeconds() > 0); Object.defineProperty(self, "showTimeInput", { get: function () { return self._showTimeInput; }, set: function (bool) { self._showTimeInput = bool; if (self.calendarContainer) toggleClass(self.calendarContainer, "showTimeInput", bool); positionCalendar(); }, }); } function formatDate(dateObj, frmt) { if (self.config !== undefined && self.config.formatDate !== undefined) return self.config.formatDate(dateObj, frmt); return frmt .split("") .map(function (c, i, arr) { return formats[c] && arr[i - 1] !== "\\" ? formats[c](dateObj, self.l10n, self.config) : c !== "\\" ? c : ""; }) .join(""); } function parseDate(date, givenFormat, timeless) { if (date !== 0 && !date) return undefined; var parsedDate; var date_orig = date; if (date instanceof Date) parsedDate = new Date(date.getTime()); else if (typeof date !== "string" && date.toFixed !== undefined) parsedDate = new Date(date); else if (typeof date === "string") { var format = givenFormat || (self.config || flatpickr.defaultConfig).dateFormat; var datestr = String(date).trim(); if (datestr === "today") { parsedDate = new Date(); timeless = true; } else if (/Z$/.test(datestr) || /GMT$/.test(datestr)) parsedDate = new Date(date); else if (self.config && self.config.parseDate) parsedDate = self.config.parseDate(date, format); else { parsedDate = !self.config || !self.config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0)); var matched = void 0, ops = []; for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) { var token = format[i]; var isBackSlash = token === "\\"; var escaped = format[i - 1] === "\\" || isBackSlash; if (tokenRegex[token] && !escaped) { regexStr += tokenRegex[token]; var match = new RegExp(regexStr).exec(date); if (match && (matched = true)) { ops[token !== "Y" ? "push" : "unshift"]({ fn: revFormat[token], val: match[++matchIndex], }); } } else if (!isBackSlash) regexStr += "."; ops.forEach(function (_a) { var fn = _a.fn, val = _a.val; return (parsedDate = fn(parsedDate, val, self.l10n) || parsedDate); }); } parsedDate = matched ? parsedDate : undefined; } } if (!(parsedDate instanceof Date)) { self.config.errorHandler(new Error("Invalid date provided: " + date_orig)); return undefined; } if (timeless === true) parsedDate.setHours(0, 0, 0, 0); return parsedDate; } function setupInputs() { self.input = self.config.wrap ? element.querySelector("[data-input]") : element; if (!self.input) { self.config.errorHandler(new Error("Invalid input element specified")); return; } self.input._type = self.input.type; self.input.type = "text"; self.input.classList.add("flatpickr-input"); self._input = self.input; if (self.config.altInput) { self.altInput = createElement(self.input.nodeName, self.input.className + " " + self.config.altInputClass); self._input = self.altInput; self.altInput.placeholder = self.input.placeholder; self.altInput.disabled = self.input.disabled; self.altInput.required = self.input.required; self.altInput.type = "text"; self.input.type = "hidden"; if (!self.config.static && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling); } if (!self.config.allowInput) self._input.setAttribute("readonly", "readonly"); self._positionElement = self.config.positionElement || self._input; } function setupMobile() { var inputType = self.config.enableTime ? self.config.noCalendar ? "time" : "datetime-local" : "date"; self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile"); self.mobileInput.step = self.input.getAttribute("step") || "any"; self.mobileInput.tabIndex = 1; self.mobileInput.type = inputType; self.mobileInput.disabled = self.input.disabled; self.mobileInput.placeholder = self.input.placeholder; self.mobileFormatStr = inputType === "datetime-local" ? "Y-m-d\\TH:i:S" : inputType === "date" ? "Y-m-d" : "H:i:S"; if (self.selectedDates.length) { self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr); } if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d"); if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d"); self.input.type = "hidden"; if (self.altInput !== undefined) self.altInput.type = "hidden"; try { if (self.input.parentNode) self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling); } catch (_a) { } bind(self.mobileInput, "change", function (e) { self.setDate(e.target.value, false, self.mobileFormatStr); triggerEvent("onChange"); triggerEvent("onClose"); }); } function toggle() { if (self.isOpen) return self.close(); self.open(); } function triggerEvent(event, data) { var hooks = self.config[event]; if (hooks !== undefined && hooks.length > 0) { for (var i = 0; hooks[i] && i < hooks.length; i++) hooks[i](self.selectedDates, self.input.value, self, data); } if (event === "onChange") { self.input.dispatchEvent(createEvent("change")); self.input.dispatchEvent(createEvent("input")); } } function createEvent(name) { var e = document.createEvent("Event"); e.initEvent(name, true, true); return e; } function isDateSelected(date) { for (var i = 0; i < self.selectedDates.length; i++) { if (compareDates(self.selectedDates[i], date) === 0) return "" + i; } return false; } function isDateInRange(date) { if (self.config.mode !== "range" || self.selectedDates.length < 2) return false; return (compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0); } function updateNavigationCurrentMonth() { if (self.config.noCalendar || self.isMobile || !self.monthNav) return; self.currentMonthElement.textContent = monthToStr(self.currentMonth, self.config.shorthandCurrentMonth, self.l10n) + " "; self.currentYearElement.value = self.currentYear.toString(); self._hidePrevMonthArrow = self.config.minDate !== undefined && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear()); self._hideNextMonthArrow = self.config.maxDate !== undefined && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear()); } function updateValue(triggerChange) { if (triggerChange === void 0) { triggerChange = true; } if (!self.selectedDates.length) return self.clear(triggerChange); if (self.mobileInput !== undefined && self.mobileFormatStr) { self.mobileInput.value = self.latestSelectedDateObj !== undefined ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : ""; } var joinChar = self.config.mode !== "range" ? self.config.conjunction : self.l10n.rangeSeparator; self.input.value = self.selectedDates .map(function (dObj) { return self.formatDate(dObj, self.config.dateFormat); }) .join(joinChar); if (self.altInput !== undefined) { self.altInput.value = self.selectedDates .map(function (dObj) { return self.formatDate(dObj, self.config.altFormat); }) .join(joinChar); } if (triggerChange !== false) triggerEvent("onValueUpdate"); } function onMonthNavScroll(e) { e.preventDefault(); var isYear = self.currentYearElement.parentNode && self.currentYearElement.parentNode.contains(e.target); if (e.target === self.currentMonthElement || isYear) { var delta = mouseDelta(e); if (isYear) { changeYear(self.currentYear + delta); e.target.value = self.currentYear.toString(); } else self.changeMonth(delta, true, false); } } function onMonthNavClick(e) { var isPrevMonth = self.prevMonthNav.contains(e.target); var isNextMonth = self.nextMonthNav.contains(e.target); if (isPrevMonth || isNextMonth) changeMonth(isPrevMonth ? -1 : 1); else if (e.target === self.currentYearElement) { e.preventDefault(); self.currentYearElement.select(); } else if (e.target.className === "arrowUp") self.changeYear(self.currentYear + 1); else if (e.target.className === "arrowDown") self.changeYear(self.currentYear - 1); } function timeWrapper(e) { e.preventDefault(); var isKeyDown = e.type === "keydown", input = e.target; if (self.amPM !== undefined && e.target === self.amPM) { self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])]; } var min = Number(input.min), max = Number(input.max), step = Number(input.step), curValue = parseInt(input.value, 10), delta = e.delta || (isKeyDown ? e.which === 38 ? 1 : -1 : Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY)) || 0); var newValue = curValue + step * delta; if (typeof input.value !== "undefined" && input.value.length === 2) { var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement; if (newValue < min) { newValue = max + newValue + int(!isHourElem) + (int(isHourElem) && int(!self.amPM)); if (isMinuteElem) incrementNumInput(undefined, -1, self.hourElement); } else if (newValue > max) { newValue = input === self.hourElement ? newValue - max - int(!self.amPM) : min; if (isMinuteElem) incrementNumInput(undefined, 1, self.hourElement); } if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) { self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])]; } input.value = pad(newValue); } } init(); return self; } function _flatpickr(nodeList, config) { var nodes = Array.prototype.slice.call(nodeList); var instances = []; for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; try { if (node.getAttribute("data-fp-omit") !== null) continue; if (node._flatpickr !== undefined) { node._flatpickr.destroy(); node._flatpickr = undefined; } node._flatpickr = FlatpickrInstance(node, config || {}); instances.push(node._flatpickr); } catch (e) { console.error(e); } } return instances.length === 1 ? instances[0] : instances; } if (typeof HTMLElement !== "undefined") { HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) { return _flatpickr(this, config); }; HTMLElement.prototype.flatpickr = function (config) { return _flatpickr([this], config); }; } var flatpickr; flatpickr = function (selector, config) { if (selector instanceof NodeList) return _flatpickr(selector, config); else if (typeof selector === "string") return _flatpickr(window.document.querySelectorAll(selector), config); return _flatpickr([selector], config); }; if (typeof window === "object") window.flatpickr = flatpickr; flatpickr.defaultConfig = defaults; flatpickr.l10ns = { en: __assign({}, english), default: __assign({}, english), }; flatpickr.localize = function (l10n) { flatpickr.l10ns.default = __assign({}, flatpickr.l10ns.default, l10n); }; flatpickr.setDefaults = function (config) { flatpickr.defaultConfig = __assign({}, flatpickr.defaultConfig, config); }; if (typeof jQuery !== "undefined") { jQuery.fn.flatpickr = function (config) { return _flatpickr(this, config); }; } Date.prototype.fp_incr = function (days) { return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days)); }; var flatpickr$1 = flatpickr; return flatpickr$1; }))); flatpickr.min.css 0000666 00000041506 15165577052 0010046 0 ustar 00 .flatpickr-calendar{background:transparent;overflow:hidden;max-height:0;opacity:0;visibility:hidden;text-align:center;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible;overflow:visible;max-height:640px}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px);}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.hasWeeks{width:auto}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.rightMost:after{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.flatpickr-prev-month,.flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px calc(3.57% - 1.5px);z-index:3;}.flatpickr-prev-month i,.flatpickr-next-month i{position:relative}.flatpickr-prev-month.flatpickr-prev-month,.flatpickr-next-month.flatpickr-prev-month{/* /*rtl:begin:ignore*/left:0;/* /*rtl:end:ignore*/}/* /*rtl:begin:ignore*/ /* /*rtl:end:ignore*/ .flatpickr-prev-month.flatpickr-next-month,.flatpickr-next-month.flatpickr-next-month{/* /*rtl:begin:ignore*/right:0;/* /*rtl:end:ignore*/}/* /*rtl:begin:ignore*/ /* /*rtl:end:ignore*/ .flatpickr-prev-month:hover,.flatpickr-next-month:hover{color:#959ea9;}.flatpickr-prev-month:hover svg,.flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-prev-month svg,.flatpickr-next-month svg{width:14px;}.flatpickr-prev-month svg path,.flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto;}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.05);-webkit-box-sizing:border-box;box-sizing:border-box;}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute;top:33%}.numInputWrapper span.arrowUp{top:0;border-bottom:0;}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6)}.numInputWrapper span.arrowDown{top:50%;}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6)}.numInputWrapper span svg{width:inherit;height:auto;}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05);}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);}.flatpickr-current-month.slideLeft{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);-webkit-animation:fpFadeOut 400ms ease,fpSlideLeft 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeOut 400ms ease,fpSlideLeft 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-current-month.slideLeftNew{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-animation:fpFadeIn 400ms ease,fpSlideLeftNew 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeIn 400ms ease,fpSlideLeftNew 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-current-month.slideRight{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-animation:fpFadeOut 400ms ease,fpSlideRight 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeOut 400ms ease,fpSlideRight 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-current-month.slideRightNew{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-animation:fpFadeIn 400ms ease,fpSlideRightNew 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeIn 400ms ease,fpSlideRightNew 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0;}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block;}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:default;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:initial;border:0;border-radius:0;vertical-align:initial;}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:307.875px;}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.flatpickr-calendar.animate .dayContainer.slideLeft{-webkit-animation:fpFadeOut 400ms cubic-bezier(.23,1,.32,1),fpSlideLeft 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeOut 400ms cubic-bezier(.23,1,.32,1),fpSlideLeft 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.animate .dayContainer.slideLeft,.flatpickr-calendar.animate .dayContainer.slideLeftNew{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.flatpickr-calendar.animate .dayContainer.slideLeftNew{-webkit-animation:fpFadeIn 400ms cubic-bezier(.23,1,.32,1),fpSlideLeft 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeIn 400ms cubic-bezier(.23,1,.32,1),fpSlideLeft 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.animate .dayContainer.slideRight{-webkit-animation:fpFadeOut 400ms cubic-bezier(.23,1,.32,1),fpSlideRight 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeOut 400ms cubic-bezier(.23,1,.32,1),fpSlideRight 400ms cubic-bezier(.23,1,.32,1);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.flatpickr-calendar.animate .dayContainer.slideRightNew{-webkit-animation:fpFadeIn 400ms cubic-bezier(.23,1,.32,1),fpSlideRightNew 400ms cubic-bezier(.23,1,.32,1);animation:fpFadeIn 400ms cubic-bezier(.23,1,.32,1),fpSlideRightNew 400ms cubic-bezier(.23,1,.32,1)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9;}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange,.flatpickr-day.startRange.startRange + .endRange,.flatpickr-day.endRange.startRange + .endRange{-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{pointer-events:none}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left;}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day{display:block;width:100%;max-width:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left;}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;cursor:pointer;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400;}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{background:#f0f0f0}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes fpSlideLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fpSlideLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes fpSlideLeftNew{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpSlideLeftNew{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes fpSlideRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fpSlideRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes fpSlideRightNew{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpSlideRightNew{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes fpFadeOut{from{opacity:1}to{opacity:0}}@keyframes fpFadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes fpFadeIn{from{opacity:0}to{opacity:1}}@keyframes fpFadeIn{from{opacity:0}to{opacity:1}} flatpickr.min.js 0000666 00000125100 15165577052 0007663 0 ustar 00 /* flatpickr v4.1.4,, @license MIT */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.flatpickr=t()}(this,function(){"use strict";function e(e,t,n){return!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}function t(e,t,n){void 0===n&&(n=!1);var a;return function(){var i=this,o=arguments;null!==a&&clearTimeout(a),a=window.setTimeout(function(){a=null,n||e.apply(i,o)},t),n&&!a&&e.apply(i,o)}}function n(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function a(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 i(e,t){return t(e)?e:e.parentNode?i(e.parentNode,t):void 0}function o(e){var t=a("div","numInputWrapper"),n=a("input","numInput "+e),i=a("span","arrowUp"),o=a("span","arrowDown");return n.type="text",n.pattern="\\d*",t.appendChild(n),t.appendChild(i),t.appendChild(o),t}function r(r,s){for(var u=Array.prototype.slice.call(r),p=[],w=0;w<u.length;w++){var M=u[w];try{if(null!==M.getAttribute("data-fp-omit"))continue;void 0!==M._flatpickr&&(M._flatpickr.destroy(),M._flatpickr=void 0),M._flatpickr=function(r,s){function u(e){return e.bind(X)}function p(e){if(X.config.noCalendar&&0===X.selectedDates.length){var t=X.config.minDate;X.setDate((new Date).setHours(t?t.getHours():X.config.defaultHour,t?t.getMinutes():X.config.defaultMinute,t&&X.config.enableSeconds?t.getSeconds():X.config.defaultSeconds),!1),w(),Q()}!function(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==X.amPM&&e.target===X.amPM&&(X.amPM.textContent=X.l10n.amPM[m(X.amPM.textContent===X.l10n.amPM[0])]);var a=Number(n.min),i=Number(n.max),o=Number(n.step),r=parseInt(n.value,10),l=e.delta||(t?38===e.which?1:-1:Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY))||0),c=r+o*l;if(void 0!==n.value&&2===n.value.length){var d=n===X.hourElement,s=n===X.minuteElement;c<a?(c=i+c+m(!d)+(m(d)&&m(!X.amPM)),s&&S(void 0,-1,X.hourElement)):c>i&&(c=n===X.hourElement?c-i-m(!X.amPM):a,s&&S(void 0,1,X.hourElement)),X.amPM&&d&&(1===o?c+r===23:Math.abs(c-r)>o)&&(X.amPM.textContent=X.l10n.amPM[m(X.amPM.textContent===X.l10n.amPM[0])]),n.value=f(c)}}(e),0!==X.selectedDates.length&&(!X.minDateHasTime||"input"!==e.type||e.target.value.length>=2?(w(),Q()):setTimeout(function(){w(),Q()},1e3))}function w(){if(void 0!==X.hourElement&&void 0!==X.minuteElement){var t=(parseInt(X.hourElement.value.slice(-2),10)||0)%24,n=(parseInt(X.minuteElement.value,10)||0)%60,a=void 0!==X.secondElement?(parseInt(X.secondElement.value,10)||0)%60:0;void 0!==X.amPM&&(t=function(e,t){return e%12+12*m(t===X.l10n.amPM[1])}(t,X.amPM.textContent)),X.config.minDate&&X.minDateHasTime&&X.latestSelectedDateObj&&0===e(X.latestSelectedDateObj,X.config.minDate)&&(t=Math.max(t,X.config.minDate.getHours()))===X.config.minDate.getHours()&&(n=Math.max(n,X.config.minDate.getMinutes())),X.config.maxDate&&X.maxDateHasTime&&X.latestSelectedDateObj&&0===e(X.latestSelectedDateObj,X.config.maxDate)&&(t=Math.min(t,X.config.maxDate.getHours()))===X.config.maxDate.getHours()&&(n=Math.min(n,X.config.maxDate.getMinutes())),b(t,n,a)}}function M(e){var t=e||X.latestSelectedDateObj;t&&b(t.getHours(),t.getMinutes(),t.getSeconds())}function b(e,t,n){void 0!==X.latestSelectedDateObj&&X.latestSelectedDateObj.setHours(e%24,t,n||0,0),X.hourElement&&X.minuteElement&&!X.isMobile&&(X.hourElement.value=f(X.config.time_24hr?e:(12+e)%12+12*m(e%12==0)),X.minuteElement.value=f(t),void 0!==X.amPM&&(X.amPM.textContent=X.l10n.amPM[m(e>=12)]),void 0!==X.secondElement&&(X.secondElement.value=f(n)))}function y(e,t,n){return t instanceof Array?t.forEach(function(t){return y(e,t,n)}):e instanceof Array?e.forEach(function(e){return y(e,t,n)}):(e.addEventListener(t,n),void X._handlers.push({element:e,event:t,handler:n}))}function x(e){return function(t){1===t.which&&e(t)}}function E(){z("onChange")}function N(){X._animationLoop.forEach(function(e){return e()}),X._animationLoop=[]}function k(e){var t=void 0!==e?q(e):X.latestSelectedDateObj||(X.config.minDate&&X.config.minDate>X.now?X.config.minDate:X.config.maxDate&&X.config.maxDate<X.now?X.config.maxDate:X.now);try{void 0!==t&&(X.currentYear=t.getFullYear(),X.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,X.config.errorHandler(e)}X.redraw()}function S(e,t,n){var a=e&&e.target,i=n||a&&a.parentNode&&a.parentNode.firstChild,o=G("increment");o.delta=t,i&&i.dispatchEvent(o)}function T(t,i,o,r){var l=j(i,!0),c=a("span","flatpickr-day "+t,i.getDate().toString());return c.dateObj=i,c.$i=r,c.setAttribute("aria-label",X.formatDate(i,X.config.ariaDateFormat)),0===e(i,X.now)&&(X.todayDateElem=c,c.classList.add("today")),l?(c.tabIndex=-1,V(i)&&(c.classList.add("selected"),X.selectedDateElem=c,"range"===X.config.mode&&(n(c,"startRange",X.selectedDates[0]&&0===e(i,X.selectedDates[0])),n(c,"endRange",X.selectedDates[1]&&0===e(i,X.selectedDates[1]))))):(c.classList.add("disabled"),X.selectedDates[0]&&X.minRangeDate&&i>X.minRangeDate&&i<X.selectedDates[0]?X.minRangeDate=i:X.selectedDates[0]&&X.maxRangeDate&&i<X.maxRangeDate&&i>X.selectedDates[0]&&(X.maxRangeDate=i)),"range"===X.config.mode&&(function(t){return!("range"!==X.config.mode||X.selectedDates.length<2)&&e(t,X.selectedDates[0])>=0&&e(t,X.selectedDates[1])<=0}(i)&&!V(i)&&c.classList.add("inRange"),1===X.selectedDates.length&&void 0!==X.minRangeDate&&void 0!==X.maxRangeDate&&(i<X.minRangeDate||i>X.maxRangeDate)&&c.classList.add("notAllowed")),X.weekNumbers&&"prevMonthDay"!==t&&o%7==1&&X.weekNumbers.insertAdjacentHTML("beforeend","<span class='disabled flatpickr-day'>"+X.config.getWeek(i)+"</span>"),z("onDayCreate",c),c}function I(e,t){var n=e+t||0,a=void 0!==e?X.days.childNodes[n]:X.selectedDateElem||X.todayDateElem||X.days.childNodes[0],i=function(){(a=a||X.days.childNodes[n]).focus(),"range"===X.config.mode&&R(a)};if(void 0===a&&0!==t)return t>0?(X.changeMonth(1,!0,void 0,!0),n%=42):t<0&&(X.changeMonth(-1,!0,void 0,!0),n+=42),Y(i);i()}function Y(e){!0===X.config.animate?X._animationLoop.push(e):e()}function _(e){if(void 0!==X.daysContainer){var t=(new Date(X.currentYear,X.currentMonth,1).getDay()-X.l10n.firstDayOfWeek+7)%7,n="range"===X.config.mode,i=X.utils.getDaysInMonth((X.currentMonth-1+12)%12),o=X.utils.getDaysInMonth(),r=window.document.createDocumentFragment(),l=i+1-t,c=0;for(X.weekNumbers&&X.weekNumbers.firstChild&&(X.weekNumbers.textContent=""),n&&(X.minRangeDate=new Date(X.currentYear,X.currentMonth-1,l),X.maxRangeDate=new Date(X.currentYear,X.currentMonth+1,(42-t)%o));l<=i;l++,c++)r.appendChild(T("prevMonthDay",new Date(X.currentYear,X.currentMonth-1,l),l,c));for(l=1;l<=o;l++,c++)r.appendChild(T("",new Date(X.currentYear,X.currentMonth,l),l,c));for(var d=o+1;d<=42-t;d++,c++)r.appendChild(T("nextMonthDay",new Date(X.currentYear,X.currentMonth+1,d%o),d,c));n&&1===X.selectedDates.length&&r.childNodes[0]?(X._hidePrevMonthArrow=X._hidePrevMonthArrow||!!X.minRangeDate&&X.minRangeDate>r.childNodes[0].dateObj,X._hideNextMonthArrow=X._hideNextMonthArrow||!!X.maxRangeDate&&X.maxRangeDate<new Date(X.currentYear,X.currentMonth+1,1)):Z();var s=a("div","dayContainer");if(s.appendChild(r),X.config.animate&&void 0!==e)for(;X.daysContainer.childNodes.length>1;)X.daysContainer.removeChild(X.daysContainer.firstChild);else!function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}(X.daysContainer);e&&e>=0?X.daysContainer.appendChild(s):X.daysContainer.insertBefore(s,X.daysContainer.firstChild),X.days=X.daysContainer.childNodes[0]}}function O(){X.weekdayContainer||(X.weekdayContainer=a("div","flatpickr-weekdays"));var e=X.l10n.firstDayOfWeek,t=X.l10n.weekdays.shorthand.slice();return e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e))),X.weekdayContainer.innerHTML="\n <span class=flatpickr-weekday>\n "+t.join("</span><span class=flatpickr-weekday>")+"\n </span>\n ",X.weekdayContainer}function P(e,t,n,a){void 0===t&&(t=!0),void 0===n&&(n=X.config.animate),void 0===a&&(a=!1);var i=t?e:e-X.currentMonth;if(!(i<0&&X._hidePrevMonthArrow||i>0&&X._hideNextMonthArrow)){if(X.currentMonth+=i,(X.currentMonth<0||X.currentMonth>11)&&(X.currentYear+=X.currentMonth>11?1:-1,X.currentMonth=(X.currentMonth+12)%12,z("onYearChange")),_(n?i:void 0),!n)return z("onMonthChange"),Z();var o=X.navigationCurrentMonth;if(i<0)for(;o.nextSibling&&/curr/.test(o.nextSibling.className);)X.monthNav.removeChild(o.nextSibling);else if(i>0)for(;o.previousSibling&&/curr/.test(o.previousSibling.className);)X.monthNav.removeChild(o.previousSibling);X.oldCurMonth=X.navigationCurrentMonth,X.navigationCurrentMonth=X.monthNav.insertBefore(X.oldCurMonth.cloneNode(!0),i>0?X.oldCurMonth.nextSibling:X.oldCurMonth);var r=X.daysContainer;if(r.firstChild&&r.lastChild&&(i>0?(r.firstChild.classList.add("slideLeft"),r.lastChild.classList.add("slideLeftNew"),X.oldCurMonth.classList.add("slideLeft"),X.navigationCurrentMonth.classList.add("slideLeftNew")):i<0&&(r.firstChild.classList.add("slideRightNew"),r.lastChild.classList.add("slideRight"),X.oldCurMonth.classList.add("slideRight"),X.navigationCurrentMonth.classList.add("slideRightNew"))),X.currentMonthElement=X.navigationCurrentMonth.firstChild,X.currentYearElement=X.navigationCurrentMonth.lastChild.childNodes[0],Z(),X.oldCurMonth.firstChild&&(X.oldCurMonth.firstChild.textContent=c(X.currentMonth-i,X.config.shorthandCurrentMonth,X.l10n)),Y(function(){return z("onMonthChange")}),a&&document.activeElement&&document.activeElement.$i){var l=document.activeElement.$i;Y(function(){I(l,0)})}}}function F(e){return!(!X.config.appendTo||!X.config.appendTo.contains(e))||X.calendarContainer.contains(e)}function L(e){if(X.isOpen&&!X.config.inline){var t=F(e.target),n=e.target===X.input||e.target===X.altInput||X.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(X.input)||~e.path.indexOf(X.altInput));("blur"===e.type?n&&e.relatedTarget&&!F(e.relatedTarget):!n&&!t)&&-1===X.config.ignoredFocusElements.indexOf(e.target)&&(X.close(),"range"===X.config.mode&&1===X.selectedDates.length&&(X.clear(!1),X.redraw()))}}function A(e){if(!(!e||X.currentYearElement.min&&e<parseInt(X.currentYearElement.min)||X.currentYearElement.max&&e>parseInt(X.currentYearElement.max))){var t=e,n=X.currentYear!==t;X.currentYear=t||X.currentYear,X.config.maxDate&&X.currentYear===X.config.maxDate.getFullYear()?X.currentMonth=Math.min(X.config.maxDate.getMonth(),X.currentMonth):X.config.minDate&&X.currentYear===X.config.minDate.getFullYear()&&(X.currentMonth=Math.max(X.config.minDate.getMonth(),X.currentMonth)),n&&(X.redraw(),z("onYearChange"))}}function j(t,n){void 0===n&&(n=!0);var a=X.parseDate(t,void 0,n);if(X.config.minDate&&a&&e(a,X.config.minDate,void 0!==n?n:!X.minDateHasTime)<0||X.config.maxDate&&a&&e(a,X.config.maxDate,void 0!==n?n:!X.maxDateHasTime)>0)return!1;if(!X.config.enable.length&&!X.config.disable.length)return!0;if(void 0===a)return!1;for(var i=X.config.enable.length>0,o=i?X.config.enable:X.config.disable,r=0,l=void 0;r<o.length;r++){if("function"==typeof(l=o[r])&&l(a))return i;if(l instanceof Date&&void 0!==a&&l.getTime()===a.getTime())return i;if("string"==typeof l&&void 0!==a){var c=X.parseDate(l,void 0,!0);return c&&c.getTime()===a.getTime()?i:!i}if("object"==typeof l&&void 0!==a&&l.from&&l.to&&a.getTime()>=l.from.getTime()&&a.getTime()<=l.to.getTime())return i}return!i}function H(e){var t=e.target===X._input,n=F(e.target),a=X.config.allowInput,i=X.isOpen&&(!a||!t),o=X.config.inline&&t&&!a;if("Enter"===e.key&&t){if(a)return X.setDate(X._input.value,!0,e.target===X.altInput?X.config.altFormat:X.config.dateFormat),e.target.blur();X.open()}else if(n||i||o){var r=!!X.timeContainer&&X.timeContainer.contains(e.target);switch(e.key){case"Enter":r?Q():K(e);break;case"Escape":e.preventDefault(),X.close();break;case"Backspace":case"Delete":t&&!X.config.allowInput&&X.clear();break;case"ArrowLeft":case"ArrowRight":if(r)X.hourElement&&X.hourElement.focus();else if(e.preventDefault(),X.daysContainer){var l="ArrowRight"===e.key?1:-1;e.ctrlKey?P(l,!0,void 0,!0):I(e.target.$i,l)}break;case"ArrowUp":case"ArrowDown":e.preventDefault();var c="ArrowDown"===e.key?1:-1;X.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(A(X.currentYear-c),I(e.target.$i,0)):r||I(e.target.$i,7*c):X.config.enableTime&&(!r&&X.hourElement&&X.hourElement.focus(),p(e),X._debouncedChange());break;case"Tab":e.target===X.hourElement?(e.preventDefault(),X.minuteElement.select()):e.target===X.minuteElement&&(X.secondElement||X.amPM)?(e.preventDefault(),void 0!==X.secondElement?X.secondElement.focus():void 0!==X.amPM&&X.amPM.focus()):e.target===X.secondElement&&X.amPM&&(e.preventDefault(),X.amPM.focus());break;case X.l10n.amPM[0].charAt(0):void 0!==X.amPM&&e.target===X.amPM&&(X.amPM.textContent=X.l10n.amPM[0],w(),Q());break;case X.l10n.amPM[1].charAt(0):void 0!==X.amPM&&e.target===X.amPM&&(X.amPM.textContent=X.l10n.amPM[1],w(),Q())}z("onKeyDown",e)}}function R(e){if(1===X.selectedDates.length&&e.classList.contains("flatpickr-day")&&void 0!==X.minRangeDate&&void 0!==X.maxRangeDate){for(var t=e.dateObj,n=X.parseDate(X.selectedDates[0],void 0,!0),a=Math.min(t.getTime(),X.selectedDates[0].getTime()),i=Math.max(t.getTime(),X.selectedDates[0].getTime()),o=!1,r=a;r<i;r+=d.DAY)if(!j(new Date(r))){o=!0;break}for(var l=0,c=X.days.childNodes[l].dateObj;l<42;l++,c=X.days.childNodes[l]&&X.days.childNodes[l].dateObj)!function(r,l){var c=l.getTime(),d=c<X.minRangeDate.getTime()||c>X.maxRangeDate.getTime(),s=X.days.childNodes[r];if(d)return s.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){s.classList.remove(e)}),"continue";if(o&&!d)return"continue";["startRange","inRange","endRange","notAllowed"].forEach(function(e){s.classList.remove(e)});var u=Math.max(X.minRangeDate.getTime(),a),f=Math.min(X.maxRangeDate.getTime(),i);e.classList.add(t<X.selectedDates[0]?"startRange":"endRange"),n<t&&c===n.getTime()?s.classList.add("startRange"):n>t&&c===n.getTime()&&s.classList.add("endRange"),c>=u&&c<=f&&s.classList.add("inRange")}(l,c)}}function W(e){return function(t){var n=X.config["_"+e+"Date"]=X.parseDate(t),a=X.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(X["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),X.selectedDates&&(X.selectedDates=X.selectedDates.filter(function(e){return j(e)}),X.selectedDates.length||"min"!==e||M(n),Q()),X.daysContainer&&(J(),void 0!==n?X.currentYearElement[e]=n.getFullYear().toString():X.currentYearElement.removeAttribute(e),X.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function B(e){if(void 0===e&&(e=X._positionElement),void 0!==X.calendarContainer){var t=X.calendarContainer.offsetHeight,a=X.calendarContainer.offsetWidth,i=X.config.position,o=e.getBoundingClientRect(),r=window.innerHeight-o.bottom,l="above"===i||"below"!==i&&r<t&&o.top>t,c=window.pageYOffset+o.top+(l?-t-2:e.offsetHeight+2);if(n(X.calendarContainer,"arrowTop",!l),n(X.calendarContainer,"arrowBottom",l),!X.config.inline){var d=window.pageXOffset+o.left,s=window.document.body.offsetWidth-o.right,u=d+a>window.document.body.offsetWidth;n(X.calendarContainer,"rightMost",u),X.config.static||(X.calendarContainer.style.top=c+"px",u?(X.calendarContainer.style.left="auto",X.calendarContainer.style.right=s+"px"):(X.calendarContainer.style.left=d+"px",X.calendarContainer.style.right="auto"))}}}function J(){X.config.noCalendar||X.isMobile||(O(),Z(),_())}function K(t){t.preventDefault(),t.stopPropagation();var n=i(t.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==n){var a=n,o=X.latestSelectedDateObj=new Date(a.dateObj.getTime()),r=o.getMonth()!==X.currentMonth&&"range"!==X.config.mode;if(X.selectedDateElem=a,"single"===X.config.mode)X.selectedDates=[o];else if("multiple"===X.config.mode){var l=V(o);l?X.selectedDates.splice(parseInt(l),1):X.selectedDates.push(o)}else"range"===X.config.mode&&(2===X.selectedDates.length&&X.clear(),X.selectedDates.push(o),0!==e(o,X.selectedDates[0],!0)&&X.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(w(),r){var c=X.currentYear!==o.getFullYear();X.currentYear=o.getFullYear(),X.currentMonth=o.getMonth(),c&&z("onYearChange"),z("onMonthChange")}if(_(),X.config.minDate&&X.minDateHasTime&&X.config.enableTime&&0===e(o,X.config.minDate)&&M(X.config.minDate),Q(),X.config.enableTime&&setTimeout(function(){return X.showTimeInput=!0},50),"range"===X.config.mode&&(1===X.selectedDates.length?(R(a),X._hidePrevMonthArrow=X._hidePrevMonthArrow||void 0!==X.minRangeDate&&X.minRangeDate>X.days.childNodes[0].dateObj,X._hideNextMonthArrow=X._hideNextMonthArrow||void 0!==X.maxRangeDate&&X.maxRangeDate<new Date(X.currentYear,X.currentMonth+1,1)):Z()),z("onChange"),r?Y(function(){return X.selectedDateElem&&X.selectedDateElem.focus()}):I(a.$i,0),void 0!==X.hourElement&&setTimeout(function(){return void 0!==X.hourElement&&X.hourElement.select()},451),X.config.closeOnSelect){var d="single"===X.config.mode&&!X.config.enableTime,s="range"===X.config.mode&&2===X.selectedDates.length&&!X.config.enableTime;(d||s)&&X.close()}}}function U(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return X.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[X.parseDate(e,t)];else if("string"==typeof e)switch(X.config.mode){case"single":n=[X.parseDate(e,t)];break;case"multiple":n=e.split(X.config.conjunction).map(function(e){return X.parseDate(e,t)});break;case"range":n=e.split(X.l10n.rangeSeparator).map(function(e){return X.parseDate(e,t)})}else X.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));X.selectedDates=n.filter(function(e){return e instanceof Date&&j(e,!1)}),X.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function $(e){return e.map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?X.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:X.parseDate(e.from,void 0),to:X.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function q(e,t,n){if(0===e||e){var a,i=e;if(e instanceof Date)a=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)a=new Date(e);else if("string"==typeof e){var o=t||(X.config||C.defaultConfig).dateFormat,r=String(e).trim();if("today"===r)a=new Date,n=!0;else if(/Z$/.test(r)||/GMT$/.test(r))a=new Date(e);else if(X.config&&X.config.parseDate)a=X.config.parseDate(e,o);else{a=X.config&&X.config.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var l=void 0,c=[],d=0,s=0,u="";d<o.length;d++){var f=o[d],m="\\"===f,g="\\"===o[d-1]||m;if(v[f]&&!g){u+=v[f];var p=new RegExp(u).exec(e);p&&(l=!0)&&c["Y"!==f?"push":"unshift"]({fn:h[f],val:p[++s]})}else m||(u+=".");c.forEach(function(e){var t=e.fn,n=e.val;return a=t(a,n,X.l10n)||a})}a=l?a:void 0}}if(a instanceof Date)return!0===n&&a.setHours(0,0,0,0),a;X.config.errorHandler(new Error("Invalid date provided: "+i))}}function z(e,t){var n=X.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](X.selectedDates,X.input.value,X,t);"onChange"===e&&(X.input.dispatchEvent(G("change")),X.input.dispatchEvent(G("input")))}function G(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function V(t){for(var n=0;n<X.selectedDates.length;n++)if(0===e(X.selectedDates[n],t))return""+n;return!1}function Z(){X.config.noCalendar||X.isMobile||!X.monthNav||(X.currentMonthElement.textContent=c(X.currentMonth,X.config.shorthandCurrentMonth,X.l10n)+" ",X.currentYearElement.value=X.currentYear.toString(),X._hidePrevMonthArrow=void 0!==X.config.minDate&&(X.currentYear===X.config.minDate.getFullYear()?X.currentMonth<=X.config.minDate.getMonth():X.currentYear<X.config.minDate.getFullYear()),X._hideNextMonthArrow=void 0!==X.config.maxDate&&(X.currentYear===X.config.maxDate.getFullYear()?X.currentMonth+1>X.config.maxDate.getMonth():X.currentYear>X.config.maxDate.getFullYear()))}function Q(e){if(void 0===e&&(e=!0),!X.selectedDates.length)return X.clear(e);void 0!==X.mobileInput&&X.mobileFormatStr&&(X.mobileInput.value=void 0!==X.latestSelectedDateObj?X.formatDate(X.latestSelectedDateObj,X.mobileFormatStr):"");var t="range"!==X.config.mode?X.config.conjunction:X.l10n.rangeSeparator;X.input.value=X.selectedDates.map(function(e){return X.formatDate(e,X.config.dateFormat)}).join(t),void 0!==X.altInput&&(X.altInput.value=X.selectedDates.map(function(e){return X.formatDate(e,X.config.altFormat)}).join(t)),!1!==e&&z("onValueUpdate")}var X={};return X.parseDate=q,X.formatDate=function(e,t){return void 0!==X.config&&void 0!==X.config.formatDate?X.config.formatDate(e,t):t.split("").map(function(t,n,a){return D[t]&&"\\"!==a[n-1]?D[t](e,X.l10n,X.config):"\\"!==t?t:""}).join("")},X._animationLoop=[],X._handlers=[],X._bind=y,X._setHoursFromDate=M,X.changeMonth=P,X.changeYear=A,X.clear=function(e){void 0===e&&(e=!0),X.input.value="",X.altInput&&(X.altInput.value=""),X.mobileInput&&(X.mobileInput.value=""),X.selectedDates=[],X.latestSelectedDateObj=void 0,X.showTimeInput=!1,X.redraw(),e&&z("onChange")},X.close=function(){X.isOpen=!1,X.isMobile||(X.calendarContainer.classList.remove("open"),X._input.classList.remove("active")),z("onClose")},X._createElement=a,X.destroy=function(){void 0!==X.config&&z("onDestroy");for(var e=X._handlers.length;e--;){var t=X._handlers[e];t.element.removeEventListener(t.event,t.handler)}X._handlers=[],X.mobileInput?(X.mobileInput.parentNode&&X.mobileInput.parentNode.removeChild(X.mobileInput),X.mobileInput=void 0):X.calendarContainer&&X.calendarContainer.parentNode&&X.calendarContainer.parentNode.removeChild(X.calendarContainer),X.altInput&&(X.input.type="text",X.altInput.parentNode&&X.altInput.parentNode.removeChild(X.altInput),delete X.altInput),X.input&&(X.input.type=X.input._type,X.input.classList.remove("flatpickr-input"),X.input.removeAttribute("readonly"),X.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete X[e]}catch(e){}})},X.isEnabled=j,X.jumpToDate=k,X.open=function(e,t){if(void 0===t&&(t=X._input),X.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),setTimeout(function(){void 0!==X.mobileInput&&X.mobileInput.click()},0),void z("onOpen");if(!X._input.disabled&&!X.config.inline){var n=X.isOpen;X.isOpen=!0,B(t),X.calendarContainer.classList.add("open"),X._input.classList.add("active"),!n&&z("onOpen")}},X.redraw=J,X.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(X.config,e):X.config[e]=t,X.redraw(),k()},X.setDate=function(e,t,n){if(void 0===t&&(t=!1),0!==e&&!e)return X.clear(t);U(e,n),X.showTimeInput=X.selectedDates.length>0,X.latestSelectedDateObj=X.selectedDates[0],X.redraw(),k(),M(),Q(t),t&&z("onChange")},X.toggle=function(){if(X.isOpen)return X.close();X.open()},function(){X.element=X.input=r,X.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange"];X.config=l({},C.defaultConfig);var n=l({},s,JSON.parse(JSON.stringify(r.dataset||{}))),a={};for(Object.defineProperty(X.config,"enable",{get:function(){return X.config._enable||[]},set:function(e){X.config._enable=$(e)}}),Object.defineProperty(X.config,"disable",{get:function(){return X.config._disable||[]},set:function(e){X.config._disable=$(e)}}),!n.dateFormat&&n.enableTime&&(a.dateFormat=n.noCalendar?"H:i"+(n.enableSeconds?":S":""):C.defaultConfig.dateFormat+" H:i"+(n.enableSeconds?":S":"")),n.altInput&&n.enableTime&&!n.altFormat&&(a.altFormat=n.noCalendar?"h:i"+(n.enableSeconds?":S K":" K"):C.defaultConfig.altFormat+" h:i"+(n.enableSeconds?":S":"")+" K"),Object.defineProperty(X.config,"minDate",{get:function(){return X.config._minDate},set:W("min")}),Object.defineProperty(X.config,"maxDate",{get:function(){return X.config._maxDate},set:W("max")}),Object.assign(X.config,a,n),i=0;i<e.length;i++)X.config[e[i]]=!0===X.config[e[i]]||"true"===X.config[e[i]];for(i=t.length;i--;)void 0!==X.config[t[i]]&&(X.config[t[i]]=g(X.config[t[i]]||[]).map(u));for(var i=0;i<X.config.plugins.length;i++){var o=X.config.plugins[i](X)||{};for(var c in o)~t.indexOf(c)?X.config[c]=g(o[c]).map(u).concat(X.config[c]):void 0===n[c]&&(X.config[c]=o[c])}X.isMobile=!X.config.disableMobile&&!X.config.inline&&"single"===X.config.mode&&!X.config.disable.length&&!X.config.enable.length&&!X.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),z("onParseConfig")}(),"object"!=typeof X.config.locale&&void 0===C.l10ns[X.config.locale]&&X.config.errorHandler(new Error("flatpickr: invalid locale "+X.config.locale)),X.l10n=l({},C.l10ns.default,"object"==typeof X.config.locale?X.config.locale:"default"!==X.config.locale?C.l10ns[X.config.locale]:void 0),v.K="("+X.l10n.amPM[0]+"|"+X.l10n.amPM[1]+"|"+X.l10n.amPM[0].toLowerCase()+"|"+X.l10n.amPM[1].toLowerCase()+")",X.input=X.config.wrap?r.querySelector("[data-input]"):r,X.input?(X.input._type=X.input.type,X.input.type="text",X.input.classList.add("flatpickr-input"),X._input=X.input,X.config.altInput&&(X.altInput=a(X.input.nodeName,X.input.className+" "+X.config.altInputClass),X._input=X.altInput,X.altInput.placeholder=X.input.placeholder,X.altInput.disabled=X.input.disabled,X.altInput.required=X.input.required,X.altInput.type="text",X.input.type="hidden",!X.config.static&&X.input.parentNode&&X.input.parentNode.insertBefore(X.altInput,X.input.nextSibling)),X.config.allowInput||X._input.setAttribute("readonly","readonly"),X._positionElement=X.config.positionElement||X._input):X.config.errorHandler(new Error("Invalid input element specified")),function(){X.selectedDates=[],X.now=new Date;var e=X.config.defaultDate||X.input.value;e&&U(e,X.config.dateFormat);var t=X.selectedDates.length?X.selectedDates[0]:X.config.minDate&&X.config.minDate.getTime()>X.now.getTime()?X.config.minDate:X.config.maxDate&&X.config.maxDate.getTime()<X.now.getTime()?X.config.maxDate:X.now;X.currentYear=t.getFullYear(),X.currentMonth=t.getMonth(),X.selectedDates.length&&(X.latestSelectedDateObj=X.selectedDates[0]),X.minDateHasTime=!!X.config.minDate&&(X.config.minDate.getHours()>0||X.config.minDate.getMinutes()>0||X.config.minDate.getSeconds()>0),X.maxDateHasTime=!!X.config.maxDate&&(X.config.maxDate.getHours()>0||X.config.maxDate.getMinutes()>0||X.config.maxDate.getSeconds()>0),Object.defineProperty(X,"showTimeInput",{get:function(){return X._showTimeInput},set:function(e){X._showTimeInput=e,X.calendarContainer&&n(X.calendarContainer,"showTimeInput",e),B()}})}(),X.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=X.currentMonth),void 0===t&&(t=X.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:X.l10n.daysInMonth[e]}},X.isMobile||function(){var e=window.document.createDocumentFragment();if(X.calendarContainer=a("div","flatpickr-calendar"),X.calendarContainer.tabIndex=-1,!X.config.noCalendar){if(e.appendChild(function(){var e=window.document.createDocumentFragment();X.monthNav=a("div","flatpickr-month"),X.prevMonthNav=a("span","flatpickr-prev-month"),X.prevMonthNav.innerHTML=X.config.prevArrow,X.currentMonthElement=a("span","cur-month"),X.currentMonthElement.title=X.l10n.scrollTitle;var t=o("cur-year");return X.currentYearElement=t.childNodes[0],X.currentYearElement.title=X.l10n.scrollTitle,X.config.minDate&&(X.currentYearElement.min=X.config.minDate.getFullYear().toString()),X.config.maxDate&&(X.currentYearElement.max=X.config.maxDate.getFullYear().toString(),X.currentYearElement.disabled=!!X.config.minDate&&X.config.minDate.getFullYear()===X.config.maxDate.getFullYear()),X.nextMonthNav=a("span","flatpickr-next-month"),X.nextMonthNav.innerHTML=X.config.nextArrow,X.navigationCurrentMonth=a("div","flatpickr-current-month"),X.navigationCurrentMonth.appendChild(X.currentMonthElement),X.navigationCurrentMonth.appendChild(t),e.appendChild(X.prevMonthNav),e.appendChild(X.navigationCurrentMonth),e.appendChild(X.nextMonthNav),X.monthNav.appendChild(e),Object.defineProperty(X,"_hidePrevMonthArrow",{get:function(){return X.__hidePrevMonthArrow},set:function(e){X.__hidePrevMonthArrow!==e&&(X.prevMonthNav.style.display=e?"none":"block"),X.__hidePrevMonthArrow=e}}),Object.defineProperty(X,"_hideNextMonthArrow",{get:function(){return X.__hideNextMonthArrow},set:function(e){X.__hideNextMonthArrow!==e&&(X.nextMonthNav.style.display=e?"none":"block"),X.__hideNextMonthArrow=e}}),Z(),X.monthNav}()),X.innerContainer=a("div","flatpickr-innerContainer"),X.config.weekNumbers){var t=function(){X.calendarContainer.classList.add("hasWeeks");var e=a("div","flatpickr-weekwrapper");e.appendChild(a("span","flatpickr-weekday",X.l10n.weekAbbreviation));var t=a("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),i=t.weekWrapper,r=t.weekNumbers;X.innerContainer.appendChild(i),X.weekNumbers=r,X.weekWrapper=i}X.rContainer=a("div","flatpickr-rContainer"),X.rContainer.appendChild(O()),X.daysContainer||(X.daysContainer=a("div","flatpickr-days"),X.daysContainer.tabIndex=-1),_(),X.rContainer.appendChild(X.daysContainer),X.innerContainer.appendChild(X.rContainer),e.appendChild(X.innerContainer)}X.config.enableTime&&e.appendChild(function(){X.calendarContainer.classList.add("hasTime"),X.config.noCalendar&&X.calendarContainer.classList.add("noCalendar"),X.timeContainer=a("div","flatpickr-time"),X.timeContainer.tabIndex=-1;var e=a("span","flatpickr-time-separator",":"),t=o("flatpickr-hour");X.hourElement=t.childNodes[0];var n=o("flatpickr-minute");if(X.minuteElement=n.childNodes[0],X.hourElement.tabIndex=X.minuteElement.tabIndex=-1,X.hourElement.value=f(X.latestSelectedDateObj?X.latestSelectedDateObj.getHours():X.config.time_24hr?X.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(X.config.defaultHour)),X.minuteElement.value=f(X.latestSelectedDateObj?X.latestSelectedDateObj.getMinutes():X.config.defaultMinute),X.hourElement.step=X.config.hourIncrement.toString(),X.minuteElement.step=X.config.minuteIncrement.toString(),X.hourElement.min=X.config.time_24hr?"0":"1",X.hourElement.max=X.config.time_24hr?"23":"12",X.minuteElement.min="0",X.minuteElement.max="59",X.hourElement.title=X.minuteElement.title=X.l10n.scrollTitle,X.timeContainer.appendChild(t),X.timeContainer.appendChild(e),X.timeContainer.appendChild(n),X.config.time_24hr&&X.timeContainer.classList.add("time24hr"),X.config.enableSeconds){X.timeContainer.classList.add("hasSeconds");var i=o("flatpickr-second");X.secondElement=i.childNodes[0],X.secondElement.value=f(X.latestSelectedDateObj?X.latestSelectedDateObj.getSeconds():X.config.defaultSeconds),X.secondElement.step=X.minuteElement.step,X.secondElement.min=X.minuteElement.min,X.secondElement.max=X.minuteElement.max,X.timeContainer.appendChild(a("span","flatpickr-time-separator",":")),X.timeContainer.appendChild(i)}return X.config.time_24hr||(X.amPM=a("span","flatpickr-am-pm",X.l10n.amPM[m((X.latestSelectedDateObj?X.hourElement.value:X.config.defaultHour)>11)]),X.amPM.title=X.l10n.toggleTitle,X.amPM.tabIndex=-1,X.timeContainer.appendChild(X.amPM)),X.timeContainer}()),n(X.calendarContainer,"rangeMode","range"===X.config.mode),n(X.calendarContainer,"animate",X.config.animate),X.calendarContainer.appendChild(e);var l=void 0!==X.config.appendTo&&X.config.appendTo.nodeType;if((X.config.inline||X.config.static)&&(X.calendarContainer.classList.add(X.config.inline?"inline":"static"),X.config.inline&&(!l&&X.element.parentNode?X.element.parentNode.insertBefore(X.calendarContainer,X._input.nextSibling):void 0!==X.config.appendTo&&X.config.appendTo.appendChild(X.calendarContainer)),X.config.static)){var c=a("div","flatpickr-wrapper");X.element.parentNode&&X.element.parentNode.insertBefore(c,X.element),c.appendChild(X.element),X.altInput&&c.appendChild(X.altInput),c.appendChild(X.calendarContainer)}X.config.static||X.config.inline||(void 0!==X.config.appendTo?X.config.appendTo:window.document.body).appendChild(X.calendarContainer)}(),function(){if(X.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(X.element.querySelectorAll("[data-"+e+"]"),function(t){return y(t,"click",X[e])})}),X.isMobile)!function(){var e=X.config.enableTime?X.config.noCalendar?"time":"datetime-local":"date";X.mobileInput=a("input",X.input.className+" flatpickr-mobile"),X.mobileInput.step=X.input.getAttribute("step")||"any",X.mobileInput.tabIndex=1,X.mobileInput.type=e,X.mobileInput.disabled=X.input.disabled,X.mobileInput.placeholder=X.input.placeholder,X.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",X.selectedDates.length&&(X.mobileInput.defaultValue=X.mobileInput.value=X.formatDate(X.selectedDates[0],X.mobileFormatStr)),X.config.minDate&&(X.mobileInput.min=X.formatDate(X.config.minDate,"Y-m-d")),X.config.maxDate&&(X.mobileInput.max=X.formatDate(X.config.maxDate,"Y-m-d")),X.input.type="hidden",void 0!==X.altInput&&(X.altInput.type="hidden");try{X.input.parentNode&&X.input.parentNode.insertBefore(X.mobileInput,X.input.nextSibling)}catch(e){}y(X.mobileInput,"change",function(e){X.setDate(e.target.value,!1,X.mobileFormatStr),z("onChange"),z("onClose")})}();else{var e=t(function(){!X.isOpen||X.config.static||X.config.inline||B()},50);X._debouncedChange=t(E,300),"range"===X.config.mode&&X.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&y(X.daysContainer,"mouseover",function(e){return R(e.target)}),y(window.document.body,"keydown",H),X.config.static||y(X._input,"keydown",H),X.config.inline||X.config.static||y(window,"resize",e),void 0!==window.ontouchstart&&y(window.document.body,"touchstart",L),y(window.document.body,"mousedown",x(L)),y(X._input,"blur",L),!0===X.config.clickOpens&&(y(X._input,"focus",X.open),y(X._input,"mousedown",x(X.open))),void 0!==X.daysContainer&&(X.monthNav.addEventListener("wheel",function(e){return e.preventDefault()}),y(X.monthNav,"wheel",t(function(e){e.preventDefault();var t=X.currentYearElement.parentNode&&X.currentYearElement.parentNode.contains(e.target);if(e.target===X.currentMonthElement||t){var n=function(e){return(e.wheelDelta||-e.deltaY)>=0?1:-1}(e);t?(A(X.currentYear+n),e.target.value=X.currentYear.toString()):X.changeMonth(n,!0,!1)}},10)),y(X.monthNav,"mousedown",x(function(e){var t=X.prevMonthNav.contains(e.target),n=X.nextMonthNav.contains(e.target);t||n?P(t?-1:1):e.target===X.currentYearElement?(e.preventDefault(),X.currentYearElement.select()):"arrowUp"===e.target.className?X.changeYear(X.currentYear+1):"arrowDown"===e.target.className&&X.changeYear(X.currentYear-1)})),y(X.monthNav,["keyup","increment"],function(e){var t=parseInt(e.target.value)+(e.delta||0);4!==t.toString().length&&"Enter"!==e.key||(X.currentYearElement.blur(),/[^\d]/.test(t.toString())||A(t))}),y(X.daysContainer,"mousedown",x(K)),X.config.animate&&(y(X.daysContainer,["webkitAnimationEnd","animationend"],function(e){if(X.daysContainer&&X.daysContainer.childNodes.length>1)switch(e.animationName){case"fpSlideLeft":X.daysContainer.lastChild&&X.daysContainer.lastChild.classList.remove("slideLeftNew"),X.daysContainer.removeChild(X.daysContainer.firstChild),X.days=X.daysContainer.firstChild,N();break;case"fpSlideRight":X.daysContainer.firstChild&&X.daysContainer.firstChild.classList.remove("slideRightNew"),X.daysContainer.removeChild(X.daysContainer.lastChild),X.days=X.daysContainer.firstChild,N()}}),y(X.monthNav,["webkitAnimationEnd","animationend"],function(e){switch(e.animationName){case"fpSlideLeftNew":case"fpSlideRightNew":X.navigationCurrentMonth.classList.remove("slideLeftNew"),X.navigationCurrentMonth.classList.remove("slideRightNew");for(var t=X.navigationCurrentMonth;t.nextSibling&&/curr/.test(t.nextSibling.className);)X.monthNav.removeChild(t.nextSibling);for(;t.previousSibling&&/curr/.test(t.previousSibling.className);)X.monthNav.removeChild(t.previousSibling);X.oldCurMonth=void 0}}))),void 0!==X.timeContainer&&void 0!==X.minuteElement&&void 0!==X.hourElement&&(y(X.timeContainer,["wheel","input","increment"],p),y(X.timeContainer,"mousedown",x(function(e){~e.target.className.indexOf("arrow")&&S(e,e.target.classList.contains("arrowUp")?1:-1)})),y(X.timeContainer,["wheel","increment"],X._debouncedChange),y(X.timeContainer,"input",E),y([X.hourElement,X.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==X.secondElement&&y(X.secondElement,"focus",function(){return X.secondElement&&X.secondElement.select()}),void 0!==X.amPM&&y(X.amPM,"mousedown",x(function(e){p(e),E()})))}}(),(X.selectedDates.length||X.config.noCalendar)&&(X.config.enableTime&&M(X.config.noCalendar?X.latestSelectedDateObj||X.config.minDate:void 0),Q(!1)),X.showTimeInput=X.selectedDates.length>0||X.config.noCalendar,void 0!==X.weekWrapper&&void 0!==X.daysContainer&&(X.calendarContainer.style.width=X.daysContainer.offsetWidth+X.weekWrapper.offsetWidth+"px"),X.isMobile||B(),z("onReady")}(),X}(M,s||{}),p.push(M._flatpickr)}catch(e){console.error(e)}}return 1===p.length?p[0]:p}var l=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},c=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},d={DAY:864e5},s={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:console.warn,getWeek:function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e.getTime()-t.getTime())/864e5+t.getDay()+1)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",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,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],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,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},u={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"]},f=function(e){return("0"+e).slice(-2)},m=function(e){return!0===e?1:0},g=function(e){return e instanceof Array?e:[e]},p=function(){},h={D:p,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*m(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){var n=parseInt(t);return new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0)},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:p,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))},w:p,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},v={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)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},D={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[D.w(e,t,n)]},F:function(e,t,n){return c(D.n(e,t,n)-1,!1,t)},G:function(e,t,n){return f(D.h(e,t,n))},H:function(e){return f(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[m(e.getHours()>11)]},M:function(e,t){return c(e.getMonth(),!0,t)},S:function(e){return f(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return f(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return f(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return f(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}};"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=0,i=t;a<i.length;a++)!function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})}(i[a]);return e}),"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return r(this,e)},HTMLElement.prototype.flatpickr=function(e){return r([this],e)});var C;return C=function(e,t){return e instanceof NodeList?r(e,t):"string"==typeof e?r(window.document.querySelectorAll(e),t):r([e],t)},"object"==typeof window&&(window.flatpickr=C),C.defaultConfig=s,C.l10ns={en:l({},u),default:l({},u)},C.localize=function(e){C.l10ns.default=l({},C.l10ns.default,e)},C.setDefaults=function(e){C.defaultConfig=l({},C.defaultConfig,e)},"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return r(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},C});
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings