PageSourceSearch

https://stachema.cz/js-development/vendor/primevue/4.5.5/packages/primevue/datepicker/index.js?v=1785726648

js stachema.cz collected 2026-10-06 01:57:44 UTC 153,911 bytes, 3,818 lines download raw bytes

1import { cn } from '@primeuix/utils';
2import { setAttribute, getFocusableElements, find, findSingle, getIndex, getAttribute, relativePosition, getOuterWidth, absolutePosition, isTouchDevice, addStyle } from '@primeuix/utils/dom';
3import { localeComparator, isEmpty, isDate, isNotEmpty } from '@primeuix/utils/object';
4import { ZIndex } from '@primeuix/utils/zindex';
5import { ConnectedOverlayScrollHandler } from '@primevue/core/utils';
6import CalendarIcon from '@primevue/icons/calendar';
7import ChevronDownIcon from '@primevue/icons/chevrondown';
8import ChevronLeftIcon from '@primevue/icons/chevronleft';
9import ChevronRightIcon from '@primevue/icons/chevronright';
10import ChevronUpIcon from '@primevue/icons/chevronup';
11import TimesIcon from '@primevue/icons/times';
12import Button from 'primevue/button';
13import InputText from 'primevue/inputtext';
14import OverlayEventBus from 'primevue/overlayeventbus';
15import Portal from 'primevue/portal';
16import Ripple from 'primevue/ripple';
17import BaseInput from '@primevue/core/baseinput';
18import DatePickerStyle from 'primevue/datepicker/style';
19import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, normalizeStyle, normalizeClass, createCommentVNode, renderSlot, createVNode, createElementVNode, resolveDynamicComponent, Fragment, withCtx, Transition, renderList, withDirectives, vShow, toDisplayString, createTextVNode, withKeys } from 'vue';
20
21var script$1 = {
22  name: 'BaseDatePicker',
23  "extends": BaseInput,
24  props: {
25    selectionMode: {
26      type: String,
27      "default": 'single'
28    },
29    dateFormat: {
30      type: String,
31      "default": null
32    },
33    updateModelType: {
34      type: String,
35      "default": 'date'
36    },
37    inline: {
38      type: Boolean,
39      "default": false
40    },
41    showOtherMonths: {
42      type: Boolean,
43      "default": true
44    },
45    selectOtherMonths: {
46      type: Boolean,
47      "default": false
48    },
49    showIcon: {
50      type: Boolean,
51      "default": false
52    },
53    iconDisplay: {
54      type: String,
55      "default": 'button'
56    },
57    icon: {
58      type: String,
59      "default": undefined
60    },
61    prevIcon: {
62      type: String,
63      "default": undefined
64    },
65    nextIcon: {
66      type: String,
67      "default": undefined
68    },
69    incrementIcon: {
70      type: String,
71      "default": undefined
72    },
73    decrementIcon: {
74      type: String,
75      "default": undefined
76    },
77    numberOfMonths: {
78      type: Number,
79      "default": 1
80    },
81    responsiveOptions: Array,
82    breakpoint: {
83      type: String,
84      "default": '769px'
85    },
86    view: {
87      type: String,
88      "default": 'date'
89    },
90    minDate: {
91      type: Date,
92      value: null
93    },
94    maxDate: {
95      type: Date,
96      value: null
97    },
98    disabledDates: {
99      type: Array,
100      value: null
101    },
102    disabledDays: {
103      type: Array,
104      value: null
105    },
106    maxDateCount: {
107      type: Number,
108      value: null
109    },
110    showOnFocus: {
111      type: Boolean,
112      "default": true
113    },
114    autoZIndex: {
115      type: Boolean,
116      "default": true
117    },
118    baseZIndex: {
119      type: Number,
120      "default": 0
121    },
122    showButtonBar: {
123      type: Boolean,
124      "default": false
125    },
126    shortYearCutoff: {
127      type: String,
128      "default": '+10'
129    },
130    showTime: {
131      type: Boolean,
132      "default": false
133    },
134    timeOnly: {
135      type: Boolean,
136      "default": false
137    },
138    hourFormat: {
139      type: String,
140      "default": '24'
141    },
142    stepHour: {
143      type: Number,
144      "default": 1
145    },
146    stepMinute: {
147      type: Number,
148      "default": 1
149    },
150    stepSecond: {
151      type: Number,
152      "default": 1
153    },
154    showSeconds: {
155      type: Boolean,
156      "default": false
157    },
158    hideOnDateTimeSelect: {
159      type: Boolean,
160      "default": false
161    },
162    hideOnRangeSelection: {
163      type: Boolean,
164      "default": false
165    },
166    timeSeparator: {
167      type: String,
168      "default": ':'
169    },
170    showWeek: {
171      type: Boolean,
172      "default": false
173    },
174    manualInput: {
175      type: Boolean,
176      "default": true
177    },
178    showClear: {
179      type: Boolean,
180      "default": false
181    },
182    appendTo: {
183      type: [String, Object],
184      "default": 'body'
185    },
186    readonly: {
187      type: Boolean,
188      "default": false
189    },
190    placeholder: {
191      type: String,
192      "default": null
193    },
194    required: {
195      type: Boolean,
196      "default": null
197    },
198    inputId: {
199      type: String,
200      "default": null
201    },
202    inputClass: {
203      type: [String, Object],
204      "default": null
205    },
206    inputStyle: {
207      type: Object,
208      "default": null
209    },
210    panelClass: {
211      type: [String, Object],
212      "default": null
213    },
214    panelStyle: {
215      type: Object,
216      "default": null
217    },
218    todayButtonProps: {
219      type: Object,
220      "default": function _default() {
221        return {
222          severity: 'secondary',
223          text: true,
224          size: 'small'
225        };
226      }
227    },
228    clearButtonProps: {
229      type: Object,
230      "default": function _default() {
231        return {
232          severity: 'secondary',
233          text: true,
234          size: 'small'
235        };
236      }
237    },
238    navigatorButtonProps: {
239      type: Object,
240      "default": function _default() {
241        return {
242          severity: 'secondary',
243          text: true,
244          rounded: true
245        };
246      }
247    },
248    timepickerButtonProps: {
249      type: Object,
250      "default": function _default() {
251        return {
252          severity: 'secondary',
253          text: true,
254          rounded: true
255        };
256      }
257    },
258    ariaLabelledby: {
259      type: String,
260      "default": null
261    },
262    ariaLabel: {
263      type: String,
264      "default": null
265    }
266  },
267  style: DatePickerStyle,
268  provide: function provide() {
269    return {
270      $pcDatePicker: this,
271      $parentInstance: this
272    };
273  }
274};
275
276function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
277function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
278function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
279function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
280function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
281function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
282function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
283function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
284function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
285function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
286function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
287var script = {
288  name: 'DatePicker',
289  "extends": script$1,
290  inheritAttrs: false,
291  emits: ['show', 'hide', 'input', 'month-change', 'year-change', 'date-select', 'today-cl
291ick', 'clear-click', 'focus', 'blur', 'keydown'],
292  inject: {
293    $pcFluid: {
294      "default": null
295    }
296  },
297  navigationState: null,
298  timePickerChange: false,
299  scrollHandler: null,
300  outsideClickListener: null,
301  resizeListener: null,
302  matchMediaListener: null,
303  matchMediaOrientationListener: null,
304  overlay: null,
305  input: null,
306  previousButton: null,
307  nextButton: null,
308  timePickerTimer: null,
309  preventFocus: false,
310  typeUpdate: false,
311  data: function data() {
312    return {
313      currentMonth: null,
314      currentYear: null,
315      currentHour: null,
316      currentMinute: null,
317      currentSecond: null,
318      pm: null,
319      focused: false,
320      overlayVisible: false,
321      currentView: this.view,
322      query: null,
323      queryMatches: false,
324      queryOrientation: null,
325      focusedDateIndex: 0,
326      rawValue: null
327    };
328  },
329  watch: {
330    modelValue: {
331      immediate: true,
332      handler: function handler(newValue) {
333        var _this$$refs$clearIcon;
334        this.rawValue = typeof newValue === 'string' ? this.safeParse(newValue) : newValue;
335        this.updateCurrentMetaData();
336        if (!this.typeUpdate && !this.inline && this.input) {
337          this.input.value = this.formatValue(this.rawValue);
338        }
339        this.typeUpdate = false;
340        if ((_this$$refs$clearIcon = this.$refs.clearIcon) !== null && _this$$refs$clearIcon !== void 0 && (_this$$refs$clearIcon = _this$$refs$clearIcon.$el) !== null && _this$$refs$clearIcon !== void 0 && _this$$refs$clearIcon.style) {
341          this.$refs.clearIcon.$el.style.display = isEmpty(newValue) ? 'none' : 'block';
342        }
343      }
344    },
345    showTime: function showTime() {
346      this.updateCurrentMetaData();
347    },
348    minDate: function minDate() {
349      this.updateCurrentMetaData();
350    },
351    maxDate: function maxDate() {
352      this.updateCurrentMetaData();
353    },
354    months: function months() {
355      if (this.overlay) {
356        if (!this.focused) {
357          if (this.inline) {
358            this.preventFocus = true;
359          }
360          setTimeout(this.updateFocus, 0);
361        }
362      }
363    },
364    numberOfMonths: function numberOfMonths() {
365      this.destroyResponsiveStyleElement();
366      this.createResponsiveStyle();
367    },
368    responsiveOptions: function responsiveOptions() {
369      this.destroyResponsiveStyleElement();
370      this.createResponsiveStyle();
371    },
372    currentView: function currentView() {
373      var _this = this;
374      Promise.resolve(null).then(function () {
375        return _this.alignOverlay();
376      });
377    },
378    view: function view(newValue) {
379      this.currentView = newValue;
380    }
381  },
382  created: function created() {
383    this.updateCurrentMetaData();
384  },
385  mounted: function mounted() {
386    this.createResponsiveStyle();
387    this.bindMatchMediaListener();
388    this.bindMatchMediaOrientationListener();
389    if (this.inline) {
390      if (!this.disabled) {
391        this.preventFocus = true;
392        this.initFocusableCell();
393      }
394    } else {
395      var _this$$refs$clearIcon2;
396      this.input.value = this.inputFieldValue;
397      if ((_this$$refs$clearIcon2 = this.$refs.clearIcon) !== null && _this$$refs$clearIcon2 !== void 0 && (_this$$refs$clearIcon2 = _this$$refs$clearIcon2.$el) !== null && _this$$refs$clearIcon2 !== void 0 && _this$$refs$clearIcon2.style) {
398        this.$refs.clearIcon.$el.style.display = !this.$filled ? 'none' : 'block';
399      }
400    }
401  },
402  updated: function updated() {
403    if (this.overlay) {
404      this.preventFocus = true;
405      setTimeout(this.updateFocus, 0);
406    }
407    if (this.input && this.selectionStart != null && this.selectionEnd != null) {
408      this.input.selectionStart = this.selectionStart;
409      this.input.selectionEnd = this.selectionEnd;
410      this.selectionStart = null;
411      this.selectionEnd = null;
412    }
413  },
414  beforeUnmount: function beforeUnmount() {
415    if (this.timePickerTimer) {
416      clearTimeout(this.timePickerTimer);
417    }
418    this.destroyResponsiveStyleElement();
419    this.unbindOutsideClickListener();
420    this.unbindResizeListener();
421    this.unbindMatchMediaListener();
422    this.unbindMatchMediaOrientationListener();
423    if (this.scrollHandler) {
424      this.scrollHandler.destroy();
425      this.scrollHandler = null;
426    }
427    if (this.overlay && this.autoZIndex) {
428      ZIndex.clear(this.overlay);
429    }
430    this.overlay = null;
431  },
432  methods: {
433    isSelected: function isSelected(dateMeta) {
434      if (this.rawValue) {
435        if (this.isSingleSelection()) {
436          return this.isDateEquals(this.parseValueForComparison(this.rawValue), dateMeta);
437        } else if (this.isMultipleSelection()) {
438          var selected = false;
439          var _iterator = _createForOfIteratorHelper(this.rawValue),
440            _step;
441          try {
442            for (_iterator.s(); !(_step = _iterator.n()).done;) {
443              var date = _step.value;
444              selected = this.isDateEquals(this.parseValueForComparison(date), dateMeta);
445              if (selected) {
446                break;
447              }
448            }
449          } catch (err) {
450            _iterator.e(err);
451          } finally {
452            _iterator.f();
453          }
454          return selected;
455        } else if (this.isRangeSelection()) {
456          var start = this.parseValueForComparison(this.rawValue[0]);
457          if (this.rawValue[1]) {
458            var end = this.parseValueForComparison(this.rawValue[1]);
459            return this.isDateEquals(start, dateMeta) || this.isDateEquals(end, dateMeta) || this.isDateBetween(start, end, dateMeta);
460          } else {
461            return this.isDateEquals(start, dateMeta);
462          }
463        }
464      }
465      return false;
466    },
467    isMonthSelected: function isMonthSelected(month) {
468      var _this2 = this;
469      if (this.isMultipleSelection()) {
470        var _this$rawValue;
471        return (_this$rawValue = this.rawValue) === null || _this$rawValue === void 0 ? void 0 : _this$rawValue.some(function (currentValue) {
472          var parsedDate = _this2.parseValueForComparison(currentValue);
473          return parsedDate.getMonth() === month && parsedDate.getFullYear() === _this2.currentYear;
474        });
475      } else if (this.isRangeSelection()) {
476        var _this$rawValue2, _this$rawValue3;
477        var parsedStart = (_this$rawValue2 = this.rawValue) !== null && _this$rawValue2 !== void 0 && _this$rawValue2[0] ? this.parseValueForComparison(this.rawValue[0]) : null;
478        var parsedEnd = (_this$rawValue3 = this.rawValue) !== null && _this$rawValue3 !== void 0 && _this$rawValue3[1] ? this.parseValueForComparison(this.rawValue[1]) : null;
479        if (!parsedEnd) {
480          return (parsedStart === null || parsedStart === void 0 ? void 0 : parsedStart.getFullYear()) === this.currentYear && (parsedStart === null || parsedStart === void 0 ? void 0 : parsedStart.getMonth()) === month;
481        } else {
482          var currentDate = new Date(this.currentYear, month, 1);
483          var startDate = new Date(parsedStart.getFullYear(), parsedStart.getMonth(), 1);
484          var endDate = new Date(parsedEnd.getFullYear(), parsedEnd.getMonth(), 1);
485          return currentDate >= startDate && currentDate <= endDate;
486        }
487      } else {
488        var _this$rawValue4, _this$rawValue5;
489        return ((_this$rawValue4 = this.rawValue) === null || _this$rawValue4 === void 0 ? void 0 : _this$rawValue4.getMonth()) === month && ((_this$rawValue5 = this.rawValue) === null || _this$rawValue5 === void 0 ? void 0 : _this$rawValue5.getFullYear()) === this.currentYear;
490      }
491    },
492    isYearSelected: function isYearSelected(year) {
493      var _this3 = this;
494      if (this.isMultipleSelection()) {
495        var _this$rawValue6;
496        return (_this$rawValue6 = this.rawValue) === null || _this$rawValue6 === void 0 ? void 0 : _this$rawValue6.some(function (currentValue) {
497          var parsedDate = _this3.parseValueForComparison(currentValue);
498          return parsedDate.getFullYear() === year;
499        });
500      } else if (this.isRangeSelection()) {
501        var _this$rawValue7, _this$rawValue8;
502        var parsedStart = (_this$rawValue7 = this.rawValue) !== null && _this$rawValue7 !== void 0 && _this$rawValue7[0] ? this.parseValueForComparison(this.rawValue[0]) : null;
503        var parsedEnd = (_this$rawValue8 = this.rawValue) !== null && _this$rawValue8 !== void 0 && _this$rawValue8[1] ? this.parseValueForComparison(this.rawValue[1]) : null;
504        var start = parsedStart ? parsedStart.getFullYear() : null;
505        var end = parsedEnd ? parsedEnd.getFullYear() : null;
506        return start === year || end === year || start < year && end > year;
507      } else {
508        var _this$rawValue9;
509        return ((_this$rawValue9 = this.rawValue) === null || _this$rawValue9 === void 0 ? void 0 : _this$rawValue9.getFullYear()) === year;
510      }
511    },
512    isDateEquals: function isDateEquals(value, dateMeta) {
513      if (value) return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;else return false;
514    },
515    isDateBetween: function isDateBetween(start, end, dateMeta) {
516      var between = false;
517      var parsedStart = this.parseValueForComparison(start);
518      var parsedEnd = this.parseValueForComparison(end);
519      if (parsedStart && parsedEnd) {
520        var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
521        return parsedStart.getTime() <= date.getTime() && parsedEnd.getTime() >= date.getTime();
522      }
523      return between;
524    },
525    getFirstDayOfMonthIndex: function getFirstDayOfMonthIndex(month, year) {
526      var day = new Date();
527      day.setDate(1);
528      day.setMonth(month);
529      day.setFullYear(year);
530      var dayIndex = day.getDay() + this.sundayIndex;
531      return dayIndex >= 7 ? dayIndex - 7 : dayIndex;
532    },
533    getDaysCountInMonth: function getDaysCountInMonth(month, year) {
534      return 32 - this.daylightSavingAdjust(new Date(year, month, 32)).getDate();
535    },
536    getDaysCountInPrevMonth: function getDaysCountInPrevMonth(month, year) {
537      var prev = this.getPreviousMonthAndYear(month, year);
538      return this.getDaysCountInMonth(prev.month, prev.year);
539    },
540    getPreviousMonthAndYear: function getPreviousMonthAndYear(month, year) {
541      var m, y;
542      if (month === 0) {
543        m = 11;
544        y = year - 1;
545      } else {
546        m = month - 1;
547        y = year;
548      }
549      return {
550        month: m,
551        year: y
552      };
553    },
554    getNextMonthAndYear: function getNextMonthAndYear(month, year) {
555      var m, y;
556      if (month === 11) {
557        m = 0;
558        y = year + 1;
559      } else {
560        m = month + 1;
561        y = year;
562      }
563      return {
564        month: m,
565        year: y
566      };
567    },
568    daylightSavingAdjust: function daylightSavingAdjust(date) {
569      if (!date) {
570        return null;
571      }
572      date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
573      return date;
574    },
575    isToday: function isToday(today, day, month, year) {
576      return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;
577    },
578    isSelectable: function isSelectable(day, month, year, otherMonth) {
579      var validMin = true;
580      var validMax = true;
581      var validDate = true;
582      var validDay = true;
583      if (otherMonth && !this.selectOtherMonths) {
584        return false;
585      }
586      if (this.minDate) {
587        if (this.minDate.getFullYear() > year) {
588          validMin = false;
589        } else if (this.minDate.getFullYear() === year) {
590          if (this.minDate.getMonth() > month) {
591            validMin = false;
592          } else if (this.minDate.getMonth() === month) {
593            if (this.minDate.getDate() > day) {
594              validMin = false;
595            }
596          }
597        }
598      }
599      if (this.maxDate) {
600        if (this.maxDate.getFullYear() < year) {
601          validMax = false;
602        } else if (this.maxDate.getFullYear() === year) {
603          if (this.maxDate.getMonth() < month) {
604            validMax = false;
605          } else if (this.maxDate.getMonth() === month) {
606            if (this.maxDate.getDate() < day) {
607              validMax = false;
608            }
609          }
610        }
611      }
612      if (this.disabledDates) {
613        validDate = !this.isDateDisabled(day, month, year);
614      }
615      if (this.disabledDays) {
616        validDay = !this.isDayDisabled(day, month, year);
617      }
618      return validMin && validMax && validDate && validDay;
619    },
620    onOverlayEnter: function onOverlayEnter(el) {
621      var styles = !this.inline ? {
622        position: 'absolute',
623        top: '0'
624      } : undefined;
625      addStyle(el, styles);
626      if (this.autoZIndex) {
627        ZIndex.set('overlay', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);
628      }
629
630      // Issue: #7508
631      this.$attrSelector && el.setAttribute(this.$attrSelector, '');
632      this.alignOverlay();
633      this.$emit('show');
634    },
635    onOverlayEnterComplete: function onOverlayEnterComplete() {
636      this.bindOutsideClickListener();
637      this.bindScrollListener();
638      this.bindResizeListener();
639    },
640    onOverlayAfterLeave: function onOverlayAfterLeave(el) {
641      if (this.autoZIndex) {
642        ZIndex.clear(el);
643      }
644    },
645    onOverlayLeave: function onOverlayLeave() {
646      this.currentView = this.view;
647      this.unbindOutsideClickListener();
648      this.unbindScrollListener();
649      this.unbindResizeListener();
650      this.$emit('hide');
651      this.overlay = null;
652    },
653    onPrevButtonClick: function onPrevButtonClick(event) {
654      this.navigationState = {
655        backward: true,
656        button: true
657      };
658      this.navBackward(event);
659    },
660    onNextButtonClick: function onNextButtonClick(event) {
661      this.navigationState = {
662        backward: false,
663        button: true
664      };
665      this.navForward(event);
666    },
667    navBackward: function navBackward(event) {
668      event.preventDefault();
669      if (!this.isEnabled()) {
670        return;
671      }
672      if (this.currentView === 'month') {
673        this.decrementYear();
674        this.$emit('year-change', {
675          month: this.currentMonth,
676          year: this.currentYear
677        });
678      } else if (this.currentView === 'year') {
679        this.decrementDecade();
680      } else {
681        if (event.shiftKey) {
682          this.decrementYear();
683        } else {
684          if (this.currentMonth === 0) {
685            this.currentMonth = 11;
686            this.decrementYear();
687          } else {
688            this.currentMonth--;
689          }
690          this.$emit('month-change', {
691            month: this.currentMonth + 1,
692            year: this.currentYear
693          });
694        }
695      }
696    },
697    navForward: function navForward(event) {
698      event.preventDefault();
699      if (!this.isEnabled()) {
700        return;
701      }
702      if (this.currentView === 'month') {
703        this.incrementYear();
704        this.$emit('year-change', {
705          month: this.currentMonth,
706          year: this.currentYear
707        });
708      } else if (this.currentView === 'year') {
709        this.incrementDecade();
710      } else {
711        if (event.shiftKey) {
712          this.incrementYear();
713        } else {
714          if (this.currentMonth === 11) {
715            this.currentMonth = 0;
716            this.incrementYear();
717          } else {
718            this.currentMonth++;
719          }
720          this.$emit('month-change', {
721            month: this.currentMonth + 1,
722            year: this.currentYear
723          });
724        }
725      }
726    },
727    decrementYear: function decrementYear() {
728      this.currentYear--;
729    },
730    decrementDecade: function decrementDecade() {
731      this.currentYear = this.currentYear - 10;
732    },
733    incrementYear: function incrementYear() {
734      this.currentYear++;
735    },
736    incrementDecade: function incrementDecade() {
737      this.currentYear = this.currentYear + 10;
738    },
739    switchToMonthView: function switchToMonthView(event) {
740      this.currentView = 'month';
741      setTimeout(this.updateFocus, 0);
742      event.preventDefault();
743    },
744    switchToYearView: function switchToYearView(event) {
745      this.currentView = 'year';
746      setTimeout(this.updateFocus, 0);
747      event.preventDefault();
748    },
749    isEnabled: function isEnabled() {
750      return !this.disabled && !this.readonly;
751    },
752    updateCurrentTimeMeta: function updateCurrentTimeMeta(date) {
753      var currentHour = date.getHours();
754      if (this.hourFormat === '12') {
755        this.pm = currentHour > 11;
756        if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
757      }
758      this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
759      this.currentMinute = Math.floor(date.getMinutes() / this.stepMinute) * this.stepMinute;
760      this.currentSecond = Math.floor(date.getSeconds() / this.stepSecond) * this.stepSecond;
761    },
762    bindOutsideClickListener: function bindOutsideClickListener() {
763      var _this4 = this;
764      if (!this.outsideClickListener) {
765        this.outsideClickListener = function (event) {
766          if (_this4.overlayVisible && _this4.isOutsideClicked(event)) {
767            _this4.overlayVisible = false;
768          }
769        };
770        document.addEventListener('mousedown', this.outsideClickListener);
771      }
772    },
773    unbindOutsideClickListener: function unbindOutsideClickListener() {
774      if (this.outsideClickListener) {
775        document.removeEventListener('mousedown', this.outsideClickListener);
776        this.outsideClickListener = null;
777      }
778    },
779    bindScrollListener: function bindScrollListener() {
780      var _this5 = this;
781      if (!this.scrollHandler) {
782        this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {
783          if (_this5.overlayVisible) {
784            _this5.overlayVisible = false;
785          }
786        });
787      }
788      this.scrollHandler.bindScrollListener();
789    },
790    unbindScrollListener: function unbindScrollListener() {
791      if (this.scrollHandler) {
792        this.scrollHandler.unbindScrollListener();
793      }
794    },
795    bindResizeListener: function bindResizeListener() {
796      var _this6 = this;
797      if (!this.resizeListener) {
798        this.resizeListener = function () {
799          if (_this6.overlayVisible && !isTouchDevice()) {
800            _this6.overlayVisible = false;
801          }
802        };
803        window.addEventListener('resize', this.resizeListener);
804      }
805    },
806    unbindResizeListener: function unbindResizeListener() {
807      if (this.resizeListener) {
808        window.removeEventListener('resize', this.resizeListener);
809        this.resizeListener = null;
810      }
811    },
812    bindMatchMediaListener: function bindMatchMediaListener() {
813      var _this7 = this;
814      if (!this.matchMediaListener) {
815        var query = matchMedia("(max-width: ".concat(this.breakpoint, ")"));
816        this.query = query;
817        this.queryMatches = query.matches;
818        this.matchMediaListener = function () {
819          _this7.queryMatches = query.matches;
820          _this7.mobileActive = false;
821        };
822        this.query.addEventListener('change', this.matchMediaListener);
823      }
824    },
825    unbindMatchMediaListener: function unbindMatchMediaListener() {
826      if (this.matchMediaListener) {
827        this.query.removeEventListener('change', this.matchMediaListener);
828        this.matchMediaListener = null;
829      }
830    },
831    bindMatchMediaOrientationListener: function bindMatchMediaOrientationListener() {
832      var _this8 = this;
833      if (!this.matchMediaOrientationListener) {
834        var query = matchMedia("(orientation: portrait)");
835        this.queryOrientation = query;
836        this.matchMediaOrientationListener = function () {
837          _this8.alignOverlay();
838        };
839        this.queryOrientation.addEventListener('change', this.matchMediaOrientationListener);
840      }
841    },
842    unbindMatchMediaOrientationListener: function unbindMatchMediaOrientationListener() {
843      if (this.matchMediaOrientationListener) {
844        this.queryOrientation.removeEventListener('change', this.matchMediaOrientationListener);
845        this.queryOrientation = null;
846        this.matchMediaOrientationListener = null;
847      }
848    },
849    isOutsideClicked: function isOutsideClicked(event) {
850      var composedPath = event.composedPath();
851      return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) || composedPath.includes(this.$el) || composedPath.includes(this.overlay));
852    },
853    isNavIconClicked: function isNavIconClicked(event) {
854      return this.previousButton && (this.previousButton.isSameNode(event.target) || this.previousButton.contains(event.target)) || this.nextButton && (this.nextButton.isSameNode(event.target) || this.nextButton.contains(event.target));
855    },
856    alignOverlay: function alignOverlay() {
857      if (this.overlay) {
858        if (this.appendTo === 'self' || this.inline) {
859          relativePosition(this.overlay, this.$el);
860        } else {
861          if (this.view === 'date') {
862            this.overlay.style.width = getOuterWidth(this.overlay) + 'px';
863            this.overlay.style.minWidth = getOuterWidth(this.$el) + 'px';
864          } else {
865            this.overlay.style.width = getOuterWidth(this.$el) + 'px';
866          }
867          absolutePosition(this.overlay, this.$el);
868        }
869      }
870    },
871    onButtonClick: function onButtonClick() {
872      if (this.isEnabled()) {
873        if (!this.overlayVisible) {
874          this.input.focus();
875          this.overlayVisible = true;
876        } else {
877          this.overlayVisible = false;
878        }
879      }
880    },
881    isDateDisabled: function isDateDisabled(day, month, year) {
882      if (this.disabledDates) {
883        var _iterator2 = _createForOfIteratorHelper(this.disabledDates),
884          _step2;
885        try {
886          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
887            var disabledDate = _step2.value;
888            if (disabledDate.getFullYear() === year && disabledDate.getMonth() === month && disabledDate.getDate() === day) {
889              return true;
890            }
891          }
892        } catch (err) {
893          _iterator2.e(err);
894        } finally {
895          _iterator2.f();
896        }
897      }
898      return false;
899    },
900    isDayDisabled: function isDayDisabled(day, month, year) {
901      if (this.disabledDays) {
902        var weekday = new Date(year, month, day);
903        var weekdayNumber = weekday.getDay();
904        return this.disabledDays.indexOf(weekdayNumber) !== -1;
905      }
906      return false;
907    },
908    onMonthDropdownChange: function onMonthDropdownChange(value) {
909      this.currentMonth = parseInt(value);
910      this.$emit('month-change', {
911        month: this.currentMonth + 1,
912        year: this.currentYear
913      });
914    },
915    onYearDropdownChange: function onYearDropdownChange(value) {
916      this.currentYear = parseInt(value);
917      this.$emit('year-change', {
918        month: this.currentMonth,
919        year: this.currentYear
920      });
921    },
922    onDateSelect: function onDateSelect(event, dateMeta) {
923      var _this9 = this;
924      if (this.disabled || !dateMeta.selectable) {
925        return;
926      }
927      find(this.overlay, 'table td span:not([data-p-disabled="true"])').forEach(function (cell) {
928        return cell.tabIndex = -1;
929      });
930      if (event) {
931        event.currentTarget.focus();
932      }
933      if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
934        var newValue = this.rawValue.filter(function (date) {
935          return !_this9.isDateEquals(_this9.parseValueForComparison(date), dateMeta);
936        });
937        this.updateModel(newValue);
938      } else {
939        if (this.shouldSelectDate(dateMeta)) {
940          if (dateMeta.otherMonth) {
941            this.currentMonth = dateMeta.month;
942            this.currentYear = dateMeta.year;
943            this.selectDate(dateMeta);
944          } else {
945            this.selectDate(dateMeta);
946          }
947        }
948      }
949      if (this.isSingleSelection() && (!this.showTime || this.hideOnDateTimeSelect)) {
950        if (this.input) {
951          this.input.focus();
952        }
953        setTimeout(function () {
954          _this9.overlayVisible = false;
955        }, 150);
956      }
957    },
958    selectDate: function selectDate(dateMeta) {
959      var _this0 = this;
960      var date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
961      if (this.showTime) {
962        this.hourFormat === '12' && this.currentHour !== 12 && this.pm ? date.setHours(this.currentHour + 12) : date.setHours(this.currentHour);
963        date.setMinutes(this.currentMinute);
964        date.setSeconds(this.showSeconds ? this.currentSecond : 0);
965      }
966      if (this.minDate && this.minDate > date) {
967        date = this.minDate;
968        this.currentHour = date.getHours();
969        this.currentMinute = date.getMinutes();
970        this.currentSecond = date.getSeconds();
971      }
972      if (this.maxDate && this.maxDate < date) {
973        date = this.maxDate;
974        this.currentHour = date.getHours();
975        this.currentMinute = date.getMinutes();
976        this.currentSecond = date.getSeconds();
977      }
978      var modelVal = null;
979      if (this.isSingleSelection()) {
980        modelVal = date;
981      } else if (this.isMultipleSelection()) {
982        modelVal = this.rawValue ? [].concat(_toConsumableArray(this.rawValue), [date]) : [date];
983      } else if (this.isRangeSelection()) {
984        if (this.rawValue && this.rawValue.length) {
985          var startDate = this.parseValueForComparison(this.rawValue[0]);
986          var endDate = this.rawValue[1];
987          if (!endDate && date.getTime() >= startDate.getTime()) {
988            endDate = date;
989            this.focusedDateIndex = 1;
990          } else {
991            startDate = date;
992            endDate = null;
993            this.focusedDateIndex = 0;
994          }
995          modelVal = [startDate, endDate];
996        } else {
997          modelVal = [date, null];
998          this.focusedDateIndex = 0;
999        }
1000      }
1001      if (modelVal !== null) {
1002        this.updateModel(modelVal);
1003      }
1004      if (this.isRangeSelection() && this.hideOnRangeSelection && modelVal[1] !== null) {
1005        setTimeout(function () {
1006          _this0.overlayVisible = false;
1007        }, 150);
1008      }
1009      this.$emit('date-select', date);
1010    },
1011    updateModel: function updateModel(value) {
1012      var _this1 = this;
1013      this.rawValue = value;
1014      if (this.updateModelType === 'date') {
1015        if (this.isSingleSelection()) {
1016          this.writeValue(value);
1017        } else {
1018          var stringArrValue = null;
1019          if (Array.isArray(value)) {
1020            stringArrValue = value.map(function (date) {
1021              return _this1.parseValueForComparison(date);
1022            });
1023          }
1024          this.writeValue(stringArrValue);
1025        }
1026      } else if (this.updateModelType == 'string') {
1027        if (this.isSingleSelection()) {
1028          this.writeValue(this.formatDateTime(value));
1029        } else if (this.isMultipleSelection()) {
1030          var _stringArrValue = null;
1031          if (Array.isArray(value)) {
1032            _stringArrValue = value.map(function (date) {
1033              return _this1.formatDateTime(date);
1034            });
1035          }
1036          this.writeValue(_stringArrValue);
1037        } else if (this.isRangeSelection()) {
1038          var _stringArrValue2 = null;
1039          if (Array.isArray(value)) {
1040            _stringArrValue2 = value.map(function (date) {
1041              if (date === null || date === undefined) {
1042                return null;
1043              }
1044              return typeof date === 'string' ? date : _this1.formatDateTime(date);
1045            });
1046          }
1047          this.writeValue(_stringArrValue2);
1048        }
1049      }
1050    },
1051    shouldSelectDate: function shouldSelectDate() {
1052      if (this.isMultipleSelection()) return this.maxDateCount != null ? this.maxDateCount > (this.rawValue ? this.rawValue.length : 0) : true;else return true;
1053    },
1054    isSingleSelection: function isSingleSelection() {
1055      return this.selectionMode === 'single';
1056    },
1057    isRangeSelection: function isRangeSelection() {
1058      return this.selectionMode === 'range';
1059    },
1060    isMultipleSelection: function isMultipleSelection() {
1061      return this.selectionMode === 'multiple';
1062    },
1063    formatValue: function formatValue(value) {
1064      if (typeof value === 'string') {
1065        return this.dateFormat ? isNaN(new Date(value)) ? value : this.formatDate(new Date(value), this.dateFormat) : value;
1066      }
1067      var formattedValue = '';
1068      if (value) {
1069        try {
1070          if (this.isSingleSelection()) {
1071            formattedValue = this.formatDateTime(value);
1072          } else if (this.isMultipleSelection()) {
1073            for (var i = 0; i < value.length; i++) {
1074              var dateAsString = typeof value[i] === 'string' ? this.formatDateTime(this.parseValueForComparison(value[i])) : this.formatDateTime(value[i]);
1075              formattedValue += dateAsString;
1076              if (i !== value.length - 1) {
1077                formattedValue += ', ';
1078              }
1079            }
1080          } else if (this.isRangeSelection()) {
1081            if (value && value.length) {
1082              var startDate = this.parseValueForComparison(value[0]);
1083              var endDate = this.parseValueForComparison(value[1]);
1084              formattedValue = this.formatDateTime(startDate);
1085              if (endDate) {
1086                formattedValue += ' - ' + this.formatDateTime(endDate);
1087              }
1088            }
1089          }
1090        } catch (err) {
1091          formattedValue = value;
1092        }
1093      }
1094      return formattedValue;
1095    },
1096    formatDateTime: function formatDateTime(date) {
1097      var formattedValue = null;
1098      if (isDate(date) && isNotEmpty(date)) {
1099        if (this.timeOnly) {
1100          formattedValue = this.formatTime(date);
1101        } else {
1102          formattedValue = this.formatDate(date, this.datePattern);
1103          if (this.showTime) {
1104            formattedValue += ' ' + this.formatTime(date);
1105          }
1106        }
1107      } else if (this.updateModelType === 'string') {
1108        formattedValue = date;
1109      }
1110      return formattedValue;
1111    },
1112    formatDate: function formatDate(date, format) {
1113      if (!date) {
1114        return '';
1115      }
1116      var iFormat;
1117      var lookAhead = function lookAhead(match) {
1118          var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
1119          if (matches) {
1120            iFormat++;
1121          }
1122          return matches;
1123        },
1124        formatNumber = function formatNumber(match, value, len) {
1125          var num = '' + value;
1126          if (lookAhead(match)) {
1127            while (num.length < len) {
1128              num = '0' + num;
1129            }
1130          }
1131          return num;
1132        },
1133        formatName = function formatName(match, value, shortNames, longNames) {
1134          return lookAhead(match) ? longNames[value] : shortNames[value];
1135        };
1136      var output = '';
1137      var literal = false;
1138      if (date) {
1139        for (iFormat = 0; iFormat < format.length; iFormat++) {
1140          if (literal) {
1141            if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
1142              literal = false;
1143            } else {
1144              output += format.charAt(iFormat);
1145            }
1146          } else {
1147            switch (format.charAt(iFormat)) {
1148              case 'd':
1149                output += formatNumber('d', date.getDate(), 2);
1150                break;
1151              case 'D':
1152                output += formatName('D', date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
1153                break;
1154              case 'o':
1155                output += formatNumber('o', Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
1156                break;
1157              case 'm':
1158                output += formatNumber('m', date.getMonth() + 1, 2);
1159                break;
1160              case 'M':
1161                output += formatName('M', date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
1162                break;
1163              case 'y':
1164                output += lookAhead('y') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + date.getFullYear() % 100;
1165                break;
1166              case '@':
1167                output += date.getTime();
1168                break;
1169              case '!':
1170                output += date.getTime() * 10000 + this.ticksTo1970;
1171                break;
1172              case "'":
1173                if (lookAhead("'")) {
1174                  output += "'";
1175                } else {
1176                  literal = true;
1177                }
1178                break;
1179              default:
1180                output += format.charAt(iFormat);
1181            }
1182          }
1183        }
1184      }
1185      return output;
1186    },
1187    formatTime: function formatTime(date) {
1188      if (!date) {
1189        return '';
1190      }
1191      var output = '';
1192      var hours = date.getHours();
1193      var minutes = date.getMinutes();
1194      var seconds = date.getSeconds();
1195      if (this.hourFormat === '12' && hours > 11 && hours !== 12) {
1196        hours -= 12;
1197      }
1198      if (this.hourFormat === '12') {
1199        output += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;
1200      } else {
1201        output += hours < 10 ? '0' + hours : hours;
1202      }
1203      output += ':';
1204      output += minutes < 10 ? '0' + minutes : minutes;
1205      if (this.showSeconds) {
1206        output += ':';
1207        output += seconds < 10 ? '0' + seconds : seconds;
1208      }
1209      if (this.hourFormat === '12') {
1210        output += date.getHours() > 11 ? " ".concat(this.$primevue.config.locale.pm) : " ".concat(this.$primevue.config.locale.am);
1211      }
1212      return output;
1213    },
1214    onTodayButtonClick: function onTodayButtonClick(event) {
1215      var date = new Date();
1216      var dateMeta = {
1217        day: date.getDate(),
1218        month: date.getMonth(),
1219        year: date.getFullYear(),
1220        otherMonth: date.getMonth() !== this.currentMonth || date.getFullYear() !== this.currentYear,
1221        today: true,
1222        selectable: true
1223      };
1224      this.onDateSelect(null, dateMeta);
1225      this.$emit('today-click', date);
1226      event.preventDefault();
1227    },
1228    onClearButtonClick: function onClearButtonClick(event) {
1229      this.updateModel(null);
1230      this.overlayVisible = false;
1231      this.$emit('clear-click', event);
1232      event.preventDefault();
1233    },
1234    onTimePickerElementMouseDown: function onTimePickerElementMouseDown(event, type, direction) {
1235      if (this.isEnabled()) {
1236        this.repeat(event, null, type, direction);
1237        event.preventDefault();
1238      }
1239    },
1240    onTimePickerElementMouseUp: function onTimePickerElementMouseUp(event) {
1241      if (this.isEnabled()) {
1242        this.clearTimePickerTimer();
1243        this.updateModelTime();
1244        event.preventDefault();
1245      }
1246    },
1247    onTimePickerElementMouseLeave: function onTimePickerElementMouseLeave() {
1248      this.clearTimePickerTimer();
1249    },
1250    onTimePickerElementKeyDown: function onTimePickerElementKeyDown(event, type, direction) {
1251      switch (event.code) {
1252        case 'Enter':
1253        case 'NumpadEnter':
1254        case 'Space':
1255          if (this.isEnabled()) {
1256            this.repeat(event, null, type, direction);
1257            event.preventDefault();
1258          }
1259          break;
1260      }
1261    },
1262    onTimePickerElementKeyUp: function onTimePickerElementKeyUp(event) {
1263      switch (event.code) {
1264        case 'Enter':
1265        case 'NumpadEnter':
1266        case 'Space':
1267          if (this.isEnabled()) {
1268            this.clearTimePickerTimer();
1269            this.updateModelTime();
1270            event.preventDefault();
1271          }
1272          break;
1273      }
1274    },
1275    repeat: function repeat(event, interval, type, direction) {
1276      var _this10 = this;
1277      var i = interval || 500;
1278      this.clearTimePickerTimer();
1279      this.timePickerTimer = setTimeout(function () {
1280        _this10.repeat(event, 100, type, direction);
1281      }, i);
1282      switch (type) {
1283        case 0:
1284          if (direction === 1) this.incrementHour(event);else this.decrementHour(event);
1285          break;
1286        case 1:
1287          if (direction === 1) this.incrementMinute(event);else this.decrementMinute(event);
1288          break;
1289        case 2:
1290          if (direction === 1) this.incrementSecond(event);else this.decrementSecond(event);
1291          break;
1292      }
1293    },
1294    convertTo24Hour: function convertTo24Hour(hours, pm) {
1295      if (this.hourFormat == '12') {
1296        if (hours === 12) {
1297          return pm ? 12 : 0;
1298        } else {
1299          return pm ? hours + 12 : hours;
1300        }
1301      }
1302      return hours;
1303    },
1304    validateTime: function validateTime(hour, minute, second, pm) {
1305      var value = this.viewDate;
1306      var convertedHour = this.convertTo24Hour(hour, pm);
1307      if (this.isRangeSelection()) {
1308        value = this.rawValue ? this.rawValue[1] || this.rawValue[0] : value;
1309      }
1310      if (this.isMultipleSelection()) {
1311        value = this.rawValue ? this.rawValue[this.rawValue.length - 1] : value;
1312      }
1313      var valueDateString = value ? value.toDateString() : null;
1314      if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) {
1315        if (this.minDate.getHours() > convertedHour) {
1316          return false;
1317        }
1318        if (this.minDate.getHours() === convertedHour) {
1319          if (this.minDate.getMinutes() > minute) {
1320            return false;
1321          }
1322          if (this.minDate.getMinutes() === minute) {
1323            if (this.minDate.getSeconds() > second) {
1324              return false;
1325            }
1326          }
1327        }
1328      }
1329      if (this.maxDate && valueDateString && this.maxDate.toDateString() === valueDateString) {
1330        if (this.maxDate.getHours() < convertedHour) {
1331          return false;
1332        }
1333        if (this.maxDate.getHours() === convertedHour) {
1334          if (this.maxDate.getMinutes() < minute) {
1335            return false;
1336          }
1337          if (this.maxDate.getMinutes() === minute) {
1338            if (this.maxDate.getSeconds() < second) {
1339              return false;
1340            }
1341          }
1342        }
1343      }
1344      return true;
1345    },
1346    incrementHour: function incrementHour(event) {
1347      var prevHour = this.currentHour;
1348      var newHour = this.currentHour + Number(this.stepHour);
1349      var newPM = this.pm;
1350      if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour;else if (this.hourFormat == '12') {
1351        // Before the AM/PM break, now after
1352        if (prevHour < 12 && newHour > 11) {
1353          newPM = !this.pm;
1354        }
1355        newHour = newHour >= 13 ? newHour - 12 : newHour;
1356      }
1357      if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
1358        this.currentHour = newHour;
1359        this.pm = newPM;
1360      }
1361      event.preventDefault();
1362    },
1363    decrementHour: function decrementHour(event) {
1364      var newHour = this.currentHour - this.stepHour;
1365      var newPM = this.pm;
1366      if (this.hourFormat == '24') newHour = newHour < 0 ? 24 + newHour : newHour;else if (this.hourFormat == '12') {
1367        // If we were at noon/midnight, then switch
1368        if (this.currentHour === 12) {
1369          newPM = !this.pm;
1370        }
1371        newHour = newHour <= 0 ? 12 + newHour : newHour;
1372      }
1373      if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
1374        this.currentHour = newHour;
1375        this.pm = newPM;
1376      }
1377      event.preventDefault();
1378    },
1379    incrementMinute: function incrementMinute(event) {
1380      var newMinute = this.currentMinute + Number(this.stepMinute);
1381      if (this.validateTime(this.currentHour, newMinute, this.currentSecond, this.pm)) {
1382        this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute;
1383      }
1384      event.preventDefault();
1385    },
1386    decrementMinute: function decrementMinute(event) {
1387      var newMinute = this.currentMinute - this.stepMinute;
1388      newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
1389      if (this.validateTime(this.currentHour, newMinute, this.currentSecond, this.pm)) {
1390        this.currentMinute = newMinute;
1391      }
1392      event.preventDefault();
1393    },
1394    incrementSecond: function incrementSecond(event) {
1395      var newSecond = this.currentSecond + Number(this.stepSecond);
1396      if (this.validateTime(this.currentHour, this.currentMinute, newSecond, this.pm)) {
1397        this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond;
1398      }
1399      event.preventDefault();
1400    },
1401    decrementSecond: function decrementSecond(event) {
1402      var newSecond = this.currentSecond - this.stepSecond;
1403      newSecond = newSecond < 0 ? 60 + newSecond : newSecond;
1404      if (this.validateTime(this.currentHour, this.currentMinute, newSecond, this.pm)) {
1405        this.currentSecond = newSecond;
1406      }
1407      event.preventDefault();
1408    },
1409    updateModelTime: function updateModelTime() {
1410      var _this11 = this;
1411      this.timePickerChange = true;
1412      var value = this.viewDate;
1413      if (this.isRangeSelection()) {
1414        value = this.rawValue ? this.rawValue[this.focusedDateIndex] || this.rawValue[0] : value;
1415      }
1416      if (this.isMultipleSelection()) {
1417        value = this.rawValue ? this.rawValue[this.rawValue.length - 1] : value;
1418      }
1419      value = value ? new Date(value.getTime()) : new Date();
1420      if (this.hourFormat == '12') {
1421        if (this.currentHour === 12) value.setHours(this.pm ? 12 : 0);else value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
1422      } else {
1423        value.setHours(this.currentHour);
1424      }
1425      value.setMinutes(this.currentMinute);
1426      value.setSeconds(this.currentSecond);
1427      if (this.isRangeSelection()) {
1428        if (this.rawValue && this.focusedDateIndex === 1 && this.rawValue[1]) {
1429          value = [this.rawValue[0], value];
1430        } else if (this.rawValue && this.focusedDateIndex === 0) {
1431          value = [value, this.rawValue[1]];
1432        } else {
1433          value = [value, null];
1434        }
1435      }
1436      if (this.isMultipleSelection()) {
1437        value = this.rawValue ? [].concat(_toConsumableArray(this.rawValue.slice(0, -1)), [value]) : [value];
1438      }
1439      this.updateModel(value);
1440      this.$emit('date-select', value);
1441      setTimeout(function () {
1442        return _this11.timePickerChange = false;
1443      }, 0);
1444    },
1445    toggleAMPM: function toggleAMPM(event) {
1446      var validHour = this.validateTime(this.currentHour, this.currentMinute, this.currentSecond, !this.pm);
1447      if (!validHour && (this.maxDate || this.minDate)) return;
1448      this.pm = !this.pm;
1449      this.updateModelTime();
1450      event.preventDefault();
1451    },
1452    clearTimePickerTimer: function clearTimePickerTimer() {
1453      if (this.timePickerTimer) {
1454        clearInterval(this.timePickerTimer);
1455      }
1456    },
1457    onMonthSelect: function onMonthSelect(event, _ref) {
1458      _ref.month;
1459        var index = _ref.index;
1460      if (this.view === 'month') {
1461        this.onDateSelect(event, {
1462          year: this.currentYear,
1463          month: index,
1464          day: 1,
1465          selectable: true
1466        });
1467      } else {
1468        this.currentMonth = index;
1469        this.currentView = 'date';
1470        this.$emit('month-change', {
1471          month: this.currentMonth + 1,
1472          year: this.currentYear
1473        });
1474      }
1475      setTimeout(this.updateFocus, 0);
1476    },
1477    onYearSelect: function onYearSelect(event, year) {
1478      if (this.view === 'year') {
1479        this.onDateSelect(event, {
1480          year: year.value,
1481          month: 0,
1482          day: 1,
1483          selectable: true
1484        });
1485      } else {
1486        this.currentYear = year.value;
1487        this.currentView = 'month';
1488        this.$emit('year-change', {
1489          month: this.currentMonth,
1490          year: this.currentYear
1491        });
1492      }
1493      setTimeout(this.updateFocus, 0);
1494    },
1495    updateCurrentMetaData: function updateCurrentMetaData() {
1496      var viewDate = this.viewDate;
1497      this.currentMonth = viewDate.getMonth();
1498      this.currentYear = viewDate.getFullYear();
1499      if (this.showTime || this.timeOnly) {
1500        var timeDate = viewDate;
1501        if (this.isRangeSelection() && this.rawValue && this.rawValue[this.focusedDateIndex]) {
1502          timeDate = this.rawValue[this.focusedDateIndex];
1503        }
1504        this.updateCurrentTimeMeta(timeDate);
1505      }
1506    },
1507    isValidSelection: function isValidSelection(value) {
1508      var _this12 = this;
1509      if (value == null) {
1510        return true;
1511      }
1512      var isValid = true;
1513      if (this.isSingleSelection()) {
1514        if (!this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false)) {
1515          isValid = false;
1516        }
1517      } else if (value.every(function (v) {
1518        return _this12.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false);
1519      })) {
1520        if (this.isRangeSelection()) {
1521          isValid = value.length > 1 && value[1] >= value[0];
1522        }
1523      }
1524      return isValid;
1525    },
1526    parseValue: function parseValue(text) {
1527      if (!text || text.trim().length === 0) {
1528        return null;
1529      }
1530      var value;
1531      if (this.isSingleSelection()) {
1532        value = this.parseDateTime(text);
1533      } else if (this.isMultipleSelection()) {
1534        var tokens = text.split(',');
1535        value = [];
1536        var _iterator3 = _createForOfIteratorHelper(tokens),
1537          _step3;
1538        try {
1539          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1540            var token = _step3.value;
1541            value.push(this.parseDateTime(token.trim()));
1542          }
1543        } catch (err) {
1544          _iterator3.e(err);
1545        } finally {
1546          _iterator3.f();
1547        }
1548      } else if (this.isRangeSelection()) {
1549        var _tokens = text.split(' - ');
1550        value = [];
1551        for (var i = 0; i < _tokens.length; i++) {
1552          value[i] = this.parseDateTime(_tokens[i].trim());
1553        }
1554      }
1555      return value;
1556    },
1557    safeParse: function safeParse(value) {
1558      try {
1559        return this.parseValue(value);
1560      } catch (e) {
1561        var date = new Date(value);
1562        return !isNaN(date.getTime()) ? this.isSingleSelection() ? date : [date] : null;
1563      }
1564    },
1565    parseValueForComparison: function parseValueForComparison(value) {
1566      if (typeof value === 'string') {
1567        var parsedValue = this.parseValue(value);
1568        return this.isSingleSelection() ? parsedValue : parsedValue[0];
1569      }
1570      return value;
1571    },
1572    parseDateTime: function parseDateTime(text) {
1573      var date;
1574      var amLabel = this.$primevue.config.locale.am;
1575      var pmLabel = this.$primevue.config.locale.pm;
1576      var ampmPattern = "".concat(amLabel, "|").concat(pmLabel, "|am|pm");
1577      var parts = text.match(new RegExp("(?:(.+?) )?(\\d{2}:\\d{2}(?::\\d{2})?)(?:\\s+(".concat(ampmPattern, "))?"), 'i'));
1578      if (this.timeOnly) {
1579        date = new Date();
1580        this.populateTime(date, parts[2], parts[3]);
1581      } else {
1582        var dateFormat = this.datePattern;
1583        if (this.showTime) {
1584          date = this.parseDate(parts[1], dateFormat);
1585          this.populateTime(date, parts[2], parts[3]);
1586        } else {
1587          date = this.parseDate(text, dateFormat);
1588        }
1589      }
1590      return date;
1591    },
1592    populateTime: function populateTime(value, timeString, ampm) {
1593      if (this.hourFormat == '12' && !ampm) {
1594        throw 'Invalid Time';
1595      }
1596      this.pm = ampm.toLowerCase() === this.$primevue.config.locale.pm.toLowerCase() || ampm.toLowerCase() === 'pm';
1597      var time = this.parseTime(timeString);
1598      value.setHours(time.hour);
1599      value.setMinutes(time.minute);
1600      value.setSeconds(time.second);
1601    },
1602    parseTime: function parseTime(value) {
1603      var tokens = value.split(':');
1604      var validTokenLength = this.showSeconds ? 3 : 2;
1605      var regex = /^[0-9][0-9]$/;
1606      if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || this.showSeconds && !tokens[2].match(regex)) {
1607        throw 'Invalid time';
1608      }
1609      var h = parseInt(tokens[0]);
1610      var m = parseInt(tokens[1]);
1611      var s = this.showSeconds ? parseInt(tokens[2]) : null;
1612      if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || this.hourFormat == '12' && h > 12 || this.showSeconds && (isNaN(s) || s > 59)) {
1613        throw 'Invalid time';
1614      } else {
1615        if (this.hourFormat == '12' && h !== 12 && this.pm) {
1616          h += 12;
1617        } else if (this.hourFormat == '12' && h == 12 && !this.pm) {
1618          h = 0;
1619        }
1620        return {
1621          hour: h,
1622          minute: m,
1623          second: s
1624        };
1625      }
1626    },
1627    parseDate: function parseDate(value, format) {
1628      if (format == null || value == null) {
1629        throw 'Invalid arguments';
1630      }
1631      value = _typeof(value) === 'object' ? value.toString() : value + '';
1632      if (value === '') {
1633        return null;
1634      }
1635      var iFormat,
1636        dim,
1637        extra,
1638        iValue = 0,
1639        shortYearCutoff = typeof this.shortYearCutoff !== 'string' ? this.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.shortYearCutoff, 10),
1640        year = -1,
1641        month = -1,
1642        day = -1,
1643        doy = -1,
1644        literal = false,
1645        date,
1646        lookAhead = function lookAhead(match) {
1647          var matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
1648          if (matches) {
1649            iFormat++;
1650          }
1651          return matches;
1652        },
1653        getNumber = function getNumber(match) {
1654          var isDoubled = lookAhead(match),
1655            size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,
1656            minSize = match === 'y' ? size : 1,
1657            digits = new RegExp('^\\d{' + minSize + ',' + size + '}'),
1658            num = value.substring(iValue).match(digits);
1659          if (!num) {
1660            throw 'Missing number at position ' + iValue;
1661          }
1662          iValue += num[0].length;
1663          return parseInt(num[0], 10);
1664        },
1665        getName = function getName(match, shortNames, longNames) {
1666          var index = -1;
1667          var arr = lookAhead(match) ? longNames : shortNames;
1668          var names = [];
1669          for (var i = 0; i < arr.length; i++) {
1670            names.push([i, arr[i]]);
1671          }
1672          names.sort(function (a, b) {
1673            return -(a[1].length - b[1].length);
1674          });
1675          for (var _i = 0; _i < names.length; _i++) {
1676            var name = names[_i][1];
1677            if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
1678              index = names[_i][0];
1679              iValue += name.length;
1680              break;
1681            }
1682          }
1683          if (index !== -1) {
1684            return index + 1;
1685          } else {
1686            throw 'Unknown name at position ' + iValue;
1687          }
1688        },
1689        checkLiteral = function checkLiteral() {
1690          if (value.charAt(iValue) !== format.charAt(iFormat)) {
1691            throw 'Unexpected literal at position ' + iValue;
1692          }
1693          iValue++;
1694        };
1695      if (this.currentView === 'month') {
1696        day = 1;
1697      }
1698      if (this.currentView === 'year') {
1699        day = 1;
1700        month = 1;
1701      }
1702      for (iFormat = 0; iFormat < format.length; iFormat++) {
1703        if (literal) {
1704          if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
1705            literal = false;
1706          } else {
1707            checkLiteral();
1708          }
1709        } else {
1710          switch (format.charAt(iFormat)) {
1711            case 'd':
1712              day = getNumber('d');
1713              break;
1714            case 'D':
1715              getName('D', this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);
1716              break;
1717            case 'o':
1718              doy = getNumber('o');
1719              break;
1720            case 'm':
1721              month = getNumber('m');
1722              break;
1723            case 'M':
1724              month = getName('M', this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);
1725              break;
1726            case 'y':
1727              year = getNumber('y');
1728              break;
1729            case '@':
1730              date = new Date(getNumber('@'));
1731              year = date.getFullYear();
1732              month = date.getMonth() + 1;
1733              day = date.getDate();
1734              break;
1735            case '!':
1736              date = new Date((getNumber('!') - this.ticksTo1970) / 10000);
1737              year = date.getFullYear();
1738              month = date.getMonth() + 1;
1739              day = date.getDate();
1740              break;
1741            case "'":
1742              if (lookAhead("'")) {
1743                checkLiteral();
1744              } else {
1745                literal = true;
1746              }
1747              break;
1748            default:
1749              checkLiteral();
1750          }
1751        }
1752      }
1753      if (iValue < value.length) {
1754        extra = value.substr(iValue);
1755        if (!/^\s+/.test(extra)) {
1756          throw 'Extra/unparsed characters found in date: ' + extra;
1757        }
1758      }
1759      if (year === -1) {
1760        year = new Date().getFullYear();
1761      } else if (year < 100) {
1762        year += new Date().getFullYear() - new Date().getFullYear() % 100 + (year <= shortYearCutoff ? 0 : -100);
1763      }
1764      if (doy > -1) {
1765        month = 1;
1766        day = doy;
1767        do {
1768          dim = this.getDaysCountInMonth(month - 1, year);
1769          if (day <= dim) {
1770            break;
1771          }
1772          month++;
1773          day -= dim;
1774          // eslint-disable-next-line
1775        } while (true);
1776      }
1777      date = this.daylightSavingAdjust(new Date(year, month - 1, day));
1778      if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
1779        throw 'Invalid date'; // E.g. 31/02/00
1780      }
1781      return date;
1782    },
1783    getWeekNumber: function getWeekNumber(date) {
1784      var checkDate = new Date(date.getTime());
1785      checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
1786      var time = checkDate.getTime();
1787      checkDate.setMonth(0);
1788      checkDate.setDate(1);
1789      return Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1;
1790    },
1791    onDateCellKeydown: function onDateCellKeydown(event, date, groupIndex) {
1792      event.preventDefault();
1793      var cellContent = event.currentTarget;
1794      var cell = cellContent.parentElement;
1795      var cellIndex = getIndex(cell);
1796      switch (event.code) {
1797        case 'ArrowDown':
1798          {
1799            cellContent.tabIndex = '-1';
1800            var nextRow = cell.parentElement.nextElementSibling;
1801            if (nextRow) {
1802              var tableRowIndex = getIndex(cell.parentElement);
1803              var tableRows = Array.from(cell.parentElement.parentElement.children);
1804              var nextTableRows = tableRows.slice(tableRowIndex + 1);
1805              var hasNextFocusableDate = nextTableRows.find(function (el) {
1806                var focusCell = el.children[cellIndex].children[0];
1807                return !getAttribute(focusCell, 'data-p-disabled');
1808              });
1809              if (hasNextFocusableDate) {
1810                var focusCell = hasNextFocusableDate.children[cellIndex].children[0];
1811                focusCell.tabIndex = '0';
1812                focusCell.focus();
1813              } else {
1814                this.navigationState = {
1815                  backward: false
1816                };
1817                this.navForward(event);
1818              }
1819            } else {
1820              this.navigationState = {
1821                backward: false
1822              };
1823              this.navForward(event);
1824            }
1825            event.preventDefault();
1826            break;
1827          }
1828        case 'ArrowUp':
1829          {
1830            cellContent.tabIndex = '-1';
1831            if (event.altKey) {
1832              this.overlayVisible = false;
1833              this.focused = true;
1834            } else {
1835              var prevRow = cell.parentElement.previousElementSibling;
1836              if (prevRow) {
1837                var _tableRowIndex = getIndex(cell.parentElement);
1838                var _tableRows = Array.from(cell.parentElement.parentElement.children);
1839                var prevTableRows = _tableRows.slice(0, _tableRowIndex).reverse();
1840                var _hasNextFocusableDate = prevTableRows.find(function (el) {
1841                  var focusCell = el.children[cellIndex].children[0];
1842                  return !getAttribute(focusCell, 'data-p-disabled');
1843                });
1844                if (_hasNextFocusableDate) {
1845                  var _focusCell = _hasNextFocusableDate.children[cellIndex].children[0];
1846                  _focusCell.tabIndex = '0';
1847                  _focusCell.focus();
1848                } else {
1849                  this.navigationState = {
1850                    backward: true
1851                  };
1852                  this.navBackward(event);
1853                }
1854              } else {
1855                this.navigationState = {
1856                  backward: true
1857                };
1858                this.navBackward(event);
1859              }
1860            }
1861            event.preventDefault();
1862            break;
1863          }
1864        case 'ArrowLeft':
1865          {
1866            cellContent.tabIndex = '-1';
1867            var prevCell = cell.previousElementSibling;
1868            if (prevCell) {
1869              var cells = Array.from(cell.parentElement.children);
1870              var prevCells = cells.slice(0, cellIndex).reverse();
1871              var _hasNextFocusableDate2 = prevCells.find(function (el) {
1872                var focusCell = el.children[0];
1873                return !getAttribute(focusCell, 'data-p-disabled');
1874              });
1875              if (_hasNextFocusableDate2) {
1876                var _focusCell2 = _hasNextFocusableDate2.children[0];
1877                _focusCell2.tabIndex = '0';
1878                _focusCell2.focus();
1879              } else {
1880                this.navigateToMonth(event, true, groupIndex);
1881              }
1882            } else {
1883              this.navigateToMonth(event, true, groupIndex);
1884            }
1885            event.preventDefault();
1886            break;
1887          }
1888        case 'ArrowRight':
1889          {
1890            cellContent.tabIndex = '-1';
1891            var nextCell = cell.nextElementSibling;
1892            if (nextCell) {
1893              var _cells = Array.from(cell.parentElement.children);
1894              var nextCells = _cells.slice(cellIndex + 1);
1895              var _hasNextFocusableDate3 = nextCells.find(function (el) {
1896                var focusCell = el.children[0];
1897                return !getAttribute(focusCell, 'data-p-disabled');
1898              });
1899              if (_hasNextFocusableDate3) {
1900                var _focusCell3 = _hasNextFocusableDate3.children[0];
1901                _focusCell3.tabIndex = '0';
1902                _focusCell3.focus();
1903              } else {
1904                this.navigateToMonth(event, false, groupIndex);
1905              }
1906            } else {
1907              this.navigateToMonth(event, false, groupIndex);
1908            }
1909            event.preventDefault();
1910            break;
1911          }
1912        case 'Enter':
1913        case 'NumpadEnter':
1914        case 'Space':
1915          {
1916            this.onDateSelect(event, date);
1917            event.preventDefault();
1918            break;
1919          }
1920        case 'Escape':
1921          {
1922            this.overlayVisible = false;
1923            event.preventDefault();
1924            break;
1925          }
1926        case 'Tab':
1927          {
1928            if (!this.inline) {
1929              this.trapFocus(event);
1930            }
1931            break;
1932          }
1933        case 'Home':
1934          {
1935            cellContent.tabIndex = '-1';
1936            var currentRow = cell.parentElement;
1937            var _focusCell4 = currentRow.children[0].children[0];
1938            if (getAttribute(_focusCell4, 'data-p-disabled')) {
1939              this.navigateToMonth(event, true, groupIndex);
1940            } else {
1941              _focusCell4.tabIndex = '0';
1942              _focusCell4.focus();
1943            }
1944            event.preventDefault();
1945            break;
1946          }
1947        case 'End':
1948          {
1949            cellContent.tabIndex = '-1';
1950            var _currentRow = cell.parentElement;
1951            var _focusCell5 = _currentRow.children[_currentRow.children.length - 1].children[0];
1952            if (getAttribute(_focusCell5, 'data-p-disabled')) {
1953              this.navigateToMonth(event, false, groupIndex);
1954            } else {
1955              _focusCell5.tabIndex = '0';
1956              _focusCell5.focus();
1957            }
1958            event.preventDefault();
1959            break;
1960          }
1961        case 'PageUp':
1962          {
1963            cellContent.tabIndex = '-1';
1964            if (event.shiftKey) {
1965              this.navigationState = {
1966                backward: true
1967              };
1968              this.navBackward(event);
1969            } else this.navigateToMonth(event, true, groupIndex);
1970            event.preventDefault();
1971            break;
1972          }
1973        case 'PageDown':
1974          {
1975            cellContent.tabIndex = '-1';
1976            if (event.shiftKey) {
1977              this.navigationState = {
1978                backward: false
1979              };
1980              this.navForward(event);
1981            } else this.navigateToMonth(event, false, groupIndex);
1982            event.preventDefault();
1983            break;
1984          }
1985      }
1986    },
1987    navigateToMonth: function navigateToMonth(event, prev, groupIndex) {
1988      if (prev) {
1989        if (this.numberOfMonths === 1 || groupIndex === 0) {
1990          this.navigationState = {
1991            backward: true
1992          };
1993          this.navBackward(event);
1994        } else {
1995          var prevMonthContainer = this.overlay.children[groupIndex - 1];
1996          var cells = find(prevMonthContainer, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])');
1997          var focusCell = cells[cells.length - 1];
1998          focusCell.tabIndex = '0';
1999          focusCell.focus();
2000        }
2001      } else {
2002        if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) {
2003          this.navigationState = {
2004            backward: false
2005          };
2006          this.navForward(event);
2007        } else {
2008          var nextMonthContainer = this.overlay.children[groupIndex + 1];
2009          var _focusCell6 = findSingle(nextMonthContainer, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])');
2010          _focusCell6.tabIndex = '0';
2011          _focusCell6.focus();
2012        }
2013      }
2014    },
2015    onMonthCellKeydown: function onMonthCellKeydown(event, index) {
2016      var cell = event.currentTarget;
2017      switch (event.code) {
2018        case 'ArrowUp':
2019        case 'ArrowDown':
2020          {
2021            cell.tabIndex = '-1';
2022            var cells = cell.parentElement.children;
2023            var cellIndex = getIndex(cell);
2024            var nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 3 : cellIndex - 3];
2025            if (nextCell) {
2026              nextCell.tabIndex = '0';
2027              nextCell.focus();
2028            }
2029            event.preventDefault();
2030            break;
2031          }
2032        case 'ArrowLeft':
2033          {
2034            cell.tabIndex = '-1';
2035            var prevCell = cell.previousElementSibling;
2036            if (prevCell) {
2037              prevCell.tabIndex = '0';
2038              prevCell.focus();
2039            } else {
2040              this.navigationState = {
2041                backward: true
2042              };
2043              this.navBackward(event);
2044            }
2045            event.preventDefault();
2046            break;
2047          }
2048        case 'ArrowRight':
2049          {
2050            cell.tabIndex = '-1';
2051            var _nextCell = cell.nextElementSibling;
2052            if (_nextCell) {
2053              _nextCell.tabIndex = '0';
2054              _nextCell.focus();
2055            } else {
2056              this.navigationState = {
2057                backward: false
2058              };
2059              this.navForward(event);
2060            }
2061            event.preventDefault();
2062            break;
2063          }
2064        case 'PageUp':
2065          {
2066            if (event.shiftKey) return;
2067            this.navigationState = {
2068              backward: true
2069            };
2070            this.navBackward(event);
2071            break;
2072          }
2073        case 'PageDown':
2074          {
2075            if (event.shiftKey) return;
2076            this.navigationState = {
2077              backward: false
2078            };
2079            this.navForward(event);
2080            break;
2081          }
2082        case 'Enter':
2083        case 'NumpadEnter':
2084        case 'Space':
2085          {
2086            this.onMonthSelect(event, index);
2087            event.preventDefault();
2088            break;
2089          }
2090        case 'Escape':
2091          {
2092            this.overlayVisible = false;
2093            event.preventDefault();
2094            break;
2095          }
2096        case 'Tab':
2097          {
2098            this.trapFocus(event);
2099            break;
2100          }
2101      }
2102    },
2103    onYearCellKeydown: function onYearCellKeydown(event, index) {
2104      var cell = event.currentTarget;
2105      switch (event.code) {
2106        case 'ArrowUp':
2107        case 'ArrowDown':
2108          {
2109            cell.tabIndex = '-1';
2110            var cells = cell.parentElement.children;
2111            var cellIndex = getIndex(cell);
2112            var nextCell = cells[event.code === 'ArrowDown' ? cellIndex + 2 : cellIndex - 2];
2113            if (nextCell) {
2114              nextCell.tabIndex = '0';
2115              nextCell.focus();
2116            }
2117            event.preventDefault();
2118            break;
2119          }
2120        case 'ArrowLeft':
2121          {
2122            cell.tabIndex = '-1';
2123            var prevCell = cell.previousElementSibling;
2124            if (prevCell) {
2125              prevCell.tabIndex = '0';
2126              prevCell.focus();
2127            } else {
2128              this.navigationState = {
2129                backward: true
2130              };
2131              this.navBackward(event);
2132            }
2133            event.preventDefault();
2134            break;
2135          }
2136        case 'ArrowRight':
2137          {
2138            cell.tabIndex = '-1';
2139            var _nextCell2 = cell.nextElementSibling;
2140            if (_nextCell2) {
2141              _nextCell2.tabIndex = '0';
2142              _nextCell2.focus();
2143            } else {
2144              this.navigationState = {
2145                backward: false
2146              };
2147              this.navForward(event);
2148            }
2149            event.preventDefault();
2150            break;
2151          }
2152        case 'PageUp':
2153          {
2154            if (event.shiftKey) return;
2155            this.navigationState = {
2156              backward: true
2157            };
2158            this.navBackward(event);
2159            break;
2160          }
2161        case 'PageDown':
2162          {
2163            if (event.shiftKey) return;
2164            this.navigationState = {
2165              backward: false
2166            };
2167            this.navForward(event);
2168            break;
2169          }
2170        case 'Enter':
2171        case 'NumpadEnter':
2172        case 'Space':
2173          {
2174            this.onYearSelect(event, index);
2175            event.preventDefault();
2176            break;
2177          }
2178        case 'Escape':
2179          {
2180            this.overlayVisible = false;
2181            event.preventDefault();
2182            break;
2183          }
2184        case 'Tab':
2185          {
2186            this.trapFocus(event);
2187            break;
2188          }
2189      }
2190    },
2191    updateFocus: function updateFocus() {
2192      var cell;
2193      if (this.navigationState) {
2194        if (this.navigationState.button) {
2195          this.initFocusableCell();
2196          if (this.navigationState.backward) {
2197            this.previousButton && this.previousButton.focus();
2198          } else {
2199            this.nextButton && this.nextButton.focus();
2200          }
2201        } else {
2202          if (this.navigationState.backward) {
2203            var cells;
2204            if (this.currentView === 'month') {
2205              cells = find(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])');
2206            } else if (this.currentView === 'year') {
2207              cells = find(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])');
2208            } else {
2209              cells = find(this.overlay, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])');
2210            }
2211            if (cells && cells.length > 0) {
2212              cell = cells[cells.length - 1];
2213            }
2214          } else {
2215            if (this.currentView === 'month') {
2216              cell = findSingle(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])');
2217            } else if (this.currentView === 'year') {
2218              cell = findSingle(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])');
2219            } else {
2220              cell = findSingle(this.overlay, 'table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])');
2221            }
2222          }
2223          if (cell) {
2224            cell.tabIndex = '0';
2225            cell.focus();
2226          }
2227        }
2228        this.navigationState = null;
2229      } else {
2230        this.initFocusableCell();
2231      }
2232    },
2233    initFocusableCell: function initFocusableCell() {
2234      var cell;
2235      if (this.currentView === 'month') {
2236        var cells = find(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"]');
2237        var selectedCell = findSingle(this.overlay, '[data-pc-section="monthview"] [data-pc-section="month"][data-p-selected="true"]');
2238        cells.forEach(function (cell) {
2239          return cell.tabIndex = -1;
2240        });
2241        cell = selectedCell || cells[0];
2242      } else if (this.currentView === 'year') {
2243        var _cells2 = find(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"]');
2244        var _selectedCell = findSingle(this.overlay, '[data-pc-section="yearview"] [data-pc-section="year"][data-p-selected="true"]');
2245        _cells2.forEach(function (cell) {
2246          return cell.tabIndex = -1;
2247        });
2248        cell = _selectedCell || _cells2[0];
2249      } else {
2250        cell = findSingle(this.overlay, 'span[data-p-selected="true"]');
2251        if (!cell) {
2252          var todayCell = findSingle(this.overlay, 'td[data-p-today="true"] span:not([data-p-disabled="true"]):not([data-p-ink="true"])');
2253          if (todayCell) cell = todayCell;else cell = findSingle(this.overlay, '.p-datepicker-calendar td span:not([data-p-disabled="true"]):not([data-p-ink="true"])');
2254        }
2255      }
2256      if (cell) {
2257        cell.tabIndex = '0';
2258        if (!this.preventFocus && this.overlay && !this.overlay.contains(document.activeElement)) {
2259          cell.focus();
2260        }
2261        this.preventFocus = false;
2262      }
2263    },
2264    trapFocus: function trapFocus(event) {
2265      event.preventDefault();
2266      var focusableElements = getFocusableElements(this.overlay);
2267      if (focusableElements && focusableElements.length > 0) {
2268        if (!document.activeElement) {
2269          focusableElements[0].focus();
2270        } else {
2271          var focusedIndex = focusableElements.indexOf(document.activeElement);
2272          if (event.shiftKey) {
2273            if (focusedIndex === -1 || focusedIndex === 0) focusableElements[focusableElements.length - 1].focus();else focusableElements[focusedIndex - 1].focus();
2274          } else {
2275            if (focusedIndex === -1) {
2276              if (this.timeOnly) {
2277                focusableElements[0].focus();
2278              } else {
2279                var elementIndex = focusableElements.findIndex(function (el) {
2280                  return el.tagName === 'SPAN';
2281                });
2282                if (elementIndex === -1) {
2283                  elementIndex = focusableElements.findIndex(function (el) {
2284                    return el.tagName === 'BUTTON';
2285                  });
2286                }
2287                if (elementIndex !== -1) {
2288                  focusableElements[elementIndex].focus();
2289                } else {
2290                  focusableElements[0].focus();
2291                }
2292              }
2293            } else if (focusedIndex === focusableElements.length - 1) {
2294              focusableElements[0].focus();
2295            } else {
2296              focusableElements[focusedIndex + 1].focus();
2297            }
2298          }
2299        }
2300      }
2301    },
2302    onContainerButtonKeydown: function onContainerButtonKeydown(event) {
2303      switch (event.code) {
2304        case 'Tab':
2305          this.trapFocus(event);
2306          break;
2307        case 'Escape':
2308          this.overlayVisible = false;
2309          event.preventDefault();
2310          break;
2311      }
2312      this.$emit('keydown', event);
2313    },
2314    onInput: function onInput(event) {
2315      try {
2316        var _this$$refs$clearIcon3;
2317        this.selectionStart = this.input.selectionStart;
2318        this.selectionEnd = this.input.selectionEnd;
2319        if ((_this$$refs$clearIcon3 = this.$refs.clearIcon) !== null && _this$$refs$clearIcon3 !== void 0 && (_this$$refs$clearIcon3 = _this$$refs$clearIcon3.$el) !== null && _this$$refs$clearIcon3 !== void 0 && _this$$refs$clearIcon3.style) {
2320          this.$refs.clearIcon.$el.style.display = isEmpty(event.target.value) ? 'none' : 'block';
2321        }
2322        var value = this.parseValue(event.target.value);
2323        if (this.isValidSelection(value)) {
2324          this.typeUpdate = true;
2325          this.updateModel(this.updateModelType === 'string' ? this.formatValue(value) : value);
2326          this.updateCurrentMetaData();
2327        }
2328      } catch (err) {
2329        /* NoOp */
2330      }
2331      this.$emit('input', event);
2332    },
2333    onInputClick: function onInputClick() {
2334      if (this.showOnFocus && this.isEnabled() && !this.overlayVisible) {
2335        this.overlayVisible = true;
2336      }
2337    },
2338    onFocus: function onFocus(event) {
2339      if (this.showOnFocus && this.isEnabled()) {
2340        this.overlayVisible = true;
2341      }
2342      this.focused = true;
2343      this.$emit('focus', event);
2344    },
2345    onBlur: function onBlur(event) {
2346      var _this$formField$onBlu, _this$formField, _this$$refs$clearIcon4;
2347      this.$emit('blur', {
2348        originalEvent: event,
2349        value: event.target.value
2350      });
2351      (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField);
2352      this.focused = false;
2353      event.target.value = this.formatValue(this.rawValue);
2354      if ((_this$$refs$clearIcon4 = this.$refs.clearIcon) !== null && _this$$refs$clearIcon4 !== void 0 && (_this$$refs$clearIcon4 = _this$$refs$clearIcon4.$el) !== null && _this$$refs$clearIcon4 !== void 0 && _this$$refs$clearIcon4.style) {
2355        this.$refs.clearIcon.$el.style.display = isEmpty(event.target.value) ? 'none' : 'block';
2356      }
2357    },
2358    onKeyDown: function onKeyDown(event) {
2359      if (event.code === 'ArrowDown' && this.overlay) {
2360        this.trapFocus(event);
2361      } else if (event.code === 'ArrowDown' && !this.overlay) {
2362        this.overlayVisible = true;
2363      } else if (event.code === 'Escape') {
2364        if (this.overlayVisible) {
2365          this.overlayVisible = false;
2366          event.preventDefault();
2367          event.stopPropagation();
2368        }
2369      } else if (event.code === 'Tab') {
2370        if (this.overlay) {
2371          getFocusableElements(this.overlay).forEach(function (el) {
2372            return el.tabIndex = '-1';
2373          });
2374        }
2375        if (this.overlayVisible) {
2376          this.overlayVisible = false;
2377        }
2378      } else if (event.code === 'Enter') {
2379        var _event$target$value;
2380        if (this.manualInput && event.target.value !== null && ((_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.trim()) !== '') {
2381          try {
2382            var value = this.parseValue(event.target.value);
2383            if (this.isValidSelection(value)) {
2384              this.overlayVisible = false;
2385            }
2386          } catch (err) {
2387            /* NoOp */
2388          }
2389        }
2390        this.$emit('keydown', event);
2391      }
2392    },
2393    overlayRef: function overlayRef(el) {
2394      this.overlay = el;
2395    },
2396    inputRef: function inputRef(el) {
2397      this.input = el ? el.$el : undefined;
2398    },
2399    previousButtonRef: function previousButtonRef(el) {
2400      this.previousButton = el ? el.$el : undefined;
2401    },
2402    nextButtonRef: function nextButtonRef(el) {
2403      this.nextButton = el ? el.$el : undefined;
2404    },
2405    getMonthName: function getMonthName(index) {
2406      return this.$primevue.config.locale.monthNames[index];
2407    },
2408    getYear: function getYear(month) {
2409      return this.currentView === 'month' ? this.currentYear : month.year;
2410    },
2411    onClearClick: function onClearClick() {
2412      this.updateModel(null);
2413      this.overlayVisible = false;
2414    },
2415    onOverlayClick: function onOverlayClick(event) {
2416      event.stopPropagation();
2417      if (!this.inline) {
2418        OverlayEventBus.emit('overlay-click', {
2419          originalEvent: event,
2420          target: this.$el
2421        });
2422      }
2423    },
2424    onOverlayKeyDown: function onOverlayKeyDown(event) {
2425      switch (event.code) {
2426        case 'Escape':
2427          if (!this.inline) {
2428            this.input.focus();
2429            this.overlayVisible = false;
2430            event.stopPropagation();
2431          }
2432          break;
2433      }
2434    },
2435    onOverlayMouseUp: function onOverlayMouseUp(event) {
2436      this.onOverlayClick(event);
2437    },
2438    createResponsiveStyle: function createResponsiveStyle() {
2439      if (this.numberOfMonths > 1 && this.responsiveOptions && !this.isUnstyled) {
2440        if (!this.responsiveStyleElement) {
2441          var _this$$primevue;
2442          this.responsiveStyleElement = document.createElement('style');
2443          this.responsiveStyleElement.type = 'text/css';
2444          setAttribute(this.responsiveStyleElement, 'nonce', (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce);
2445          document.body.appendChild(this.responsiveStyleElement);
2446        }
2447        var innerHTML = '';
2448        if (this.responsiveOptions) {
2449          var comparer = localeComparator();
2450          var responsiveOptions = _toConsumableArray(this.responsiveOptions).filter(function (o) {
2451            return !!(o.breakpoint && o.numMonths);
2452          }).sort(function (o1, o2) {
2453            return -1 * comparer(o1.breakpoint, o2.breakpoint);
2454          });
2455          for (var i = 0; i < responsiveOptions.length; i++) {
2456            var _responsiveOptions$i = responsiveOptions[i],
2457              breakpoint = _responsiveOptions$i.breakpoint,
2458              numMonths = _responsiveOptions$i.numMonths;
2459            var styles = "\n                            .p-datepicker-panel[".concat(this.$attrSelector, "] .p-datepicker-calendar:nth-child(").concat(numMonths, ") .p-datepicker-next-button {\n                                display: inline-flex;\n                            }\n                        ");
2460            for (var j = numMonths; j < this.numberOfMonths; j++) {
2461              styles += "\n                                .p-datepicker-panel[".concat(this.$attrSelector, "] .p-datepicker-calendar:nth-child(").concat(j + 1, ") {\n                                    display: none;\n                                }\n                            ");
2462            }
2463            innerHTML += "\n                            @media screen and (max-width: ".concat(breakpoint, ") {\n                                ").concat(styles, "\n                            }\n                        ");
2464          }
2465        }
2466        this.responsiveStyleElement.innerHTML = innerHTML;
2467      }
2468    },
2469    destroyResponsiveStyleElement: function destroyResponsiveStyleElement() {
2470      if (this.responsiveStyleElement) {
2471        this.responsiveStyleElement.remove();
2472        this.responsiveStyleElement = null;
2473      }
2474    },
2475    dayDataP: function dayDataP(date) {
2476      return cn({
2477        today: date.today,
2478        'other-month': date.otherMonth,
2479        selected: this.isSelected(date),
2480        disabled: !date.selectable
2481      });
2482    }
2483  },
2484  computed: {
2485    viewDate: function viewDate() {
2486      var propValue = this.rawValue;
2487      if (propValue && Array.isArray(propValue)) {
2488        if (this.isRangeSelection()) {
2489          if (propValue.length === 0) {
2490            propValue = null;
2491          } else if (propValue.length === 1) {
2492            propValue = propValue[0];
2493          } else {
2494            var start = this.parseValueForComparison(propValue[0]);
2495            var lastVisibleMonth = new Date(start.getFullYear(), start.getMonth() + this.numberOfMonths, 1);
2496            if (!propValue[1] || propValue[1] < lastVisibleMonth) {
2497              propValue = propValue[0];
2498            } else {
2499              var end = this.parseValueForComparison(propValue[1]);
2500              propValue = new Date(end.getFullYear(), end.getMonth() - this.numberOfMonths + 1, 1);
2501            }
2502          }
2503        } else if (this.isMultipleSelection()) {
2504          propValue = propValue[propValue.length - 1];
2505        }
2506      }
2507      if (propValue && typeof propValue !== 'string') {
2508        return propValue;
2509      } else {
2510        var today = new Date();
2511        if (this.maxDate && this.maxDate < today) {
2512          return this.maxDate;
2513        }
2514        if (this.minDate && this.minDate > today) {
2515          return this.minDate;
2516        }
2517        return today;
2518      }
2519    },
2520    inputFieldValue: function inputFieldValue() {
2521      return this.formatValue(this.rawValue);
2522    },
2523    months: function months() {
2524      var months = [];
2525      for (var i = 0; i < this.numberOfMonths; i++) {
2526        var month = this.currentMonth + i;
2527        var year = this.currentYear;
2528        if (month > 11) {
2529          month = month % 11 - 1;
2530          year = year + 1;
2531        }
2532        var dates = [];
2533        var firstDay = this.getFirstDayOfMonthIndex(month, year);
2534        var daysLength = this.getDaysCountInMonth(month, year);
2535        var prevMonthDaysLength = this.getDaysCountInPrevMonth(month, year);
2536        var dayNo = 1;
2537        var today = new Date();
2538        var weekNumbers = [];
2539        var monthRows = Math.ceil((daysLength + firstDay) / 7);
2540        for (var _i2 = 0; _i2 < monthRows; _i2++) {
2541          var week = [];
2542          if (_i2 == 0) {
2543            for (var j = prevMonthDaysLength - firstDay + 1; j <= prevMonthDaysLength; j++) {
2544              var prev = this.getPreviousMonthAndYear(month, year);
2545              week.push({
2546                day: j,
2547                month: prev.month,
2548                year: prev.year,
2549                otherMonth: true,
2550                today: this.isToday(today, j, prev.month, prev.year),
2551                selectable: this.isSelectable(j, prev.month, prev.year, true)
2552              });
2553            }
2554            var remainingDaysLength = 7 - week.length;
2555            for (var _j = 0; _j < remainingDaysLength; _j++) {
2556              week.push({
2557                day: dayNo,
2558                month: month,
2559                year: year,
2560                today: this.isToday(today, dayNo, month, year),
2561                selectable: this.isSelectable(dayNo, month, year, false)
2562              });
2563              dayNo++;
2564            }
2565          } else {
2566            for (var _j2 = 0; _j2 < 7; _j2++) {
2567              if (dayNo > daysLength) {
2568                var next = this.getNextMonthAndYear(month, year);
2569                week.push({
2570                  day: dayNo - daysLength,
2571                  month: next.month,
2572                  year: next.year,
2573                  otherMonth: true,
2574                  today: this.isToday(today, dayNo - daysLength, next.month, next.year),
2575                  selectable: this.isSelectable(dayNo - daysLength, next.month, next.year, true)
2576                });
2577              } else {
2578                week.push({
2579                  day: dayNo,
2580                  month: month,
2581                  year: year,
2582                  today: this.isToday(today, dayNo, month, year),
2583                  selectable: this.isSelectable(dayNo, month, year, false)
2584                });
2585              }
2586              dayNo++;
2587            }
2588          }
2589          if (this.showWeek) {
2590            weekNumbers.push(this.getWeekNumber(new Date(week[0].year, week[0].month, week[0].day)));
2591          }
2592          dates.push(week);
2593        }
2594        months.push({
2595          month: month,
2596          year: year,
2597          dates: dates,
2598          weekNumbers: weekNumbers
2599        });
2600      }
2601      return months;
2602    },
2603    weekDays: function weekDays() {
2604      var weekDays = [];
2605      var dayIndex = this.$primevue.config.locale.firstDayOfWeek;
2606      for (var i = 0; i < 7; i++) {
2607        weekDays.push(this.$primevue.config.locale.dayNamesMin[dayIndex]);
2608        dayIndex = dayIndex == 6 ? 0 : ++dayIndex;
2609      }
2610      return weekDays;
2611    },
2612    ticksTo1970: function ticksTo1970() {
2613      return ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000;
2614    },
2615    sundayIndex: function sundayIndex() {
2616      return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0;
2617    },
2618    datePattern: function datePattern() {
2619      return this.dateFormat || this.$primevue.config.locale.dateFormat;
2620    },
2621    monthPickerValues: function monthPickerValues() {
2622      var _this13 = this;
2623      var monthPickerValues = [];
2624      var isSelectableMonth = function isSelectableMonth(baseMonth) {
2625        if (_this13.minDate) {
2626          var minMonth = _this13.minDate.getMonth();
2627          var minYear = _this13.minDate.getFullYear();
2628          if (_this13.currentYear < minYear || _this13.currentYear === minYear && baseMonth < minMonth) {
2629            return false;
2630          }
2631        }
2632        if (_this13.maxDate) {
2633          var maxMonth = _this13.maxDate.getMonth();
2634          var maxYear = _this13.maxDate.getFullYear();
2635          if (_this13.currentYear > maxYear || _this13.currentYear === maxYear && baseMonth > maxMonth) {
2636            return false;
2637          }
2638        }
2639        return true;
2640      };
2641      for (var i = 0; i <= 11; i++) {
2642        monthPickerValues.push({
2643          value: this.$primevue.config.locale.monthNamesShort[i],
2644          selectable: isSelectableMonth(i)
2645        });
2646      }
2647      return monthPickerValues;
2648    },
2649    yearPickerValues: function yearPickerValues() {
2650      var _this14 = this;
2651      var yearPickerValues = [];
2652      var base = this.currentYear - this.currentYear % 10;
2653      var isSelectableYear = function isSelectableYear(baseYear) {
2654        if (_this14.minDate) {
2655          if (_this14.minDate.getFullYear() > baseYear) return false;
2656        }
2657        if (_this14.maxDate) {
2658          if (_this14.maxDate.getFullYear() < baseYear) return false;
2659        }
2660        return true;
2661      };
2662      for (var i = 0; i < 10; i++) {
2663        yearPickerValues.push({
2664          value: base + i,
2665          selectable: isSelectableYear(base + i)
2666        });
2667      }
2668      return yearPickerValues;
2669    },
2670    formattedCurrentHour: function formattedCurrentHour() {
2671      if (this.currentHour == 0 && this.hourFormat == '12') {
2672        return this.currentHour + 12;
2673      }
2674      return this.currentHour < 10 ? '0' + this.currentHour : this.currentHour;
2675    },
2676    formattedCurrentMinute: function formattedCurrentMinute() {
2677      return this.currentMinute < 10 ? '0' + this.currentMinute : this.currentMinute;
2678    },
2679    formattedCurrentSecond: function formattedCurrentSecond() {
2680      return this.currentSecond < 10 ? '0' + this.currentSecond : this.currentSecond;
2681    },
2682    todayLabel: function todayLabel() {
2683      return this.$primevue.config.locale.today;
2684    },
2685    clearLabel: function clearLabel() {
2686      return this.$primevue.config.locale.clear;
2687    },
2688    weekHeaderLabel: function weekHeaderLabel() {
2689      return this.$primevue.config.locale.weekHeader;
2690    },
2691    monthNames: function monthNames() {
2692      return this.$primevue.config.locale.monthNames;
2693    },
2694    switchViewButtonDisabled: function switchViewButtonDisabled() {
2695      return this.numberOfMonths > 1 || this.disabled;
2696    },
2697    isClearIconVisible: function isClearIconVisible() {
2698      return this.showClear && this.rawValue != null && !this.disabled;
2699    },
2700    panelId: function panelId() {
2701      return this.$id + '_panel';
2702    },
2703    containerDataP: function containerDataP() {
2704      return cn({
2705        fluid: this.$fluid
2706      });
2707    },
2708    panelDataP: function panelDataP() {
2709      return cn(_defineProperty({
2710        inline: this.inline
2711      }, 'portal-' + this.appendTo, 'portal-' + this.appendTo));
2712    },
2713    inputIconDataP: function inputIconDataP() {
2714      return cn(_defineProperty({}, this.size, this.size));
2715    },
2716    timePickerDataP: function timePickerDataP() {
2717      return cn({
2718        'time-only': this.timeOnly
2719      });
2720    },
2721    hourIncrementCallbacks: function hourIncrementCallbacks() {
2722      var _this15 = this;
2723      return {
2724        mousedown: function mousedown(event) {
2725          return _this15.onTimePickerElementMouseDown(event, 0, 1);
2726        },
2727        mouseup: function mouseup(event) {
2728          return _this15.onTimePickerElementMouseUp(event);
2729        },
2730        mouseleave: function mouseleave() {
2731          return _this15.onTimePickerElementMouseLeave();
2732        },
2733        keydown: function keydown(event) {
2734          return _this15.onTimePickerElementKeyDown(event, 0, 1);
2735        },
2736        keyup: function keyup(event) {
2737          return _this15.onTimePickerElementKeyUp(event);
2738        }
2739      };
2740    },
2741    hourDecrementCallbacks: function hourDecrementCallbacks() {
2742      var _this16 = this;
2743      return {
2744        mousedown: function mousedown(event) {
2745          return _this16.onTimePickerElementMouseDown(event, 0, -1);
2746        },
2747        mouseup: function mouseup(event) {
2748          return _this16.onTimePickerElementMouseUp(event);
2749        },
2750        mouseleave: function mouseleave() {
2751          return _this16.onTimePickerElementMouseLeave();
2752        },
2753        keydown: function keydown(event) {
2754          return _this16.onTimePickerElementKeyDown(event, 0, -1);
2755        },
2756        keyup: function keyup(event) {
2757          return _this16.onTimePickerElementKeyUp(event);
2758        }
2759      };
2760    },
2761    minuteIncrementCallbacks: function minuteIncrementCallbacks() {
2762      var _this17 = this;
2763      return {
2764        mousedown: function mousedown(event) {
2765          return _this17.onTimePickerElementMouseDown(event, 1, 1);
2766        },
2767        mouseup: function mouseup(event) {
2768          return _this17.onTimePickerElementMouseUp(event);
2769        },
2770        mouseleave: function mouseleave() {
2771          return _this17.onTimePickerElementMouseLeave();
2772        },
2773        keydown: function keydown(event) {
2774          return _this17.onTimePickerElementKeyDown(event, 1, 1);
2775        },
2776        keyup: function keyup(event) {
2777          return _this17.onTimePickerElementKeyUp(event);
2778        }
2779      };
2780    },
2781    minuteDecrementCallbacks: function minuteDecrementCallbacks() {
2782      var _this18 = this;
2783      return {
2784        mousedown: function mousedown(event) {
2785          return _this18.onTimePickerElementMouseDown(event, 1, -1);
2786        },
2787        mouseup: function mouseup(event) {
2788          return _this18.onTimePickerElementMouseUp(event);
2789        },
2790        mouseleave: function mouseleave() {
2791          return _this18.onTimePickerElementMouseLeave();
2792        },
2793        keydown: function keydown(event) {
2794          return _this18.onTimePickerElementKeyDown(event, 1, -1);
2795        },
2796        keyup: function keyup(event) {
2797          return _this18.onTimePickerElementKeyUp(event);
2798        }
2799      };
2800    },
2801    secondIncrementCallbacks: function secondIncrementCallbacks() {
2802      var _this19 = this;
2803      return {
2804        mousedown: function mousedown(event) {
2805          return _this19.onTimePickerElementMouseDown(event, 2, 1);
2806        },
2807        mouseup: function mouseup(event) {
2808          return _this19.onTimePickerElementMouseUp(event);
2809        },
2810        mouseleave: function mouseleave() {
2811          return _this19.onTimePickerElementMouseLeave();
2812        },
2813        keydown: function keydown(event) {
2814          return _this19.onTimePickerElementKeyDown(event, 2, 1);
2815        },
2816        keyup: function keyup(event) {
2817          return _this19.onTimePickerElementKeyUp(event);
2818        }
2819      };
2820    },
2821    secondDecrementCallbacks: function secondDecrementCallbacks() {
2822      var _this20 = this;
2823      return {
2824        mousedown: function mousedown(event) {
2825          return _this20.onTimePickerElementMouseDown(event, 2, -1);
2826        },
2827        mouseup: function mouseup(event) {
2828          return _this20.onTimePickerElementMouseUp(event);
2829        },
2830        mouseleave: function mouseleave() {
2831          return _this20.onTimePickerElementMouseLeave();
2832        },
2833        keydown: function keydown(event) {
2834          return _this20.onTimePickerElementKeyDown(event, 2, -1);
2835        },
2836        keyup: function keyup(event) {
2837          return _this20.onTimePickerElementKeyUp(event);
2838        }
2839      };
2840    }
2841  },
2842  components: {
2843    InputText: InputText,
2844    Button: Button,
2845    Portal: Portal,
2846    CalendarIcon: CalendarIcon,
2847    ChevronLeftIcon: ChevronLeftIcon,
2848    ChevronRightIcon: ChevronRightIcon,
2849    ChevronUpIcon: ChevronUpIcon,
2850    ChevronDownIcon: ChevronDownIcon,
2851    TimesIcon: TimesIcon
2852  },
2853  directives: {
2854    ripple: Ripple
2855  }
2856};
2857
2858var _hoisted_1 = ["id", "data-p"];
2859var _hoisted_2 = ["disabled", "aria-label", "aria-expanded", "aria-controls"];
2860var _hoisted_3 = ["data-p"];
2861var _hoisted_4 = ["id", "role", "aria-modal", "aria-label", "data-p"];
2862var _hoisted_5 = ["disabled", "aria-label"];
2863var _hoisted_6 = ["disabled", "aria-label"];
2864var _hoisted_7 = ["disabled", "aria-label"];
2865var _hoisted_8 = ["disabled", "aria-label"];
2866var _hoisted_9 = ["data-p-disabled"];
2867var _hoisted_10 = ["abbr"];
2868var _hoisted_11 = ["data-p-disabled"];
2869var _hoisted_12 = ["aria-label", "data-p-today", "data-p-other-month"];
2870var _hoisted_13 = ["onClick", "onKeydown", "aria-selected", "aria-disabled", "data-p"];
2871var _hoisted_14 = ["onClick", "onKeydown", "data-p-disabled", "data-p-selected"];
2872var _hoisted_15 = ["onClick", "onKeydown", "data-p-disabled", "data-p-selected"];
2873var _hoisted_16 = ["data-p"];
2874function render(_ctx, _cache, $props, $setup, $data, $options) {
2875  var _component_InputText = resolveComponent("InputText");
2876  var _component_TimesIcon = resolveComponent("TimesIcon");
2877  var _component_Button = resolveComponent("Button");
2878  var _component_Portal = resolveComponent("Portal");
2879  var _directive_ripple = resolveDirective("ripple");
2880  return openBlock(), createElementBlock("span", mergeProps({
2881    ref: "container",
2882    id: _ctx.$id,
2883    "class": _ctx.cx('root'),
2884    style: _ctx.sx('root'),
2885    "data-p": $options.containerDataP
2886  }, _ctx.ptmi('root')), [!_ctx.inline ? (openBlock(), createBlock(_component_InputText, {
2887    key: 0,
2888    ref: $options.inputRef,
2889    id: _ctx.inputId,
2890    role: "combobox",
2891    "class": normalizeClass([_ctx.inputClass, _ctx.cx('pcInputText')]),
2892    style: normalizeStyle(_ctx.inputStyle),
2893    defaultValue: $options.inputFieldValue,
2894    placeholder: _ctx.placeholder,
2895    name: _ctx.name,
2896    size: _ctx.size,
2897    invalid: _ctx.invalid,
2898    variant: _ctx.variant,
2899    fluid: _ctx.fluid,
2900    required: _ctx.required,
2901    unstyled: _ctx.unstyled,
2902    autocomplete: "off",
2903    "aria-autocomplete": "none",
2904    "aria-haspopup": "dialog",
2905    "aria-expanded": $data.overlayVisible,
2906    "aria-controls": $data.overlayVisible ? $options.panelId : undefined,
2907    "aria-labelledby": _ctx.ariaLabelledby,
2908    "aria-label": _ctx.ariaLabel,
2909    inputmode: "none",
2910    disabled: _ctx.disabled,
2911    readonly: !_ctx.manualInput || _ctx.readonly,
2912    tabindex: 0,
2913    onInput: $options.onInput,
2914    onClick: $options.onInputClick,
2915    onFocus: $options.onFocus,
2916    onBlur: $options.onBlur,
2917    onKeydown: $options.onKeyDown,
2918    "data-p-has-dropdown": _ctx.showIcon && _ctx.iconDisplay === 'button' && !_ctx.inline,
2919    "data-p-has-e-icon": _ctx.showIcon && _ctx.iconDisplay === 'input' && !_ctx.inline,
2920    pt: _ctx.ptm('pcInputText')
2921  }, null, 8, ["id", "class", "style", "defaultValue", "placeholder", "name", "size", "invalid", "variant", "fluid", "required", "unstyled", "aria-expanded", "aria-controls", "aria-labelledby", "aria-label", "disabled", "readonly", "onInput", "onClick", "onFocus", "onBlur", "onKeydown", "data-p-has-dropdown", "data-p-has-e-icon", "pt"])) : createCommentVNode("", true), _ctx.showClear && !_ctx.inline ? renderSlot(_ctx.$slots, "clearicon", {
2922    key: 1,
2923    "class": normalizeClass(_ctx.cx('clearIcon')),
2924    clearCallback: $options.onClearClick
2925  }, function () {
2926    return [createVNode(_component_TimesIcon, mergeProps({
2927      ref: "clearIcon",
2928      "class": [_ctx.cx('clearIcon')],
2929      onClick: $options.onClearClick
2930    }, _ctx.ptm('clearIcon')), null, 16, ["class", "onClick"])];
2931  }) : createCommentVNode("", true), _ctx.showIcon && _ctx.iconDisplay === 'button' && !_ctx.inline ? renderSlot(_ctx.$slots, "dropdownbutton", {
2932    key: 2,
2933    toggleCallback: $options.onButtonClick
2934  }, function () {
2935    return [createElementVNode("button", mergeProps({
2936      "class": _ctx.cx('dropdown'),
2937      disabled: _ctx.disabled,
2938      onClick: _cache[0] || (_cache[0] = function () {
2939        return $options.onButtonClick && $options.onButtonClick.apply($options, arguments);
2940      }),
2941      type: "button",
2942      "aria-label": _ctx.$primevue.config.locale.chooseDate,
2943      "aria-haspopup": "dialog",
2944      "aria-expanded": $data.overlayVisible,
2945      "aria-controls": $options.panelId
2946    }, _ctx.ptm('dropdown')), [renderSlot(_ctx.$slots, "dropdownicon", {
2947      "class": normalizeClass(_ctx.icon)
2948    }, function () {
2949      return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? 'span' : 'CalendarIcon'), mergeProps({
2950        "class": _ctx.icon
2951      }, _ctx.ptm('dropdownIcon')), null, 16, ["class"]))];
2952    })], 16, _hoisted_2)];
2953  }) : _ctx.showIcon && _ctx.iconDisplay === 'input' && !_ctx.inline ? (openBlock(), createElementBlock(Fragment, {
2954    key: 3
2955  }, [_ctx.$slots.inputicon || _ctx.showIcon ? (openBlock(), createElementBlock("span", mergeProps({
2956    key: 0,
2957    "class": _ctx.cx('inputIconContainer'),
2958    "data-p": $options.inputIconDataP
2959  }, _ctx.ptm('inputIconContainer')), [renderSlot(_ctx.$slots, "inputicon", {
2960    "class": normalizeClass(_ctx.cx('inputIcon')),
2961    clickCallback: $options.onButtonClick
2962  }, function () {
2963    return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? 'i' : 'CalendarIcon'), mergeProps({
2964      "class": [_ctx.icon, _ctx.cx('inputIcon')],
2965      onClick: $options.onButtonClick
2966    }, _ctx.ptm('inputicon')), null, 16, ["class", "onClick"]))];
2967  })], 16, _hoisted_3)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createVNode(_component_Portal, {
2968    appendTo: _ctx.appendTo,
2969    disabled: _ctx.inline
2970  }, {
2971    "default": withCtx(function () {
2972      return [createVNode(Transition, mergeProps({
2973        name: "p-anchored-overlay",
2974        onEnter: _cache[58] || (_cache[58] = function ($event) {
2975          return $options.onOverlayEnter($event);
2976        }),
2977        onAfterEnter: $options.onOverlayEnterComplete,
2978        onAfterLeave: $options.onOverlayAfterLeave,
2979        onLeave: $options.onOverlayLeave
2980      }, _ctx.ptm('transition')), {
2981        "default": withCtx(function () {
2982          return [_ctx.inline || $data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({
2983            key: 0,
2984            ref: $options.overlayRef,
2985            id: $options.panelId,
2986            "class": [_ctx.cx('panel'), _ctx.panelClass],
2987            style: _ctx.panelStyle,
2988            role: _ctx.inline ? null : 'dialog',
2989            "aria-modal": _ctx.inline ? null : 'true',
2990            "aria-label": _ctx.$primevue.config.locale.chooseDate,
2991            onClick: _cache[55] || (_cache[55] = function () {
2992              return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
2993            }),
2994            onKeydown: _cache[56] || (_cache[56] = function () {
2995              return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
2996            }),
2997            onMouseup: _cache[57] || (_cache[57] = function () {
2998              return $options.onOverlayMouseUp && $options.onOverlayMouseUp.apply($options, arguments);
2999            }),
3000            "data-p": $options.panelDataP
3001          }, _ctx.ptm('panel')), [!_ctx.timeOnly ? (openBlock(), createElementBlock(Fragment, {
3002            key: 0
3003          }, [createElementVNode("div", mergeProps({
3004            "class": _ctx.cx('calendarContainer')
3005          }, _ctx.ptm('calendarContainer')), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.months, function (month, groupIndex) {
3006            return openBlock(), createElementBlock("div", mergeProps({
3007              key: month.month + month.year,
3008              "class": _ctx.cx('calendar')
3009            }, {
3010              ref_for: true
3011            }, _ctx.ptm('calendar')), [createElementVNode("div", mergeProps({
3012              "class": _ctx.cx('header')
3013            }, {
3014              ref_for: true
3015            }, _ctx.ptm('header')), [renderSlot(_ctx.$slots, "header"), renderSlot(_ctx.$slots, "prevbutton", {
3016              actionCallback: function actionCallback(event) {
3017                return $options.onPrevButtonClick(event);
3018              },
3019              keydownCallback: function keydownCallback(event) {
3020                return $options.onContainerButtonKeydown(event);
3021              }
3022            }, function () {
3023              return [withDirectives(createVNode(_component_Button, mergeProps({
3024                ref_for: true,
3025                ref: $options.previousButtonRef,
3026                "class": _ctx.cx('pcPrevButton'),
3027                disabled: _ctx.disabled,
3028                "aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.prevDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.prevYear : _ctx.$primevue.config.locale.prevMonth,
3029                unstyled: _ctx.unstyled,
3030                onClick: $options.onPrevButtonClick,
3031                onKeydown: $options.onContainerButtonKeydown
3032              }, {
3033                ref_for: true
3034              }, _ctx.navigatorButtonProps, {
3035                pt: _ctx.ptm('pcPrevButton'),
3036                "data-pc-group-section": "navigator"
3037              }), {
3038                icon: withCtx(function (slotProps) {
3039                  return [renderSlot(_ctx.$slots, "previcon", {}, function () {
3040                    return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon ? 'span' : 'ChevronLeftIcon'), mergeProps({
3041                      "class": [_ctx.prevIcon, slotProps["class"]]
3042                    }, {
3043                      ref_for: true
3044                    }, _ctx.ptm('pcPrevButton')['icon']), null, 16, ["class"]))];
3045                  })];
3046                }),
3047                _: 3
3048              }, 16, ["class", "disabled", "aria-label", "unstyled", "onClick", "onKeydown", "pt"]), [[vShow, groupIndex === 0]])];
3049            }), createElementVNode("div", mergeProps({
3050              "class": _ctx.cx('title')
3051            }, {
3052              ref_for: true
3053            }, _ctx.ptm('title')), [_ctx.$primevue.config.locale.showMonthAfterYear ? (openBlock(), createElementBlock(Fragment, {
3054              key: 0
3055            }, [$data.currentView !== 'year' ? (openBlock(), createElementBlock("button", mergeProps({
3056              key: 0,
3057              type: "button",
3058              onClick: _cache[1] || (_cache[1] = function () {
3059                return $options.switchToYearView && $options.switchToYearView.apply($options, arguments);
3060              }),
3061              onKeydown: _cache[2] || (_cache[2] = function () {
3062                return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments);
3063              }),
3064              "class": _ctx.cx('selectYear'),
3065              disabled: $options.switchViewButtonDisabled,
3066              "aria-label": _ctx.$primevue.config.locale.chooseYear
3067            }, {
3068              ref_for: true
3069            }, _ctx.ptm('selectYear'), {
3070              "data-pc-group-section": "view"
3071            }), toDisplayString($options.getYear(month)), 17, _hoisted_5)) : createCommentVNode("", true), $data.currentView === 'date' ? (openBlock(), createElementBlock("button", mergeProps({
3072              key: 1,
3073              type: "button",
3074              onClick: _cache[3] || (_cache[3] = function () {
3075                return $options.switchToMonthView && $options.switchToMonthView.apply($options, arguments);
3076              }),
3077              onKeydown: _cache[4] || (_cache[4] = function () {
3078                return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments);
3079              }),
3080              "class": _ctx.cx('selectMonth'),
3081              disabled: $options.switchViewButtonDisabled,
3082              "aria-label": _ctx.$primevue.config.locale.chooseMonth
3083            }, {
3084              ref_for: true
3085            }, _ctx.ptm('selectMonth'), {
3086              "data-pc-group-section": "view"
3087            }), toDisplayString($options.getMonthName(month.month)), 17, _hoisted_6)) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock(Fragment, {
3088              key: 1
3089            }, [$data.currentView === 'date' ? (openBlock(), createElementBlock("button", mergeProps({
3090              key: 0,
3091              type: "button",
3092              onClick: _cache[5] || (_cache[5] = function () {
3093                return $options.switchToMonthView && $options.switchToMonthView.apply($options, arguments);
3094              }),
3095              onKeydown: _cache[6] || (_cache[6] = function () {
3096                return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments);
3097              }),
3098              "class": _ctx.cx('selectMonth'),
3099              disabled: $options.switchViewButtonDisabled,
3100              "aria-label": _ctx.$primevue.config.locale.chooseMonth
3101            }, {
3102              ref_for: true
3103            }, _ctx.ptm('selectMonth'), {
3104              "data-pc-group-section": "view"
3105            }), toDisplayString($options.getMonthName(month.month)), 17, _hoisted_7)) : createCommentVNode("", true), $data.currentView !== 'year' ? (openBlock(), createElementBlock("button", mergeProps({
3106              key: 1,
3107              type: "button",
3108              onClick: _cache[7] || (_cache[7] = function () {
3109                return $options.switchToYearView && $options.switchToYearView.apply($options, arguments);
3110              }),
3111              onKeydown: _cache[8] || (_cache[8] = function () {
3112                return $options.onContainerButtonKeydown && $options.onContainerButtonKeydown.apply($options, arguments);
3113              }),
3114              "class": _ctx.cx('selectYear'),
3115              disabled: $options.switchViewButtonDisabled,
3116              "aria-label": _ctx.$primevue.config.locale.chooseYear
3117            }, {
3118              ref_for: true
3119            }, _ctx.ptm('selectYear'), {
3120              "data-pc-group-section": "view"
3121            }), toDisplayString($options.getYear(month)), 17, _hoisted_8)) : createCommentVNode("", true)], 64)), $data.currentView === 'year' ? (openBlock(), createElementBlock("span", mergeProps({
3122              key: 2,
3123              "class": _ctx.cx('decade')
3124            }, {
3125              ref_for: true
3126            }, _ctx.ptm('decade')), [renderSlot(_ctx.$slots, "decade", {
3127              years: $options.yearPickerValues
3128            }, function () {
3129              return [createTextVNode(toDisplayString($options.yearPickerValues[0].value) + " - " + toDisplayString($options.yearPickerValues[$options.yearPickerValues.length - 1].value), 1)];
3130            })], 16)) : createCommentVNode("", true)], 16), renderSlot(_ctx.$slots, "nextbutton", {
3131              actionCallback: function actionCallback(event) {
3132                return $options.onNextButtonClick(event);
3133              },
3134              keydownCallback: function keydownCallback(event) {
3135                return $options.onContainerButtonKeydown(event);
3136              }
3137            }, function () {
3138              return [withDirectives(createVNode(_component_Button, mergeProps({
3139                ref_for: true,
3140                ref: $options.nextButtonRef,
3141                "class": _ctx.cx('pcNextButton'),
3142                disabled: _ctx.disabled,
3143                "aria-label": $data.currentView === 'year' ? _ctx.$primevue.config.locale.nextDecade : $data.currentView === 'month' ? _ctx.$primevue.config.locale.nextYear : _ctx.$primevue.config.locale.nextMonth,
3144                unstyled: _ctx.unstyled,
3145                onClick: $options.onNextButtonClick,
3146                onKeydown: $options.onContainerButtonKeydown
3147              }, {
3148                ref_for: true
3149              }, _ctx.navigatorButtonProps, {
3150                pt: _ctx.ptm('pcNextButton'),
3151                "data-pc-group-section": "navigator"
3152              }), {
3153                icon: withCtx(function (slotProps) {
3154                  return [renderSlot(_ctx.$slots, "nexticon", {}, function () {
3155                    return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon ? 'span' : 'ChevronRightIcon'), mergeProps({
3156                      "class": [_ctx.nextIcon, slotProps["class"]]
3157                    }, {
3158                      ref_for: true
3159                    }, _ctx.ptm('pcNextButton')['icon']), null, 16, ["class"]))];
3160                  })];
3161                }),
3162                _: 3
3163              }, 16, ["class", "disabled", "aria-label", "unstyled", "onClick", "onKeydown", "pt"]), [[vShow, _ctx.numberOfMonths === 1 ? true : groupIndex === _ctx.numberOfMonths - 1]])];
3164            })], 16), $data.currentView === 'date' ? (openBlock(), createElementBlock("table", mergeProps({
3165              key: 0,
3166              "class": _ctx.cx('dayView'),
3167              role: "grid"
3168            }, {
3169              ref_for: true
3170            }, _ctx.ptm('dayView')), [createElementVNode("thead", mergeProps({
3171              ref_for: true
3172            }, _ctx.ptm('tableHeader')), [createElementVNode("tr", mergeProps({
3173              ref_for: true
3174            }, _ctx.ptm('tableHeaderRow')), [_ctx.showWeek ? (openBlock(), createElementBlock("th", mergeProps({
3175              key: 0,
3176              scope: "col",
3177              "class": _ctx.cx('weekHeader')
3178            }, {
3179              ref_for: true
3180            }, _ctx.ptm('weekHeader', {
3181              context: {
3182                disabled: _ctx.showWeek
3183              }
3184            }), {
3185              "data-p-disabled": _ctx.showWeek,
3186              "data-pc-group-section": "tableheadercell"
3187            }), [renderSlot(_ctx.$slots, "weekheaderlabel", {}, function () {
3188              return [createElementVNode("span", mergeProps({
3189                ref_for: true
3190              }, _ctx.ptm('weekHeaderLabel', {
3191                context: {
3192                  disabled: _ctx.showWeek
3193                }
3194              }), {
3195                "data-pc-group-section": "tableheadercelllabel"
3196              }), toDisplayString($options.weekHeaderLabel), 17)];
3197            })], 16, _hoisted_9)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList($options.weekDays, function (weekDay) {
3198              return openBlock(), createElementBlock("th", mergeProps({
3199                key: weekDay,
3200                scope: "col",
3201                abbr: weekDay
3202              }, {
3203                ref_for: true
3204              }, _ctx.ptm('tableHeaderCell'), {
3205                "data-pc-group-section": "tableheadercell",
3206                "class": _ctx.cx('weekDayCell')
3207              }), [createElementVNode("span", mergeProps({
3208                "class": _ctx.cx('weekDay')
3209              }, {
3210                ref_for: true
3211              }, _ctx.ptm('weekDay'), {
3212                "data-pc-group-section": "tableheadercelllabel"
3213              }), toDisplayString(weekDay), 17)], 16, _hoisted_10);
3214            }), 128))], 16)], 16), createElementVNode("tbody", mergeProps({
3215              ref_for: true
3216            }, _ctx.ptm('tableBody')), [(openBlock(true), createElementBlock(Fragment, null, renderList(month.dates, function (week, i) {
3217              return openBlock(), createElementBlock("tr", mergeProps({
3218                key: week[0].day + '' + week[0].month
3219              }, {
3220                ref_for: true
3221              }, _ctx.ptm('tableBodyRow')), [_ctx.showWeek ? (openBlock(), createElementBlock("td", mergeProps({
3222                key: 0,
3223                "class": _ctx.cx('weekNumber')
3224              }, {
3225                ref_for: true
3226              }, _ctx.ptm('weekNumber'), {
3227                "data-pc-group-section": "tablebodycell"
3228              }), [createElementVNode("span", mergeProps({
3229                "class": _ctx.cx('weekLabelContainer')
3230              }, {
3231                ref_for: true
3232              }, _ctx.ptm('weekLabelContainer', {
3233                context: {
3234                  disabled: _ctx.showWeek
3235                }
3236              }), {
3237                "data-p-disabled": _ctx.showWeek,
3238                "data-pc-group-section": "tablebodycelllabel"
3239              }), [renderSlot(_ctx.$slots, "weeklabel", {
3240                weekNumber: month.weekNumbers[i]
3241              }, function () {
3242                return [month.weekNumbers[i] < 10 ? (openBlock(), createElementBlock("span", mergeProps({
3243                  key: 0,
3244                  style: {
3245                    "visibility": "hidden"
3246                  }
3247                }, {
3248                  ref_for: true
3249                }, _ctx.ptm('weekLabel')), "0", 16)) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(month.weekNumbers[i]), 1)];
3250              })], 16, _hoisted_11)], 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(week, function (date) {
3251                return openBlock(), createElementBlock("td", mergeProps({
3252                  key: date.day + '' + date.month,
3253                  "aria-label": date.day,
3254                  "class": _ctx.cx('dayCell', {
3255                    date: date
3256                  })
3257                }, {
3258                  ref_for: true
3259                }, _ctx.ptm('dayCell', {
3260                  context: {
3261                    date: date,
3262                    today: date.today,
3263                    otherMonth: date.otherMonth,
3264                    selected: $options.isSelected(date),
3265                    disabled: !date.selectable
3266                  }
3267                }), {
3268                  "data-p-today": date.today,
3269                  "data-p-other-month": date.otherMonth,
3270                  "data-pc-group-section": "tablebodycell"
3271                }), [_ctx.showOtherMonths || !date.otherMonth ? withDirectives((openBlock(), createElementBlock("span", mergeProps({
3272                  key: 0,
3273                  "class": _ctx.cx('day', {
3274                    date: date
3275                  }),
3276                  onClick: function onClick($event) {
3277                    return $options.onDateSelect($event, date);
3278                  },
3279                  draggable: "false",
3280                  onKeydown: function onKeydown($event) {
3281                    return $options.onDateCellKeydown($event, date, groupIndex);
3282                  },
3283                  "aria-selected": $options.isSelected(date),
3284                  "aria-disabled": !date.selectable
3285                }, {
3286                  ref_for: true
3287                }, _ctx.ptm('day', {
3288                  context: {
3289                    date: date,
3290                    today: date.today,
3291                    otherMonth: date.otherMonth,
3292                    selected: $options.isSelected(date),
3293                    disabled: !date.selectable
3294                  }
3295                }), {
3296                  "data-p": $options.dayDataP(date),
3297                  "data-pc-group-section": "tablebodycelllabel"
3298                }), [renderSlot(_ctx.$slots, "date", {
3299                  date: date
3300                }, function () {
3301                  return [createTextVNode(toDisplayString(date.day), 1)];
3302                })], 16, _hoisted_13)), [[_directive_ripple]]) : createCommentVNode("", true), $options.isSelected(date) ? (openBlock(), createElementBlock("div", mergeProps({
3303                  key: 1,
3304                  "class": "p-hidden-accessible",
3305                  "aria-live": "polite"
3306                }, {
3307                  ref_for: true
3308                }, _ctx.ptm('hiddenSelectedDay'), {
3309                  "data-p-hidden-accessible": true
3310                }), toDisplayString(date.day), 17)) : createCommentVNode("", true)], 16, _hoisted_12);
3311              }), 128))], 16);
3312            }), 128))], 16)], 16)) : createCommentVNode("", true)], 16);
3313          }), 128))], 16), $data.currentView === 'month' ? (openBlock(), createElementBlock("div", mergeProps({
3314            key: 0,
3315            "class": _ctx.cx('monthView')
3316          }, _ctx.ptm('monthView')), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.monthPickerValues, function (m, i) {
3317            return withDirectives((openBlock(), createElementBlock("span", mergeProps({
3318              key: m,
3319              onClick: function onClick($event) {
3320                return $options.onMonthSelect($event, {
3321                  month: m,
3322                  index: i
3323                });
3324              },
3325              onKeydown: function onKeydown($event) {
3326                return $options.onMonthCellKeydown($event, {
3327                  month: m,
3328                  index: i
3329                });
3330              },
3331              "class": _ctx.cx('month', {
3332                month: m,
3333                index: i
3334              })
3335            }, {
3336              ref_for: true
3337            }, _ctx.ptm('month', {
3338              context: {
3339                month: m,
3340                monthIndex: i,
3341                selected: $options.isMonthSelected(i),
3342                disabled: !m.selectable
3343              }
3344            }), {
3345              "data-p-disabled": !m.selectable,
3346              "data-p-selected": $options.isMonthSelected(i)
3347            }), [createTextVNode(toDisplayString(m.value) + " ", 1), $options.isMonthSelected(i) ? (openBlock(), createElementBlock("div", mergeProps({
3348              key: 0,
3349              "class": "p-hidden-accessible",
3350              "aria-live": "polite"
3351            }, {
3352              ref_for: true
3353            }, _ctx.ptm('hiddenMonth'), {
3354              "data-p-hidden-accessible": true
3355            }), toDisplayString(m.value), 17)) : createCommentVNode("", true)], 16, _hoisted_14)), [[_directive_ripple]]);
3356          }), 128))], 16)) : createCommentVNode("", true), $data.currentView === 'year' ? (openBlock(), createElementBlock("div", mergeProps({
3357            key: 1,
3358            "class": _ctx.cx('yearView')
3359          }, _ctx.ptm('yearView')), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.yearPickerValues, function (y) {
3360            return withDirectives((openBlock(), createElementBlock("span", mergeProps({
3361              key: y.value,
3362              onClick: function onClick($event) {
3363                return $options.onYearSelect($event, y);
3364              },
3365              onKeydown: function onKeydown($event) {
3366                return $options.onYearCellKeydown($event, y);
3367              },
3368              "class": _ctx.cx('year', {
3369                year: y
3370              })
3371            }, {
3372              ref_for: true
3373            }, _ctx.ptm('year', {
3374              context: {
3375                year: y,
3376                selected: $options.isYearSelected(y.value),
3377                disabled: !y.selectable
3378              }
3379            }), {
3380              "data-p-disabled": !y.selectable,
3381              "data-p-selected": $options.isYearSelected(y.value)
3382            }), [createTextVNode(toDisplayString(y.value) + " ", 1), $options.isYearSelected(y.value) ? (openBlock(), createElementBlock("div", mergeProps({
3383              key: 0,
3384              "class": "p-hidden-accessible",
3385              "aria-live": "polite"
3386            }, {
3387              ref_for: true
3388            }, _ctx.ptm('hiddenYear'), {
3389              "data-p-hidden-accessible": true
3390            }), toDisplayString(y.value), 17)) : createCommentVNode("", true)], 16, _hoisted_15)), [[_directive_ripple]]);
3391          }), 128))], 16)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), (_ctx.showTime || _ctx.timeOnly) && $data.currentView === 'date' ? (openBlock(), createElementBlock("div", mergeProps({
3392            key: 1,
3393            "class": _ctx.cx('timePicker'),
3394            "data-p": $options.timePickerDataP
3395          }, _ctx.ptm('timePicker')), [createElementVNode("div", mergeProps({
3396            "class": _ctx.cx('hourPicker')
3397          }, _ctx.ptm('hourPicker'), {
3398            "data-pc-group-section": "timepickerContainer"
3399          }), [renderSlot(_ctx.$slots, "hourincrementbutton", {
3400            callbacks: $options.hourIncrementCallbacks
3401          }, function () {
3402            return [createVNode(_component_Button, mergeProps({
3403              "class": _ctx.cx('pcIncrementButton'),
3404              "aria-label": _ctx.$primevue.config.locale.nextHour,
3405              unstyled: _ctx.unstyled,
3406              onMousedown: _cache[9] || (_cache[9] = function ($event) {
3407                return $options.onTimePickerElementMouseDown($event, 0, 1);
3408              }),
3409              onMouseup: _cache[10] || (_cache[10] = function ($event) {
3410                return $options.onTimePickerElementMouseUp($event);
3411              }),
3412              onKeydown: [$options.onContainerButtonKeydown, _cache[12] || (_cache[12] = withKeys(function ($event) {
3413                return $options.onTimePickerElementMouseDown($event, 0, 1);
3414              }, ["enter"])), _cache[13] || (_cache[13] = withKeys(function ($event) {
3415                return $options.onTimePickerElementMouseDown($event, 0, 1);
3416              }, ["space"]))],
3417              onMouseleave: _cache[11] || (_cache[11] = function ($event) {
3418                return $options.onTimePickerElementMouseLeave();
3419              }),
3420              onKeyup: [_cache[14] || (_cache[14] = withKeys(function ($event) {
3421                return $options.onTimePickerElementMouseUp($event);
3422              }, ["enter"])), _cache[15] || (_cache[15] = withKeys(function ($event) {
3423                return $options.onTimePickerElementMouseUp($event);
3424              }, ["space"]))]
3425            }, _ctx.timepickerButtonProps, {
3426              pt: _ctx.ptm('pcIncrementButton'),
3427              "data-pc-group-section": "timepickerbutton"
3428            }), {
3429              icon: withCtx(function (slotProps) {
3430                return [renderSlot(_ctx.$slots, "incrementicon", {}, function () {
3431                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? 'span' : 'ChevronUpIcon'), mergeProps({
3432                    "class": [_ctx.incrementIcon, slotProps["class"]]
3433                  }, _ctx.ptm('pcIncrementButton')['icon'], {
3434                    "data-pc-group-section": "timepickerlabel"
3435                  }), null, 16, ["class"]))];
3436                })];
3437              }),
3438              _: 3
3439            }, 16, ["class", "aria-label", "unstyled", "onKeydown", "pt"])];
3440          }), createElementVNode("span", mergeProps(_ctx.ptm('hour'), {
3441            "data-pc-group-section": "timepickerlabel"
3442          }), toDisplayString($options.formattedCurrentHour), 17), renderSlot(_ctx.$slots, "hourdecrementbutton", {
3443            callbacks: $options.hourDecrementCallbacks
3444          }, function () {
3445            return [createVNode(_component_Button, mergeProps({
3446              "class": _ctx.cx('pcDecrementButton'),
3447              "aria-label": _ctx.$primevue.config.locale.prevHour,
3448              unstyled: _ctx.unstyled,
3449              onMousedown: _cache[16] || (_cache[16] = function ($event) {
3450                return $options.onTimePickerElementMouseDown($event, 0, -1);
3451              }),
3452              onMouseup: _cache[17] || (_cache[17] = function ($event) {
3453                return $options.onTimePickerElementMouseUp($event);
3454              }),
3455              onKeydown: [$options.onContainerButtonKeydown, _cache[19] || (_cache[19] = withKeys(function ($event) {
3456                return $options.onTimePickerElementMouseDown($event, 0, -1);
3457              }, ["enter"])), _cache[20] || (_cache[20] = withKeys(function ($event) {
3458                return $options.onTimePickerElementMouseDown($event, 0, -1);
3459              }, ["space"]))],
3460              onMouseleave: _cache[18] || (_cache[18] = function ($event) {
3461                return $options.onTimePickerElementMouseLeave();
3462              }),
3463              onKeyup: [_cache[21] || (_cache[21] = withKeys(function ($event) {
3464                return $options.onTimePickerElementMouseUp($event);
3465              }, ["enter"])), _cache[22] || (_cache[22] = withKeys(function ($event) {
3466                return $options.onTimePickerElementMouseUp($event);
3467              }, ["space"]))]
3468            }, _ctx.timepickerButtonProps, {
3469              pt: _ctx.ptm('pcDecrementButton'),
3470              "data-pc-group-section": "timepickerbutton"
3471            }), {
3472              icon: withCtx(function (slotProps) {
3473                return [renderSlot(_ctx.$slots, "decrementicon", {}, function () {
3474                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
3475                    "class": [_ctx.decrementIcon, slotProps["class"]]
3476                  }, _ctx.ptm('pcDecrementButton')['icon'], {
3477                    "data-pc-group-section": "timepickerlabel"
3478                  }), null, 16, ["class"]))];
3479                })];
3480              }),
3481              _: 3
3482            }, 16, ["class", "aria-label", "unstyled", "onKeydown", "pt"])];
3483          })], 16), createElementVNode("div", mergeProps(_ctx.ptm('separatorContainer'), {
3484            "data-pc-group-section": "timepickerContainer"
3485          }), [createElementVNode("span", mergeProps(_ctx.ptm('separator'), {
3486            "data-pc-group-section": "timepickerlabel"
3487          }), toDisplayString(_ctx.timeSeparator), 17)], 16), createElementVNode("div", mergeProps({
3488            "class": _ctx.cx('minutePicker')
3489          }, _ctx.ptm('minutePicker'), {
3490            "data-pc-group-section": "timepickerContainer"
3491          }), [renderSlot(_ctx.$slots, "minuteincrementbutton", {
3492            callbacks: $options.minuteIncrementCallbacks
3493          }, function () {
3494            return [createVNode(_component_Button, mergeProps({
3495              "class": _ctx.cx('pcIncrementButton'),
3496              "aria-label": _ctx.$primevue.config.locale.nextMinute,
3497              disabled: _ctx.disabled,
3498              unstyled: _ctx.unstyled,
3499              onMousedown: _cache[23] || (_cache[23] = function ($event) {
3500                return $options.onTimePickerElementMouseDown($event, 1, 1);
3501              }),
3502              onMouseup: _cache[24] || (_cache[24] = function ($event) {
3503                return $options.onTimePickerElementMouseUp($event);
3504              }),
3505              onKeydown: [$options.onContainerButtonKeydown, _cache[26] || (_cache[26] = withKeys(function ($event) {
3506                return $options.onTimePickerElementMouseDown($event, 1, 1);
3507              }, ["enter"])), _cache[27] || (_cache[27] = withKeys(function ($event) {
3508                return $options.onTimePickerElementMouseDown($event, 1, 1);
3509              }, ["space"]))],
3510              onMouseleave: _cache[25] || (_cache[25] = function ($event) {
3511                return $options.onTimePickerElementMouseLeave();
3512              }),
3513              onKeyup: [_cache[28] || (_cache[28] = withKeys(function ($event) {
3514                return $options.onTimePickerElementMouseUp($event);
3515              }, ["enter"])), _cache[29] || (_cache[29] = withKeys(function ($event) {
3516                return $options.onTimePickerElementMouseUp($event);
3517              }, ["space"]))]
3518            }, _ctx.timepickerButtonProps, {
3519              pt: _ctx.ptm('pcIncrementButton'),
3520              "data-pc-group-section": "timepickerbutton"
3521            }), {
3522              icon: withCtx(function (slotProps) {
3523                return [renderSlot(_ctx.$slots, "incrementicon", {}, function () {
3524                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? 'span' : 'ChevronUpIcon'), mergeProps({
3525                    "class": [_ctx.incrementIcon, slotProps["class"]]
3526                  }, _ctx.ptm('pcIncrementButton')['icon'], {
3527                    "data-pc-group-section": "timepickerlabel"
3528                  }), null, 16, ["class"]))];
3529                })];
3530              }),
3531              _: 3
3532            }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"])];
3533          }), createElementVNode("span", mergeProps(_ctx.ptm('minute'), {
3534            "data-pc-group-section": "timepickerlabel"
3535          }), toDisplayString($options.formattedCurrentMinute), 17), renderSlot(_ctx.$slots, "minutedecrementbutton", {
3536            callbacks: $options.minuteDecrementCallbacks
3537          }, function () {
3538            return [createVNode(_component_Button, mergeProps({
3539              "class": _ctx.cx('pcDecrementButton'),
3540              "aria-label": _ctx.$primevue.config.locale.prevMinute,
3541              disabled: _ctx.disabled,
3542              unstyled: _ctx.unstyled,
3543              onMousedown: _cache[30] || (_cache[30] = function ($event) {
3544                return $options.onTimePickerElementMouseDown($event, 1, -1);
3545              }),
3546              onMouseup: _cache[31] || (_cache[31] = function ($event) {
3547                return $options.onTimePickerElementMouseUp($event);
3548              }),
3549              onKeydown: [$options.onContainerButtonKeydown, _cache[33] || (_cache[33] = withKeys(function ($event) {
3550                return $options.onTimePickerElementMouseDown($event, 1, -1);
3551              }, ["enter"])), _cache[34] || (_cache[34] = withKeys(function ($event) {
3552                return $options.onTimePickerElementMouseDown($event, 1, -1);
3553              }, ["space"]))],
3554              onMouseleave: _cache[32] || (_cache[32] = function ($event) {
3555                return $options.onTimePickerElementMouseLeave();
3556              }),
3557              onKeyup: [_cache[35] || (_cache[35] = withKeys(function ($event) {
3558                return $options.onTimePickerElementMouseUp($event);
3559              }, ["enter"])), _cache[36] || (_cache[36] = withKeys(function ($event) {
3560                return $options.onTimePickerElementMouseUp($event);
3561              }, ["space"]))]
3562            }, _ctx.timepickerButtonProps, {
3563              pt: _ctx.ptm('pcDecrementButton'),
3564              "data-pc-group-section": "timepickerbutton"
3565            }), {
3566              icon: withCtx(function (slotProps) {
3567                return [renderSlot(_ctx.$slots, "decrementicon", {}, function () {
3568                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
3569                    "class": [_ctx.decrementIcon, slotProps["class"]]
3570                  }, _ctx.ptm('pcDecrementButton')['icon'], {
3571                    "data-pc-group-section": "timepickerlabel"
3572                  }), null, 16, ["class"]))];
3573                })];
3574              }),
3575              _: 3
3576            }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"])];
3577          })], 16), _ctx.showSeconds ? (openBlock(), createElementBlock("div", mergeProps({
3578            key: 0,
3579            "class": _ctx.cx('separatorContainer')
3580          }, _ctx.ptm('separatorContainer'), {
3581            "data-pc-group-section": "timepickerContainer"
3582          }), [createElementVNode("span", mergeProps(_ctx.ptm('separator'), {
3583            "data-pc-group-section": "timepickerlabel"
3584          }), toDisplayString(_ctx.timeSeparator), 17)], 16)) : createCommentVNode("", true), _ctx.showSeconds ? (openBlock(), createElementBlock("div", mergeProps({
3585            key: 1,
3586            "class": _ctx.cx('secondPicker')
3587          }, _ctx.ptm('secondPicker'), {
3588            "data-pc-group-section": "timepickerContainer"
3589          }), [renderSlot(_ctx.$slots, "secondincrementbutton", {
3590            callbacks: $options.secondIncrementCallbacks
3591          }, function () {
3592            return [createVNode(_component_Button, mergeProps({
3593              "class": _ctx.cx('pcIncrementButton'),
3594              "aria-label": _ctx.$primevue.config.locale.nextSecond,
3595              disabled: _ctx.disabled,
3596              unstyled: _ctx.unstyled,
3597              onMousedown: _cache[37] || (_cache[37] = function ($event) {
3598                return $options.onTimePickerElementMouseDown($event, 2, 1);
3599              }),
3600              onMouseup: _cache[38] || (_cache[38] = function ($event) {
3601                return $options.onTimePickerElementMouseUp($event);
3602              }),
3603              onKeydown: [$options.onContainerButtonKeydown, _cache[40] || (_cache[40] = withKeys(function ($event) {
3604                return $options.onTimePickerElementMouseDown($event, 2, 1);
3605              }, ["enter"])), _cache[41] || (_cache[41] = withKeys(function ($event) {
3606                return $options.onTimePickerElementMouseDown($event, 2, 1);
3607              }, ["space"]))],
3608              onMouseleave: _cache[39] || (_cache[39] = function ($event) {
3609                return $options.onTimePickerElementMouseLeave();
3610              }),
3611              onKeyup: [_cache[42] || (_cache[42] = withKeys(function ($event) {
3612                return $options.onTimePickerElementMouseUp($event);
3613              }, ["enter"])), _cache[43] || (_cache[43] = withKeys(function ($event) {
3614                return $options.onTimePickerElementMouseUp($event);
3615              }, ["space"]))]
3616            }, _ctx.timepickerButtonProps, {
3617              pt: _ctx.ptm('pcIncrementButton'),
3618              "data-pc-group-section": "timepickerbutton"
3619            }), {
3620              icon: withCtx(function (slotProps) {
3621                return [renderSlot(_ctx.$slots, "incrementicon", {}, function () {
3622                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? 'span' : 'ChevronUpIcon'), mergeProps({
3623                    "class": [_ctx.incrementIcon, slotProps["class"]]
3624                  }, _ctx.ptm('pcIncrementButton')['icon'], {
3625                    "data-pc-group-section": "timepickerlabel"
3626                  }), null, 16, ["class"]))];
3627                })];
3628              }),
3629              _: 3
3630            }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"])];
3631          }), createElementVNode("span", mergeProps(_ctx.ptm('second'), {
3632            "data-pc-group-section": "timepickerlabel"
3633          }), toDisplayString($options.formattedCurrentSecond), 17), renderSlot(_ctx.$slots, "seconddecrementbutton", {
3634            callbacks: $options.secondDecrementCallbacks
3635          }, function () {
3636            return [createVNode(_component_Button, mergeProps({
3637              "class": _ctx.cx('pcDecrementButton'),
3638              "aria-label": _ctx.$primevue.config.locale.prevSecond,
3639              disabled: _ctx.disabled,
3640              unstyled: _ctx.unstyled,
3641              onMousedown: _cache[44] || (_cache[44] = function ($event) {
3642                return $options.onTimePickerElementMouseDown($event, 2, -1);
3643              }),
3644              onMouseup: _cache[45] || (_cache[45] = function ($event) {
3645                return $options.onTimePickerElementMouseUp($event);
3646              }),
3647              onKeydown: [$options.onContainerButtonKeydown, _cache[47] || (_cache[47] = withKeys(function ($event) {
3648                return $options.onTimePickerElementMouseDown($event, 2, -1);
3649              }, ["enter"])), _cache[48] || (_cache[48] = withKeys(function ($event) {
3650                return $options.onTimePickerElementMouseDown($event, 2, -1);
3651              }, ["space"]))],
3652              onMouseleave: _cache[46] || (_cache[46] = function ($event) {
3653                return $options.onTimePickerElementMouseLeave();
3654              }),
3655              onKeyup: [_cache[49] || (_cache[49] = withKeys(function ($event) {
3656                return $options.onTimePickerElementMouseUp($event);
3657              }, ["enter"])), _cache[50] || (_cache[50] = withKeys(function ($event) {
3658                return $options.onTimePickerElementMouseUp($event);
3659              }, ["space"]))]
3660            }, _ctx.timepickerButtonProps, {
3661              pt: _ctx.ptm('pcDecrementButton'),
3662              "data-pc-group-section": "timepickerbutton"
3663            }), {
3664              icon: withCtx(function (slotProps) {
3665                return [renderSlot(_ctx.$slots, "decrementicon", {}, function () {
3666                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
3667                    "class": [_ctx.decrementIcon, slotProps["class"]]
3668                  }, _ctx.ptm('pcDecrementButton')['icon'], {
3669                    "data-pc-group-section": "timepickerlabel"
3670                  }), null, 16, ["class"]))];
3671                })];
3672              }),
3673              _: 3
3674            }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"])];
3675          })], 16)) : createCommentVNode("", true), _ctx.hourFormat == '12' ? (openBlock(), createElementBlock("div", mergeProps({
3676            key: 2,
3677            "class": _ctx.cx('separatorContainer')
3678          }, _ctx.ptm('separatorContainer'), {
3679            "data-pc-group-section": "timepickerContainer"
3680          }), [createElementVNode("span", mergeProps(_ctx.ptm('separator'), {
3681            "data-pc-group-section": "timepickerlabel"
3682          }), toDisplayString(_ctx.timeSeparator), 17)], 16)) : createCommentVNode("", true), _ctx.hourFormat == '12' ? (openBlock(), createElementBlock("div", mergeProps({
3683            key: 3,
3684            "class": _ctx.cx('ampmPicker')
3685          }, _ctx.ptm('ampmPicker')), [renderSlot(_ctx.$slots, "ampmincrementbutton", {
3686            toggleCallback: function toggleCallback(event) {
3687              return $options.toggleAMPM(event);
3688            },
3689            keydownCallback: function keydownCallback(event) {
3690              return $options.onContainerButtonKeydown(event);
3691            }
3692          }, function () {
3693            return [createVNode(_component_Button, mergeProps({
3694              "class": _ctx.cx('pcIncrementButton'),
3695              "aria-label": _ctx.$primevue.config.locale.am,
3696              disabled: _ctx.disabled,
3697              unstyled: _ctx.unstyled,
3698              onClick: _cache[51] || (_cache[51] = function ($event) {
3699                return $options.toggleAMPM($event);
3700              }),
3701              onKeydown: $options.onContainerButtonKeydown
3702            }, _ctx.timepickerButtonProps, {
3703              pt: _ctx.ptm('pcIncrementButton'),
3704              "data-pc-group-section": "timepickerbutton"
3705            }), {
3706              icon: withCtx(function (slotProps) {
3707                return [renderSlot(_ctx.$slots, "incrementicon", {
3708                  "class": normalizeClass(_ctx.cx('incrementIcon'))
3709                }, function () {
3710                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon ? 'span' : 'ChevronUpIcon'), mergeProps({
3711                    "class": [_ctx.cx('incrementIcon'), slotProps["class"]]
3712                  }, _ctx.ptm('pcIncrementButton')['icon'], {
3713                    "data-pc-group-section": "timepickerlabel"
3714                  }), null, 16, ["class"]))];
3715                })];
3716              }),
3717              _: 3
3718            }, 16, ["class", "aria-label", "disabled", "unstyled", "onKeydown", "pt"])];
3719          }), createElementVNode("span", mergeProps(_ctx.ptm('ampm'), {
3720            "data-pc-group-section": "timepickerlabel"
3721          }), toDisplayString($data.pm ? _ctx.$primevue.config.locale.pm : _ctx.$primevue.config.locale.am), 17), renderSlot(_ctx.$slots, "ampmdecrementbutton", {
3722            toggleCallback: function toggleCallback(event) {
3723              return $options.toggleAMPM(event);
3724            },
3725            keydownCallback: function keydownCallback(event) {
3726              return $options.onContainerButtonKeydown(event);
3727            }
3728          }, function () {
3729            return [createVNode(_component_Button, mergeProps({
3730              "class": _ctx.cx('pcDecrementButton'),
3731              "aria-label": _ctx.$primevue.config.locale.pm,
3732              disabled: _ctx.disabled,
3733              onClick: _cache[52] || (_cache[52] = function ($event) {
3734                return $options.toggleAMPM($event);
3735              }),
3736              onKeydown: $options.onContainerButtonKeydown
3737            }, _ctx.timepickerButtonProps, {
3738              pt: _ctx.ptm('pcDecrementButton'),
3739              "data-pc-group-section": "timepickerbutton"
3740            }), {
3741              icon: withCtx(function (slotProps) {
3742                return [renderSlot(_ctx.$slots, "decrementicon", {
3743                  "class": normalizeClass(_ctx.cx('decrementIcon'))
3744                }, function () {
3745                  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
3746                    "class": [_ctx.cx('decrementIcon'), slotProps["class"]]
3747                  }, _ctx.ptm('pcDecrementButton')['icon'], {
3748                    "data-pc-group-section": "timepickerlabel"
3749                  }), null, 16, ["class"]))];
3750                })];
3751              }),
3752              _: 3
3753            }, 16, ["class", "aria-label", "disabled", "onKeydown", "pt"])];
3754          })], 16)) : createCommentVNode("", true)], 16, _hoisted_16)) : createCommentVNode("", true), _ctx.showButtonBar ? (openBlock(), createElementBlock("div", mergeProps({
3755            key: 2,
3756            "class": _ctx.cx('buttonbar')
3757          }, _ctx.ptm('buttonbar')), [renderSlot(_ctx.$slots, "buttonbar", {
3758            todayCallback: function todayCallback(event) {
3759              return $options.onTodayButtonClick(event);
3760            },
3761            clearCallback: function clearCallback(event) {
3762              return $options.onClearButtonClick(event);
3763            }
3764          }, function () {
3765            return [renderSlot(_ctx.$slots, "todaybutton", {
3766              actionCallback: function actionCallback(event) {
3767                return $options.onTodayButtonClick(event);
3768              },
3769              keydownCallback: function keydownCallback(event) {
3770                return $options.onContainerButtonKeydown(event);
3771              }
3772            }, function () {
3773              return [createVNode(_component_Button, mergeProps({
3774                label: $options.todayLabel,
3775                onClick: _cache[53] || (_cache[53] = function ($event) {
3776                  return $options.onTodayButtonClick($event);
3777                }),
3778                "class": _ctx.cx('pcTodayButton'),
3779                unstyled: _ctx.unstyled,
3780                onKeydown: $options.onContainerButtonKeydown
3781              }, _ctx.todayButtonProps, {
3782                pt: _ctx.ptm('pcTodayButton'),
3783                "data-pc-group-section": "button"
3784              }), null, 16, ["label", "class", "unstyled", "onKeydown", "pt"])];
3785            }), renderSlot(_ctx.$slots, "clearbutton", {
3786              actionCallback: function actionCallback(event) {
3787                return $options.onClearButtonClick(event);
3788              },
3789              keydownCallback: function keydownCallback(event) {
3790                return $options.onContainerButtonKeydown(event);
3791              }
3792            }, function () {
3793              return [createVNode(_component_Button, mergeProps({
3794                label: $options.clearLabel,
3795                onClick: _cache[54] || (_cache[54] = function ($event) {
3796                  return $options.onClearButtonClick($event);
3797                }),
3798                "class": _ctx.cx('pcClearButton'),
3799                unstyled: _ctx.unstyled,
3800                onKeydown: $options.onContainerButtonKeydown
3801              }, _ctx.clearButtonProps, {
3802                pt: _ctx.ptm('pcClearButton'),
3803                "data-pc-group-section": "button"
3804              }), null, 16, ["label", "class", "unstyled", "onKeydown", "pt"])];
3805            })];
3806          })], 16)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "footer")], 16, _hoisted_4)) : createCommentVNode("", true)];
3807        }),
3808        _: 3
3809      }, 16, ["onAfterEnter", "onAfterLeave", "onLeave"])];
3810    }),
3811    _: 3
3812  }, 8, ["appendTo", "disabled"])], 16, _hoisted_1);
3813}
3814
3815script.render = render;
3816
3817export { script as default };
3818//# sourceMappingURL=index.mjs.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.