From 4ea29e027f1651b082ae2436ee2cddcde35f92dc Mon Sep 17 00:00:00 2001 From: Eonasdan Date: Tue, 31 Aug 2021 08:44:52 -0400 Subject: [PATCH] bug fixes, doc work --- .travis.yml_ | 9 - dist/js/jQuery-provider.js | 8 +- dist/js/tempus-dominus.js | 377 ++++++++++---------- dist/js/tempus-dominus.js.map | 2 +- docs/6/change-log.html | 305 +++------------- docs/6/datetime.html | 305 +++------------- docs/6/examples/index.html | 324 ++++------------- docs/6/examples/jquery.html | 317 ++++------------- docs/6/examples/no-styles.html | 341 ++++++++---------- docs/6/functions.html | 305 +++------------- docs/6/index.html | 288 +++++++++++++++ docs/6/installing.html | 322 ++++------------- docs/6/js/jQuery-provider.js | 8 +- docs/6/js/search.json | 36 +- docs/6/js/tempus-dominus.js | 377 ++++++++++---------- docs/6/js/tempus-dominus.js.map | 2 +- docs/6/migration.html | 288 +++++++++++++++ docs/6/namespace/css.html | 411 +++++----------------- docs/6/namespace/errors.html | 364 ++++--------------- docs/6/namespace/events.html | 314 ++++------------- docs/6/namespace/index.html | 321 ++++------------- docs/6/options.html | 305 +++------------- docs/css/styles.min.css | 2 +- docs/js/bundle.min.js | 4 +- docs/sitemap.xml | 10 +- src/docs/assets/no-styles.html | 341 ++++++++---------- src/docs/js/docs.js | 10 + src/docs/make.js | 3 +- src/docs/partials/examples/index.html | 19 +- src/docs/partials/examples/jquery.html | 12 +- src/docs/partials/index.html | 11 + src/docs/partials/installing.html | 5 +- src/docs/partials/migration.html | 11 + src/docs/partials/namespace/css.html | 184 ++++------ src/docs/partials/namespace/errors.html | 59 ++-- src/docs/partials/namespace/events.html | 3 +- src/docs/partials/namespace/index.html | 10 +- src/docs/styles/docs.css | 2 +- src/docs/templates/page-template.html | 339 ++++-------------- src/js/actions.ts | 26 +- src/js/conts.ts | 8 +- src/js/dates.ts | 12 +- src/js/display/calendar/date-display.ts | 55 +-- src/js/display/calendar/decade-display.ts | 29 +- src/js/display/calendar/month-display.ts | 25 +- src/js/display/calendar/year-display.ts | 22 +- src/js/display/collapse.ts | 31 +- src/js/display/index.ts | 92 +++-- src/js/display/time/hour-display.ts | 8 +- src/js/display/time/minute-display.ts | 8 +- src/js/display/time/second-display.ts | 8 +- src/js/display/time/time-display.ts | 29 +- src/js/jQuery-provider.js | 8 +- src/js/namespace.ts | 6 +- src/js/options.ts | 36 +- src/js/tempus-dominus.ts | 16 +- 56 files changed, 2473 insertions(+), 4300 deletions(-) delete mode 100644 .travis.yml_ create mode 100644 docs/6/index.html create mode 100644 docs/6/migration.html create mode 100644 src/docs/partials/index.html create mode 100644 src/docs/partials/migration.html diff --git a/.travis.yml_ b/.travis.yml_ deleted file mode 100644 index a716cb3c7..000000000 --- a/.travis.yml_ +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -sudo: false -node_js: - - 0.10 - -before_script: - - npm install -g grunt-cli - -script: grunt build:travis diff --git a/dist/js/jQuery-provider.js b/dist/js/jQuery-provider.js index 10be69ff1..349605690 100644 --- a/dist/js/jQuery-provider.js +++ b/dist/js/jQuery-provider.js @@ -66,7 +66,7 @@ tempusDominus.getSelectorFromElement = function ($element) { */ $(document) .on( - `click${tempusDominus.Namespace.Events.key}.data-api`, + `click${tempusDominus.Namespace.events.key}.data-api`, `[data-toggle="${tempusDominus.Namespace.dataKey}"]`, function () { const $originalTarget = $(this), @@ -85,7 +85,7 @@ $(document) } ) .on( - tempusDominus.Namespace.Events.change, + tempusDominus.Namespace.events.change, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)); @@ -96,7 +96,7 @@ $(document) } ) .on( - tempusDominus.Namespace.Events.blur, + tempusDominus.Namespace.events.blur, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)), @@ -125,7 +125,7 @@ $(document) tempusDominus.jQueryInterface.call($target, '_keyup', event); })*/ .on( - tempusDominus.Namespace.Events.focus, + tempusDominus.Namespace.events.focus, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)), diff --git a/dist/js/tempus-dominus.js b/dist/js/tempus-dominus.js index 25d293a28..9d7776090 100644 --- a/dist/js/tempus-dominus.js +++ b/dist/js/tempus-dominus.js @@ -711,9 +711,9 @@ // noinspection JSUnusedGlobalSymbols Namespace.version = version; Namespace.dataKey = dataKey; - Namespace.Events = new Events(); - Namespace.Css = new Css(); - Namespace.ErrorMessages = new ErrorMessages(); + Namespace.events = new Events(); + Namespace.css = new Css(); + Namespace.errorMessages = new ErrorMessages(); const DefaultOptions = { restrictions: { @@ -809,25 +809,25 @@ const DatePickerModes = [ { name: 'calendar', - className: Namespace.Css.daysContainer, + className: Namespace.css.daysContainer, unit: Unit.month, step: 1, }, { name: 'months', - className: Namespace.Css.monthsContainer, + className: Namespace.css.monthsContainer, unit: Unit.year, step: 1, }, { name: 'years', - className: Namespace.Css.yearsContainer, + className: Namespace.css.yearsContainer, unit: Unit.year, step: 10, }, { name: 'decades', - className: Namespace.Css.decadesContainer, + className: Namespace.css.decadesContainer, unit: Unit.year, step: 100, }, @@ -868,7 +868,7 @@ * @param target html element to affect. */ toggle(target) { - if (target.classList.contains(Namespace.Css.show)) { + if (target.classList.contains(Namespace.css.show)) { this.hide(target); } else { @@ -880,18 +880,18 @@ * @param target */ show(target) { - if (target.classList.contains(Namespace.Css.collapsing) || - target.classList.contains(Namespace.Css.show)) + if (target.classList.contains(Namespace.css.collapsing) || + target.classList.contains(Namespace.css.show)) return; const complete = () => { - target.classList.remove(Namespace.Css.collapsing); - target.classList.add(Namespace.Css.collapse, Namespace.Css.show); + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse, Namespace.css.show); target.style.height = ''; this.timeOut = null; }; target.style.height = '0'; - target.classList.remove(Namespace.Css.collapse); - target.classList.add(Namespace.Css.collapsing); + target.classList.remove(Namespace.css.collapse); + target.classList.add(Namespace.css.collapsing); this.timeOut = setTimeout(complete, this.getTransitionDurationFromElement(target)); target.style.height = `${target.scrollHeight}px`; } @@ -900,19 +900,19 @@ * @param target HTML Element */ hide(target) { - if (target.classList.contains(Namespace.Css.collapsing) || - !target.classList.contains(Namespace.Css.show)) + if (target.classList.contains(Namespace.css.collapsing) || + !target.classList.contains(Namespace.css.show)) return; const complete = () => { - target.classList.remove(Namespace.Css.collapsing); - target.classList.add(Namespace.Css.collapse); + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse); this.timeOut = null; }; target.style.height = `${target.getBoundingClientRect()['height']}px`; const reflow = (element) => element.offsetHeight; reflow(target); - target.classList.remove(Namespace.Css.collapse, Namespace.Css.show); - target.classList.add(Namespace.Css.collapsing); + target.classList.remove(Namespace.css.collapse, Namespace.css.show); + target.classList.add(Namespace.css.collapsing); target.style.height = ''; this.timeOut = setTimeout(complete, this.getTransitionDurationFromElement(target)); } @@ -933,7 +933,7 @@ */ do(e, action) { const currentTarget = e.currentTarget; - if (currentTarget.classList.contains(Namespace.Css.disabled)) + if (currentTarget.classList.contains(Namespace.css.disabled)) return false; action = action || currentTarget.dataset.action; const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; @@ -959,12 +959,13 @@ this._context._viewDate.manipulate(step, unit); else this._context._viewDate.manipulate(step * -1, unit); - this._context._display._showMode(); this._context._viewUpdate(unit); + this._context._display._showMode(); break; case ActionTypes.pickerSwitch: this._context._display._showMode(1); this._context._viewUpdate(DatePickerModes[this._context._currentViewMode].unit); + this._context._display._updateCalendarHeader(); break; case ActionTypes.selectMonth: case ActionTypes.selectYear: @@ -996,10 +997,10 @@ break; case ActionTypes.selectDay: const day = this._context._viewDate.clone; - if (currentTarget.classList.contains(Namespace.Css.old)) { + if (currentTarget.classList.contains(Namespace.css.old)) { day.manipulate(-1, Unit.month); } - if (currentTarget.classList.contains(Namespace.Css.new)) { + if (currentTarget.classList.contains(Namespace.css.new)) { day.manipulate(1, Unit.month); } day.date = +currentTarget.innerText; @@ -1085,13 +1086,13 @@ break; case ActionTypes.togglePicker: this._context._display.widget - .querySelectorAll(`.${Namespace.Css.dateContainer}, .${Namespace.Css.timeContainer}`) + .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) .forEach((htmlElement) => this.collapse.toggle(htmlElement)); if (currentTarget.getAttribute('title') === this._context._options.localization.selectDate) { currentTarget.setAttribute('title', this._context._options.localization.selectTime); currentTarget.innerHTML = this._context._display._iconTag(this._context._options.display.icons.time).outerHTML; - this._context._display._showMode(); + this._context._display._updateCalendarHeader(); } else { currentTarget.setAttribute('title', this._context._options.localization.selectDate); @@ -1105,24 +1106,24 @@ case ActionTypes.showMinutes: case ActionTypes.showSeconds: this._context._display.widget - .querySelectorAll(`.${Namespace.Css.timeContainer} > div`) + .querySelectorAll(`.${Namespace.css.timeContainer} > div`) .forEach((htmlElement) => (htmlElement.style.display = 'none')); let classToUse = ''; switch (action) { case ActionTypes.showClock: - classToUse = Namespace.Css.clockContainer; + classToUse = Namespace.css.clockContainer; this._context._display._update('clock'); break; case ActionTypes.showHours: - classToUse = Namespace.Css.hourContainer; + classToUse = Namespace.css.hourContainer; this._context._display._update(Unit.hours); break; case ActionTypes.showMinutes: - classToUse = Namespace.Css.minuteContainer; + classToUse = Namespace.css.minuteContainer; this._context._display._update(Unit.minutes); break; case ActionTypes.showSeconds: - classToUse = Namespace.Css.secondContainer; + classToUse = Namespace.css.secondContainer; this._context._display._update(Unit.seconds); break; } @@ -1130,7 +1131,7 @@ break; case ActionTypes.clear: this._context.dates._setValue(null); - this._context._display._showMode(); + this._context._display._updateCalendarHeader(); break; case ActionTypes.close: this._context._display.hide(); @@ -1186,18 +1187,18 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.daysContainer); + container.classList.add(Namespace.css.daysContainer); container.append(...this._daysOfTheWeek()); if (this._context._options.display.calendarWeeks) { const div = document.createElement('div'); - div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); container.appendChild(div); } for (let i = 0; i < 42; i++) { if (i !== 0 && i % 7 === 0) { if (this._context._options.display.calendarWeeks) { const div = document.createElement('div'); - div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); container.appendChild(div); } } @@ -1212,53 +1213,53 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.daysContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.daysContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = this._context._viewDate.format({ + switcher.setAttribute(Namespace.css.daysContainer, this._context._viewDate.format({ month: this._context._options.localization.dayViewHeaderFormat, - }); + })); this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.month), Unit.month) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.month), Unit.month) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone .startOf(Unit.month) .startOf('weekDay') .manipulate(12, Unit.hours); container - .querySelectorAll(`[data-action="${ActionTypes.selectDay}"], .${Namespace.Css.calendarWeeks}`) + .querySelectorAll(`[data-action="${ActionTypes.selectDay}"], .${Namespace.css.calendarWeeks}`) .forEach((containerClone, index) => { if (this._context._options.display.calendarWeeks && - containerClone.classList.contains(Namespace.Css.calendarWeeks)) { + containerClone.classList.contains(Namespace.css.calendarWeeks)) { if (containerClone.innerText === '#') return; containerClone.innerText = `${innerDate.week}`; return; } let classes = []; - classes.push(Namespace.Css.day); + classes.push(Namespace.css.day); if (innerDate.isBefore(this._context._viewDate, Unit.month)) { - classes.push(Namespace.Css.old); + classes.push(Namespace.css.old); } if (innerDate.isAfter(this._context._viewDate, Unit.month)) { - classes.push(Namespace.Css.new); + classes.push(Namespace.css.new); } if (!this._context._unset && this._context.dates.isPicked(innerDate, Unit.date)) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.date)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } if (innerDate.isSame(new DateTime(), Unit.date)) { - classes.push(Namespace.Css.today); + classes.push(Namespace.css.today); } if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { - classes.push(Namespace.Css.weekend); + classes.push(Namespace.css.weekend); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1279,13 +1280,13 @@ document.createElement('div'); if (this._context._options.display.calendarWeeks) { const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + htmlDivElement.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); htmlDivElement.innerText = '#'; row.push(htmlDivElement); } for (let i = 0; i < 7; i++) { const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.Css.dayOfTheWeek, Namespace.Css.noHighlight); + htmlDivElement.classList.add(Namespace.css.dayOfTheWeek, Namespace.css.noHighlight); htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); innerDate.manipulate(1, Unit.date); row.push(htmlDivElement); @@ -1307,7 +1308,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.monthsContainer); + container.classList.add(Namespace.css.monthsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectMonth); @@ -1320,29 +1321,29 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.monthsContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = this._context._viewDate.format({ year: 'numeric' }); + switcher.setAttribute(Namespace.css.monthsContainer, this._context._viewDate.format({ year: 'numeric' })); this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.year), Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.year), Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone.startOf(Unit.year); container .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.month); + classes.push(Namespace.css.month); if (!this._context._unset && this._context.dates.isPicked(innerDate, Unit.month)) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.month)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1420,7 +1421,7 @@ clear() { this._context._unset = true; this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: undefined, oldDate: this.lastPicked, isClear: true, @@ -1476,7 +1477,7 @@ this._dates.splice(index, 1); } this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: undefined, oldDate, isClear, @@ -1502,7 +1503,7 @@ this._context._unset = false; this._context._display._update('all'); this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: target, oldDate, isClear, @@ -1515,7 +1516,7 @@ this._context._viewDate = target.clone; updateInput(); this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: target, oldDate, isClear, @@ -1523,8 +1524,8 @@ }); } this._context._triggerEvent({ - type: Namespace.Events.error, - reason: Namespace.ErrorMessages.failedToSetInvalidDate, + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToSetInvalidDate, date: target, oldDate, }); @@ -1561,7 +1562,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.yearsContainer); + container.classList.add(Namespace.css.yearsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectYear); @@ -1577,17 +1578,17 @@ Dates.getStartEndYear(100, this._context._viewDate.year); this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year); this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year); - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.yearsContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = `${this._startYear.year}-${this._endYear.year}`; + switcher.setAttribute(Namespace.css.yearsContainer, `${this._startYear.year}-${this._endYear.year}`); this._context._validation.isValid(this._startYear, Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._endYear, Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone .startOf(Unit.year) .manipulate(-1, Unit.year); @@ -1595,13 +1596,13 @@ .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.year); + classes.push(Namespace.css.year); if (!this._context._unset && this._context.dates.isPicked(innerDate, Unit.year)) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.year)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1625,7 +1626,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.decadesContainer); + container.classList.add(Namespace.css.decadesContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectDecade); @@ -1643,27 +1644,27 @@ this._startDecade.year = start; this._endDecade = this._context._viewDate.clone.startOf(Unit.year); this._endDecade.year = end; - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.decadesContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = `${this._startDecade.year}-${this._endDecade.year}`; + switcher.setAttribute(Namespace.css.decadesContainer, `${this._startDecade.year}-${this._endDecade.year}`); this._context._validation.isValid(this._startDecade, Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._endDecade, Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); const pickedYears = this._context.dates.picked.map((x) => x.year); container .querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`) .forEach((containerClone, index) => { if (index === 0) { - containerClone.classList.add(Namespace.Css.old); + containerClone.classList.add(Namespace.css.old); if (this._startDecade.year - 10 < 0) { containerClone.textContent = ' '; - previous.classList.add(Namespace.Css.disabled); - containerClone.classList.add(Namespace.Css.disabled); + previous.classList.add(Namespace.css.disabled); + containerClone.classList.add(Namespace.css.disabled); containerClone.setAttribute('data-value', ``); return; } @@ -1674,13 +1675,13 @@ } } let classes = []; - classes.push(Namespace.Css.decade); + classes.push(Namespace.css.decade); const startDecadeYear = this._startDecade.year; const endDecadeYear = this._startDecade.year + 9; if (!this._context._unset && pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) .length > 0) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1704,7 +1705,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.clockContainer); + container.classList.add(Namespace.css.clockContainer); container.append(...this._grid()); return container; } @@ -1714,23 +1715,23 @@ * @private */ _update() { - const timesDiv = this._context._display.widget.getElementsByClassName(Namespace.Css.clockContainer)[0]; + const timesDiv = this._context._display.widget.getElementsByClassName(Namespace.css.clockContainer)[0]; const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; let columns = 0; timesDiv .querySelectorAll('.disabled') - .forEach((element) => element.classList.remove(Namespace.Css.disabled)); + .forEach((element) => element.classList.remove(Namespace.css.disabled)); if (this._context._options.display.components.hours) { columns++; if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.hours), Unit.hours)) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementHours}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.hours), Unit.hours)) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementHours}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.hours}]`).innerText = this._context._options.display.components.useTwentyfourHour ? lastPicked.hoursFormatted @@ -1741,12 +1742,12 @@ if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.minutes), Unit.minutes)) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.minutes), Unit.minutes)) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.minutes}]`).innerText = lastPicked.minutesFormatted; } @@ -1755,12 +1756,12 @@ if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.seconds), Unit.seconds)) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.seconds), Unit.seconds)) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.seconds}]`).innerText = lastPicked.secondsFormatted; } @@ -1769,10 +1770,10 @@ const toggle = timesDiv.querySelector(`[data-action=${ActionTypes.togglePeriod}]`); toggle.innerText = lastPicked.meridiem(); if (!this._context._validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, Unit.hours))) { - toggle.classList.add(Namespace.Css.disabled); + toggle.classList.add(Namespace.css.disabled); } else { - toggle.classList.remove(Namespace.Css.disabled); + toggle.classList.remove(Namespace.css.disabled); } } timesDiv.classList.add(`clock-columns-${columns}`); @@ -1783,7 +1784,7 @@ */ _grid() { const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = this._context._display._iconTag(this._context._options.display.icons.up), downIcon = this._context._display._iconTag(this._context._options.display.icons.down); - separator.classList.add(Namespace.Css.separator, Namespace.Css.noHighlight); + separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); const separatorColon = separator.cloneNode(true); separatorColon.innerHTML = ':'; const getSeparator = (colon = false) => { @@ -1860,7 +1861,7 @@ button.setAttribute('data-action', ActionTypes.togglePeriod); button.setAttribute('tabindex', '-1'); divElement = document.createElement('div'); - divElement.classList.add(Namespace.Css.noHighlight); + divElement.classList.add(Namespace.css.noHighlight); divElement.appendChild(button); middle.push(divElement); divElement = getSeparator(); @@ -1883,7 +1884,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.hourContainer); + container.classList.add(Namespace.css.hourContainer); for (let i = 0; i < (this._context._options.display.components.useTwentyfourHour ? 24 : 12); i++) { const div = document.createElement('div'); @@ -1897,15 +1898,15 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.hourContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.hourContainer)[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.date); container .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.hour); + classes.push(Namespace.css.hour); if (!this._context._validation.isValid(innerDate, Unit.hours)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1932,7 +1933,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.minuteContainer); + container.classList.add(Namespace.css.minuteContainer); let step = this._context._options.stepping === 1 ? 5 : this._context._options.stepping; @@ -1948,7 +1949,7 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.minuteContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.hours); let step = this._context._options.stepping === 1 ? 5 @@ -1957,9 +1958,9 @@ .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.minute); + classes.push(Namespace.css.minute); if (!this._context._validation.isValid(innerDate, Unit.minutes)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1983,7 +1984,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.secondContainer); + container.classList.add(Namespace.css.secondContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectSecond); @@ -1996,15 +1997,15 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.secondContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.secondContainer)[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.minutes); container .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.second); + classes.push(Namespace.css.second); if (!this._context._validation.isValid(innerDate, Unit.seconds)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -2109,7 +2110,7 @@ this._update(Unit.year); this._update(Unit.month); this._decadeDisplay._update(); - this._context._display._showMode(); + this._updateCalendarHeader(); break; case 'all': if (this._hasTime) { @@ -2174,7 +2175,7 @@ } if (this._context._options.display.viewMode == 'clock') { this._context._action.do({ - currentTarget: this.widget.querySelector(`.${Namespace.Css.timeContainer}`), + currentTarget: this.widget.querySelector(`.${Namespace.css.timeContainer}`), }, ActionTypes.showClock); } this.widget @@ -2183,15 +2184,15 @@ // show the clock when using sideBySide if (this._context._options.display.sideBySide) { this._timeDisplay._update(); - this.widget.getElementsByClassName(Namespace.Css.clockContainer)[0].style.display = 'grid'; + this.widget.getElementsByClassName(Namespace.css.clockContainer)[0].style.display = 'grid'; } } - this.widget.classList.add(Namespace.Css.show); + this.widget.classList.add(Namespace.css.show); if (!this._context._options.display.inline) { this._popperInstance.update(); document.addEventListener('click', this._documentClickEvent); } - this._context._triggerEvent({ type: Namespace.Events.show }); + this._context._triggerEvent({ type: Namespace.events.show }); this._isVisible = true; } /** @@ -2210,40 +2211,60 @@ this._context._currentViewMode = max; } this.widget - .querySelectorAll(`.${Namespace.Css.dateContainer} > div:not(.${Namespace.Css.calendarHeader}), .${Namespace.Css.timeContainer} > div`) + .querySelectorAll(`.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div`) .forEach((e) => (e.style.display = 'none')); const datePickerMode = DatePickerModes[this._context._currentViewMode]; let picker = this.widget.querySelector(`.${datePickerMode.className}`); + switch (datePickerMode.className) { + case Namespace.css.decadesContainer: + this._decadeDisplay._update(); + break; + case Namespace.css.yearsContainer: + this._yearDisplay._update(); + break; + case Namespace.css.monthsContainer: + this._monthDisplay._update(); + break; + case Namespace.css.daysContainer: + this._dateDisplay._update(); + break; + } + picker.style.display = 'grid'; + this._updateCalendarHeader(); + } + _updateCalendarHeader() { + const showing = [ + ...this.widget.querySelector(`.${Namespace.css.dateContainer} div[style*="display: grid"]`).classList, + ].find((x) => x.startsWith(Namespace.css.dateContainer)); const [previous, switcher, next] = this._context._display.widget - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switch (datePickerMode.className) { - case Namespace.Css.decadesContainer: + switch (showing) { + case Namespace.css.decadesContainer: previous.setAttribute('title', this._context._options.localization.previousCentury); switcher.setAttribute('title', ''); next.setAttribute('title', this._context._options.localization.nextCentury); - this._decadeDisplay._update(); break; - case Namespace.Css.yearsContainer: + case Namespace.css.yearsContainer: previous.setAttribute('title', this._context._options.localization.previousDecade); switcher.setAttribute('title', this._context._options.localization.selectDecade); next.setAttribute('title', this._context._options.localization.nextDecade); - this._yearDisplay._update(); break; - case Namespace.Css.monthsContainer: + case Namespace.css.monthsContainer: previous.setAttribute('title', this._context._options.localization.previousYear); switcher.setAttribute('title', this._context._options.localization.selectYear); next.setAttribute('title', this._context._options.localization.nextYear); - this._monthDisplay._update(); break; - case Namespace.Css.daysContainer: + case Namespace.css.daysContainer: previous.setAttribute('title', this._context._options.localization.previousMonth); switcher.setAttribute('title', this._context._options.localization.selectMonth); next.setAttribute('title', this._context._options.localization.nextMonth); - this._dateDisplay._update(); + switcher.innerText = this._context._viewDate.format({ + month: this._context._options.localization.dayViewHeaderFormat, + }); break; } - picker.style.display = 'grid'; + switcher.innerText = switcher.getAttribute(showing); } /** * Hides the picker if needed. @@ -2251,10 +2272,10 @@ * @fires Events#hide */ hide() { - this.widget.classList.remove(Namespace.Css.show); + this.widget.classList.remove(Namespace.css.show); if (this._isVisible) { this._context._triggerEvent({ - type: Namespace.Events.hide, + type: Namespace.events.hide, date: this._context._unset ? null : this._context.dates.lastPicked @@ -2291,21 +2312,21 @@ */ _buildWidget() { const template = document.createElement('div'); - template.classList.add(Namespace.Css.widget); + template.classList.add(Namespace.css.widget); const dateView = document.createElement('div'); - dateView.classList.add(Namespace.Css.dateContainer); + dateView.classList.add(Namespace.css.dateContainer); dateView.append(this._headTemplate, this._decadeDisplay._picker, this._yearDisplay._picker, this._monthDisplay._picker, this._dateDisplay._picker); const timeView = document.createElement('div'); - timeView.classList.add(Namespace.Css.timeContainer); + timeView.classList.add(Namespace.css.timeContainer); timeView.appendChild(this._timeDisplay._picker); timeView.appendChild(this._hourDisplay._picker); timeView.appendChild(this._minuteDisplay._picker); timeView.appendChild(this._secondDisplay._picker); const toolbar = document.createElement('div'); - toolbar.classList.add(Namespace.Css.toolbar); + toolbar.classList.add(Namespace.css.toolbar); toolbar.append(...this._toolbar); if (this._context._options.display.inline) { - template.classList.add(Namespace.Css.inline); + template.classList.add(Namespace.css.inline); } if (this._context._options.display.calendarWeeks) { template.classList.add('calendarWeeks'); @@ -2313,7 +2334,7 @@ if (this._context._options.display.sideBySide && this._hasDate && this._hasTime) { - template.classList.add(Namespace.Css.sideBySide); + template.classList.add(Namespace.css.sideBySide); if (this._context._options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } @@ -2335,17 +2356,17 @@ } if (this._hasDate) { if (this._hasTime) { - dateView.classList.add(Namespace.Css.collapse); + dateView.classList.add(Namespace.css.collapse); if (this._context._options.display.viewMode !== 'clock') - dateView.classList.add(Namespace.Css.show); + dateView.classList.add(Namespace.css.show); } template.appendChild(dateView); } if (this._hasTime) { if (this._hasDate) { - timeView.classList.add(Namespace.Css.collapse); + timeView.classList.add(Namespace.css.collapse); if (this._context._options.display.viewMode === 'clock') - timeView.classList.add(Namespace.Css.show); + timeView.classList.add(Namespace.css.show); } template.appendChild(timeView); } @@ -2429,16 +2450,16 @@ */ get _headTemplate() { const calendarHeader = document.createElement('div'); - calendarHeader.classList.add(Namespace.Css.calendarHeader); + calendarHeader.classList.add(Namespace.css.calendarHeader); const previous = document.createElement('div'); - previous.classList.add(Namespace.Css.previous); + previous.classList.add(Namespace.css.previous); previous.setAttribute('data-action', ActionTypes.previous); previous.appendChild(this._iconTag(this._context._options.display.icons.previous)); const switcher = document.createElement('div'); - switcher.classList.add(Namespace.Css.switch); + switcher.classList.add(Namespace.css.switch); switcher.setAttribute('data-action', ActionTypes.pickerSwitch); const next = document.createElement('div'); - next.classList.add(Namespace.Css.next); + next.classList.add(Namespace.css.next); next.setAttribute('data-action', ActionTypes.next); next.appendChild(this._iconTag(this._context._options.display.icons.next)); calendarHeader.append(previous, switcher, next); @@ -2600,7 +2621,7 @@ if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); } case 'minDate': { if (value === undefined) { @@ -2610,7 +2631,7 @@ if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); } case 'maxDate': { if (value === undefined) { @@ -2620,7 +2641,7 @@ if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); } case 'disabledHours': if (value === undefined) { @@ -2628,7 +2649,7 @@ } this._typeCheckNumberArray('restrictions.disabledHours', value, providedType); if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.ErrorMessages.numbersOutOfRage('restrictions.disabledHours', 0, 23); + Namespace.errorMessages.numbersOutOfRage('restrictions.disabledHours', 0, 23); return value; case 'enabledHours': if (value === undefined) { @@ -2636,7 +2657,7 @@ } this._typeCheckNumberArray('restrictions.enabledHours', value, providedType); if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.ErrorMessages.numbersOutOfRage('restrictions.enabledHours', 0, 23); + Namespace.errorMessages.numbersOutOfRage('restrictions.enabledHours', 0, 23); return value; case 'daysOfWeekDisabled': if (value === undefined) { @@ -2644,7 +2665,7 @@ } this._typeCheckNumberArray('restrictions.daysOfWeekDisabled', value, providedType); if (value.filter((x) => x < 0 || x > 6).length > 0) - Namespace.ErrorMessages.numbersOutOfRage('restrictions.daysOfWeekDisabled', 0, 6); + Namespace.errorMessages.numbersOutOfRage('restrictions.daysOfWeekDisabled', 0, 6); return value; case 'enabledDates': if (value === undefined) { @@ -2663,7 +2684,7 @@ return []; } if (!Array.isArray(value)) { - Namespace.ErrorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }'); + Namespace.errorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }'); } const valueObject = value; for (let i = 0; i < valueObject.length; i++) { @@ -2672,7 +2693,7 @@ let d = valueObject[i][vk]; const dateTime = this._dateConversion(d, subOptionName); if (!dateTime) { - Namespace.ErrorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); } valueObject[i][vk] = dateTime; }); @@ -2696,7 +2717,7 @@ }; const keyOptions = optionValues[key]; if (!keyOptions.includes(value)) - Namespace.ErrorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); + Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); return value; case 'inputFormat': return value; @@ -2713,7 +2734,7 @@ case 'function': return value; default: - Namespace.ErrorMessages.typeMismatch(path.substring(1), providedType, defaultType); + Namespace.errorMessages.typeMismatch(path.substring(1), providedType, defaultType); } } }; @@ -2736,7 +2757,7 @@ error += `Did you mean "${didYouMean}"?`; return error; }); - Namespace.ErrorMessages.unexpectedOptions(errors); + Namespace.errorMessages.unexpectedOptions(errors); } Object.keys(mergeOption).forEach((key) => { const defaultOptionValue = mergeOption[key]; @@ -2854,13 +2875,13 @@ */ static _typeCheckDateArray(optionName, value, providedType) { if (!Array.isArray(value)) { - Namespace.ErrorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date'); + Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date'); } for (let i = 0; i < value.length; i++) { let d = value[i]; const dateTime = this._dateConversion(d, optionName); if (!dateTime) { - Namespace.ErrorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); } value[i] = dateTime; } @@ -2873,7 +2894,7 @@ */ static _typeCheckNumberArray(optionName, value, providedType) { if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) { - Namespace.ErrorMessages.typeMismatch(optionName, providedType, 'array of numbers'); + Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of numbers'); } return; } @@ -2884,11 +2905,11 @@ */ static _dateConversion(d, optionName) { if (typeof d === typeof '') { - Namespace.ErrorMessages.dateString(); + Namespace.errorMessages.dateString(); } const converted = this._dateTypeCheck(d); if (!converted) { - Namespace.ErrorMessages.failedToParseDate(optionName, d); + Namespace.errorMessages.failedToParseDate(optionName, d); } return converted; } @@ -2908,10 +2929,10 @@ static _validateConflcits(config) { if (config.restrictions.minDate && config.restrictions.maxDate) { if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { - Namespace.ErrorMessages.conflictingConfiguration('minDate is after maxDate'); + Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); } if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { - Namespace.ErrorMessages.conflictingConfiguration('maxDate is before minDate'); + Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); } } } @@ -2940,8 +2961,8 @@ } else { this._triggerEvent({ - type: Namespace.Events.error, - reason: Namespace.ErrorMessages.failedToParseInput, + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToParseInput, date: parsedDate, }); } @@ -2955,7 +2976,7 @@ this.toggle(); }; if (!element) { - Namespace.ErrorMessages.mustProvideElement; + Namespace.errorMessages.mustProvideElement; } this._element = element; this._options = this._initializeOptions(options, DefaultOptions, true); @@ -3065,7 +3086,7 @@ callBackArray = callbacks; } if (eventTypes.length !== callBackArray.length) { - Namespace.ErrorMessages.subscribeMismatch; + Namespace.errorMessages.subscribeMismatch; } const returnArray = []; for (let i = 0; i < eventTypes.length; i++) { @@ -3146,7 +3167,7 @@ */ _viewUpdate(unit) { this._triggerEvent({ - type: Namespace.Events.update, + type: Namespace.events.update, change: unit, viewDate: this._viewDate.clone, }); @@ -3266,7 +3287,7 @@ !this._display._hasTime || ( // clock component is already showing - (_a = this._display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.Css.show)[0].classList.contains(Namespace.Css.timeContainer))) + (_a = this._display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.css.show)[0].classList.contains(Namespace.css.timeContainer))) return; // First time ever. If useCurrent option is set to true (default), do nothing // because the first date is selected automatically. @@ -3279,7 +3300,7 @@ this._currentPromptTimeTimeout = setTimeout(() => { if (this._display.widget) { this._action.do({ - currentTarget: this._display.widget.querySelector(`.${Namespace.Css.switch} div`), + currentTarget: this._display.widget.querySelector(`.${Namespace.css.switch} div`), }, ActionTypes.togglePicker); } }, this._options.promptTimeOnDateChangeTransitionDelay); diff --git a/dist/js/tempus-dominus.js.map b/dist/js/tempus-dominus.js.map index 696ca1790..1e59d479f 100644 --- a/dist/js/tempus-dominus.js.map +++ b/dist/js/tempus-dominus.js.map @@ -1 +1 @@ -{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/errors.ts","../../src/js/namespace.ts","../../src/js/conts.ts","../../src/js/display/collapse.ts","../../src/js/actions.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/dates.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/index.ts","../../src/js/validation.ts","../../src/js/options.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\ninterface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n /**\n * Used with Intl.DateTimeFormat\n */\n locale = 'default';\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n */\n setLocale(value: string): this {\n this.locale = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n */\n static convert(date: Date): DateTime {\n if (!date) throw `A date is required`;\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n );\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocale(this.locale);\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n */\n startOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(0 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n */\n endOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(6 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.year);\n this.setDate(0);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n this[unit] += value;\n return this;\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An object. Uses browser defaults otherwise.\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(template: DateTimeFormatOptions, locale = this.locale): string {\n return new Intl.DateTimeFormat(locale, template).format(this);\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n return (\n ((leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit)) &&\n (rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit))) ||\n ((leftInclusivity\n ? this.isBefore(left, unit)\n : !this.isAfter(left, unit)) &&\n (rightInclusivity\n ? this.isAfter(right, unit)\n : !this.isBefore(right, unit)))\n );\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.locale,\n template: any = { dateStyle: 'full', timeStyle: 'long' }\n ) {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit hours\n */\n get minutesFormatted(): string {\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hours\n */\n get hoursFormatted(): string {\n return this.hours < 10 ? `0${this.hours}` : `${this.hours}`;\n }\n\n /**\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\n */\n get twelveHoursFormatted(): string {\n let hour = this.hours;\n if (hour > 12) hour = hour - 12;\n if (hour === 0) hour = 12;\n return hour < 10 ? `0${hour}` : `${hour}`;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.locale): string {\n /*\n for some reason this stopped returning \"AM/PM\" and returned \"in the morning\"\n const dayPeriod = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n dayPeriod: 'narrow',\n } as any)\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;*/\n return this.hours <= 12 ? 'AM' : 'PM';\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\n }\n\n // https://github.com/you-dont-need/You-Dont-Need-Momentjs#week-of-year\n /**\n * Gets the week of the year\n */\n get week(): number {\n const MILLISECONDS_IN_WEEK = 604800000;\n const firstDayOfWeek = 1; // monday as the first day (0 = sunday)\n const startOfYear = new Date(this.year, 0, 1);\n startOfYear.setDate(\n startOfYear.getDate() + (firstDayOfWeek - (startOfYear.getDay() % 7))\n );\n return (\n Math.round(\n (this.valueOf() - startOfYear.valueOf()) / MILLISECONDS_IN_WEEK\n ) + 1\n );\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n}\n","import Namespace from './namespace';\n\nexport class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalide string or an invalid Date object.\n * @param optionName\n * @param date\n */\n failedToParseDate(optionName: string, date: any) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for option ${optionName}.`\n );\n error.code = 5;\n throw error;\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\n );\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-alpha1',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static Events = new Events();\n\n static Css = new Css();\n\n static ErrorMessages = new ErrorMessages();\n}\n","import { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options from './options';\n\nconst DefaultOptions: Options = {\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: [],\n },\n display: {\n icons: {\n type: 'icons',\n time: 'fas fa-clock',\n date: 'fas fa-calendar',\n up: 'fas fa-arrow-up',\n down: 'fas fa-arrow-down',\n previous: 'fas fa-chevron-left',\n next: 'fas fa-chevron-right',\n today: 'fas fa-calendar-check',\n clear: 'fas fa-trash',\n close: 'fas fa-times',\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false,\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: false,\n },\n inputFormat: undefined,\n inline: false,\n },\n stepping: 1,\n useCurrent: true,\n defaultDate: undefined,\n localization: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n previousYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n previousDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n previousCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n togglePeriod: 'Toggle Period',\n selectTime: 'Select Time',\n selectDate: 'Select Date',\n dayViewHeaderFormat: 'long',\n locale: 'default',\n },\n keepInvalid: false,\n debug: false,\n allowInputToggle: false,\n viewDate: new DateTime(),\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n};\n\nconst DatePickerModes: {\n name: string;\n className: string;\n unit: Unit;\n step: number;\n}[] = [\n {\n name: 'calendar',\n className: Namespace.Css.daysContainer,\n unit: Unit.month,\n step: 1,\n },\n {\n name: 'months',\n className: Namespace.Css.monthsContainer,\n unit: Unit.year,\n step: 1,\n },\n {\n name: 'years',\n className: Namespace.Css.yearsContainer,\n unit: Unit.year,\n step: 10,\n },\n {\n name: 'decades',\n className: Namespace.Css.decadesContainer,\n unit: Unit.year,\n step: 100,\n },\n];\n\nexport { DefaultOptions, DatePickerModes, Namespace };\n","import Namespace from '../namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n private timeOut;\r\n\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n toggle(target: HTMLElement) {\r\n if (target.classList.contains(Namespace.Css.show)) {\r\n this.hide(target);\r\n } else {\r\n this.show(target);\r\n }\r\n }\r\n\r\n /**\r\n * If `target` is not already showing, then show after the animation.\r\n * @param target\r\n */\r\n show(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.Css.collapsing) ||\r\n target.classList.contains(Namespace.Css.show)\r\n )\r\n return;\r\n\r\n const complete = () => {\r\n target.classList.remove(Namespace.Css.collapsing);\r\n target.classList.add(Namespace.Css.collapse, Namespace.Css.show);\r\n target.style.height = '';\r\n this.timeOut = null;\r\n };\r\n\r\n target.style.height = '0';\r\n target.classList.remove(Namespace.Css.collapse);\r\n target.classList.add(Namespace.Css.collapsing);\r\n\r\n this.timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n target.style.height = `${target.scrollHeight}px`;\r\n }\r\n\r\n /**\r\n * If `target` is not already hidden, then hide after the animation.\r\n * @param target HTML Element\r\n */\r\n hide(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.Css.collapsing) ||\r\n !target.classList.contains(Namespace.Css.show)\r\n )\r\n return;\r\n\r\n const complete = () => {\r\n target.classList.remove(Namespace.Css.collapsing);\r\n target.classList.add(Namespace.Css.collapse);\r\n this.timeOut = null;\r\n };\r\n\r\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\r\n\r\n const reflow = (element) => element.offsetHeight;\r\n\r\n reflow(target);\r\n\r\n target.classList.remove(Namespace.Css.collapse, Namespace.Css.show);\r\n target.classList.add(Namespace.Css.collapsing);\r\n target.style.height = '';\r\n\r\n this.timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n }\r\n\r\n /**\r\n * Gets the transition duration from the `element` by getting css properties\r\n * `transition-duration` and `transition-delay`\r\n * @param element HTML Element\r\n */\r\n private getTransitionDurationFromElement = (element: HTMLElement) => {\r\n if (!element) {\r\n return 0;\r\n }\r\n\r\n // Get transition-duration of the element\r\n let { transitionDuration, transitionDelay } = window.getComputedStyle(\r\n element\r\n );\r\n\r\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\r\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\r\n\r\n // Return 0 if element or transition duration is not found\r\n if (!floatTransitionDuration && !floatTransitionDelay) {\r\n return 0;\r\n }\r\n\r\n // If multiple durations are defined, take the first\r\n transitionDuration = transitionDuration.split(',')[0];\r\n transitionDelay = transitionDelay.split(',')[0];\r\n\r\n return (\r\n (Number.parseFloat(transitionDuration) +\r\n Number.parseFloat(transitionDelay)) *\r\n 1000\r\n );\r\n };\r\n}\r\n","import { DatePickerModes } from './conts.js';\nimport { DateTime, Unit } from './datetime';\nimport { TempusDominus } from './tempus-dominus';\nimport Collapse from './display/collapse';\nimport Namespace from './namespace';\n\n/**\n *\n */\nexport default class Actions {\n private _context: TempusDominus;\n private collapse: Collapse;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this.collapse = new Collapse();\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e.currentTarget;\n if (currentTarget.classList.contains(Namespace.Css.disabled)) return false;\n action = action || currentTarget.dataset.action;\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`\n * @param unit\n * @param value Value to change by\n */\n const manipulateAndSet = (unit: Unit, value = 1) => {\n const newDate = lastPicked.manipulate(value, unit);\n if (this._context._validation.isValid(newDate, unit)) {\n /*if (this.context.dates.lastPickedIndex < 0) {\n this.date(newDate);\n }*/\n this._context.dates._setValue(\n newDate,\n this._context.dates.lastPickedIndex\n );\n }\n };\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n const { unit, step } = DatePickerModes[this._context._currentViewMode];\n if (action === ActionTypes.next)\n this._context._viewDate.manipulate(step, unit);\n else this._context._viewDate.manipulate(step * -1, unit);\n this._context._display._showMode();\n this._context._viewUpdate(unit);\n break;\n case ActionTypes.pickerSwitch:\n this._context._display._showMode(1);\n this._context._viewUpdate(\n DatePickerModes[this._context._currentViewMode].unit\n );\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.getAttribute('data-value');\n switch (action) {\n case ActionTypes.selectMonth:\n this._context._viewDate.month = value;\n this._context._viewUpdate(Unit.month);\n break;\n case ActionTypes.selectYear:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n case ActionTypes.selectDecade:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n }\n\n if (\n this._context._currentViewMode === this._context._minViewModeNumber\n ) {\n this._context.dates._setValue(\n this._context._viewDate,\n this._context.dates.lastPickedIndex\n );\n if (!this._context._options.display.inline) {\n this._context._display.hide();\n }\n } else {\n this._context._display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this._context._viewDate.clone;\n if (currentTarget.classList.contains(Namespace.Css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.Css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.innerText;\n let index = 0;\n if (this._context._options.multipleDates) {\n index = this._context.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this._context.dates._setValue(null, index); //deselect multi-date\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex + 1\n );\n }\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex\n );\n }\n\n if (\n !this._context._display._hasTime &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline &&\n !this._context._options.multipleDates\n ) {\n this._context._display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.getAttribute('data-value');\n lastPicked.hours = hour;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.minutes &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.seconds &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.incrementHours:\n manipulateAndSet(Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping);\n break;\n case ActionTypes.incrementSeconds:\n manipulateAndSet(Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n manipulateAndSet(Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping * -1);\n break;\n case ActionTypes.decrementSeconds:\n manipulateAndSet(Unit.seconds, -1);\n break;\n case ActionTypes.togglePeriod:\n manipulateAndSet(\n Unit.hours,\n this._context.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n this._context._display.widget\n .querySelectorAll(\n `.${Namespace.Css.dateContainer}, .${Namespace.Css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) =>\n this.collapse.toggle(htmlElement)\n );\n\n if (\n currentTarget.getAttribute('title') ===\n this._context._options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectTime\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.time\n ).outerHTML;\n\n this._context._display._showMode();\n } else {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectDate\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.date\n ).outerHTML;\n this.do(e, ActionTypes.showClock);\n this._context._display._update('clock');\n }\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this._context._display.widget\n .querySelectorAll(`.${Namespace.Css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.Css.clockContainer;\n this._context._display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.Css.hourContainer;\n this._context._display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.Css.minuteContainer;\n this._context._display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.Css.secondContainer;\n this._context._display._update(Unit.seconds);\n break;\n }\n\n ((\n this._context._display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this._context.dates._setValue(null);\n this._context._display._showMode();\n break;\n case ActionTypes.close:\n this._context._display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n this._context._viewDate = today;\n if (this._context._validation.isValid(today, Unit.date))\n this._context.dates._setValue(\n today,\n this._context.dates.lastPickedIndex\n );\n break;\n }\n }\n}\n\nexport enum ActionTypes {\n next = 'next',\n previous = 'previous',\n pickerSwitch = 'pickerSwitch',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n togglePeriod = 'togglePeriod',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.Css.calendarWeeks,\n Namespace.Css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = this._context._viewDate.format({\n month: this._context._options.localization.dayViewHeaderFormat,\n });\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay')\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.Css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement, index) => {\n if (\n this._context._options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.Css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes = [];\n classes.push(Namespace.Css.day);\n\n if (innerDate.isBefore(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.Css.old);\n }\n if (innerDate.isAfter(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.Css.new);\n }\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.Css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.Css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.Css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.Css.weekend);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.innerText = `${innerDate.date}`;\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this._context._viewDate.clone\n .startOf('weekDay')\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this._context._options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.Css.calendarWeeks,\n Namespace.Css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.Css.dayOfTheWeek,\n Namespace.Css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = this._context._viewDate.format({ year: 'numeric' });\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n let innerDate = this._context._viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.month);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.Css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport { ChangeEvent, FailEvent } from './event-types';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return this._dates;\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex];\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!unit) return this._dates.indexOf(targetDate);\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this._context._unset = true;\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n _setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this._context._unset ? null : this._dates[index];\n if (!oldDate && !this._context._unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n const updateInput = () => {\n if (!this._context._input) return;\n\n let newValue =\n target?.format(this._context._options.display.inputFormat) || '';\n if (this._context._options.multipleDates) {\n newValue = this._dates\n .map((d) => d.format(this._context._options.display.inputFormat))\n .join(this._context._options.multipleDatesSeparator);\n }\n if (this._context._input.value != newValue)\n this._context._input.value = newValue;\n };\n\n // case of calling setValue(null)\n if (!target) {\n if (\n !this._context._options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this._context._unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n updateInput();\n this._context._display._update('all');\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this._context._options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this._context._options.stepping) *\n this._context._options.stepping;\n target.seconds = 0;\n }\n\n if (this._context._validation.isValid(target)) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._unset = false;\n this._context._display._update('all');\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: target,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n return;\n }\n\n if (this._context._options.keepInvalid) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: target,\n oldDate,\n isClear,\n isValid: false,\n } as ChangeEvent);\n }\n this._context._triggerEvent({\n type: Namespace.Events.error,\n reason: Namespace.ErrorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n\n /**\n * Returns a format object based on the granularity of `unit`\n * @param unit\n */\n static getFormatByUnit(unit: Unit): object {\n switch (unit) {\n case 'date':\n return { dateStyle: 'short' };\n case 'month':\n return {\n month: 'numeric',\n year: 'numeric',\n };\n case 'year':\n return { year: 'numeric' };\n }\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\nimport Dates from '../../dates';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _context: TempusDominus;\n private _startYear: DateTime;\n private _endYear: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year);\n this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year);\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.yearsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = `${this._startYear.year}-${this._endYear.year}`;\n\n this._context._validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n this._context._validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.year);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.Css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = `${innerDate.year}`;\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _context: TempusDominus;\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.decadesContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = `${this._startDecade.year}-${this._endDecade.year}`;\n\n this._context._validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n this._context._validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n const pickedYears = this._context.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.Css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.Css.disabled);\n containerClone.classList.add(Namespace.Css.disabled);\n containerClone.setAttribute('data-value', ``);\n return;\n } else {\n containerClone.innerText = `${this._startDecade.year - 10}`;\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n return;\n }\n }\n\n let classes = [];\n classes.push(Namespace.Css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this._context._unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.Css.active);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n containerClone.innerText = `${this._startDecade.year}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _context: TempusDominus;\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.clockContainer);\n\n container.append(...this._grid());\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(): void {\n const timesDiv = this._context._display.widget.getElementsByClassName(\n Namespace.Css.clockContainer\n )[0];\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n let columns = 0;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.Css.disabled));\n\n if (this._context._options.display.components.hours) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.Css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.Css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this._context._options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this._context._options.display.components.minutes) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.Css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.Css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this._context._options.display.components.seconds) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.Css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.Css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n columns++;\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.togglePeriod}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this._context._validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.Css.disabled);\n } else {\n toggle.classList.remove(Namespace.Css.disabled);\n }\n }\n\n timesDiv.classList.add(`clock-columns-${columns}`);\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(): HTMLElement[] {\n const\n top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = this._context._display._iconTag(\n this._context._options.display.icons.up\n ),\n downIcon = this._context._display._iconTag(\n this._context._options.display.icons.down\n );\n\n separator.classList.add(Namespace.Css.separator, Namespace.Css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this._context._options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.minutes) {\n if (this._context._options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.seconds) {\n if (this._context._options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this._context._options.localization.togglePeriod\n );\n button.setAttribute('data-action', ActionTypes.togglePeriod);\n button.setAttribute('tabindex', '-1');\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.Css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this._context._options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.hourContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.hour);\n\n if (!this._context._validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this._context._options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.minuteContainer);\n\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.minuteContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.hours);\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.minute);\n\n if (!this._context._validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.minutes}`);\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.secondContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.second);\n\n if (!this._context._validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import DateDisplay from './calendar/date-display';\nimport MonthDisplay from './calendar/month-display';\nimport YearDisplay from './calendar/year-display';\nimport DecadeDisplay from './calendar/decade-display';\nimport TimeDisplay from './time/time-display';\nimport HourDisplay from './time/hour-display';\nimport MinuteDisplay from './time/minute-display';\nimport SecondDisplay from './time/second-display';\nimport { DateTime, Unit } from '../datetime';\nimport { DatePickerModes } from '../conts';\nimport { TempusDominus } from '../tempus-dominus';\nimport { ActionTypes } from '../actions';\nimport { createPopper } from '@popperjs/core';\nimport Namespace from '../namespace';\nimport { HideEvent } from '../event-types';\n\n/**\n * Main class for all things display related.\n */\nexport default class Display {\n private _context: TempusDominus;\n private _dateDisplay: DateDisplay;\n private _monthDisplay: MonthDisplay;\n private _yearDisplay: YearDisplay;\n private _decadeDisplay: DecadeDisplay;\n private _timeDisplay: TimeDisplay;\n private _widget: HTMLElement;\n private _hourDisplay: HourDisplay;\n private _minuteDisplay: MinuteDisplay;\n private _secondDisplay: SecondDisplay;\n private _popperInstance: any;\n private _isVisible = false;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this._dateDisplay = new DateDisplay(context);\n this._monthDisplay = new MonthDisplay(context);\n this._yearDisplay = new YearDisplay(context);\n this._decadeDisplay = new DecadeDisplay(context);\n this._timeDisplay = new TimeDisplay(context);\n this._hourDisplay = new HourDisplay(context);\n this._minuteDisplay = new MinuteDisplay(context);\n this._secondDisplay = new SecondDisplay(context);\n\n this._widget = undefined;\n }\n\n /**\n * Returns the widget body or undefined\n * @private\n */\n get widget(): HTMLElement | undefined {\n return this._widget;\n }\n\n /**\n * Returns this visible state of the picker (shown)\n */\n get isVisible() {\n return this._isVisible;\n }\n\n /**\n * Updates the table for a particular unit. Used when an option as changed or\n * whenever the class list might need to be refreshed.\n * @param unit\n * @private\n */\n _update(unit: Unit | 'clock' | 'calendar' | 'all'): void {\n if (!this.widget) return;\n //todo do I want some kind of error catching or other guards here?\n switch (unit) {\n case Unit.seconds:\n this._secondDisplay._update();\n break;\n case Unit.minutes:\n this._minuteDisplay._update();\n break;\n case Unit.hours:\n this._hourDisplay._update();\n break;\n case Unit.date:\n this._dateDisplay._update();\n break;\n case Unit.month:\n this._monthDisplay._update();\n break;\n case Unit.year:\n this._yearDisplay._update();\n break;\n case 'clock':\n this._timeDisplay._update();\n this._update(Unit.hours);\n this._update(Unit.minutes);\n this._update(Unit.seconds);\n break;\n case 'calendar':\n this._update(Unit.date);\n this._update(Unit.year);\n this._update(Unit.month);\n this._decadeDisplay._update();\n this._context._display._showMode();\n break;\n case 'all':\n if (this._hasTime) {\n this._update('clock');\n }\n if (this._hasDate) {\n this._update('calendar');\n }\n }\n }\n\n /**\n * Shows the picker and creates a Popper instance if needed.\n * Add document click event to hide when clicking outside the picker.\n * @fires Events#show\n */\n show(): void {\n if (this.widget == undefined) {\n if (\n this._context._options.useCurrent &&\n !this._context._options.defaultDate\n ) {\n //todo in the td4 branch a pr changed this to allow granularity\n const date = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n if (!this._context._options.keepInvalid) {\n let tries = 0;\n let direction = 1;\n if (this._context._options.restrictions.maxDate?.isBefore(date)) {\n direction = -1;\n }\n while (!this._context._validation.isValid(date)) {\n date.manipulate(direction, Unit.date);\n if (tries > 31) break;\n tries++;\n }\n }\n this._context.dates._setValue(date);\n }\n\n if (this._context._options.defaultDate) {\n this._context.dates._setValue(this._context._options.defaultDate);\n }\n\n this._buildWidget();\n if (this._hasDate) {\n this._showMode();\n }\n\n if (!this._context._options.display.inline) {\n document.body.appendChild(this.widget);\n\n this._popperInstance = createPopper(\n this._context._element,\n this.widget,\n {\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [2, 8],\n },\n },\n { name: 'eventListeners', enabled: true },\n ],\n placement: 'auto',\n }\n );\n } else {\n this._context._element.appendChild(this.widget);\n }\n\n if (this._context._options.display.viewMode == 'clock') {\n this._context._action.do(\n {\n currentTarget: this.widget.querySelector(\n `.${Namespace.Css.timeContainer}`\n ),\n },\n ActionTypes.showClock\n );\n }\n\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.addEventListener('click', this._actionsClickEvent)\n );\n\n // show the clock when using sideBySide\n if (this._context._options.display.sideBySide) {\n this._timeDisplay._update();\n (\n this.widget.getElementsByClassName(\n Namespace.Css.clockContainer\n )[0] as HTMLElement\n ).style.display = 'grid';\n }\n }\n\n this.widget.classList.add(Namespace.Css.show);\n if (!this._context._options.display.inline) {\n this._popperInstance.update();\n document.addEventListener('click', this._documentClickEvent);\n }\n this._context._triggerEvent({ type: Namespace.Events.show });\n this._isVisible = true;\n }\n\n /**\n * Changes the calendar view mode. E.g. month <-> year\n * @param direction -/+ number to move currentViewMode\n * @private\n */\n _showMode(direction?: number): void {\n if (!this.widget) {\n return;\n }\n if (direction) {\n const max = Math.max(\n this._context._minViewModeNumber,\n Math.min(3, this._context._currentViewMode + direction)\n );\n if (this._context._currentViewMode == max) return;\n this._context._currentViewMode = max;\n }\n\n this.widget\n .querySelectorAll(\n `.${Namespace.Css.dateContainer} > div:not(.${Namespace.Css.calendarHeader}), .${Namespace.Css.timeContainer} > div`\n )\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\n\n const datePickerMode = DatePickerModes[this._context._currentViewMode];\n let picker: HTMLElement = this.widget.querySelector(\n `.${datePickerMode.className}`\n );\n\n const [previous, switcher, next] = this._context._display.widget\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switch (datePickerMode.className) {\n case Namespace.Css.decadesContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousCentury\n );\n switcher.setAttribute('title', '');\n next.setAttribute(\n 'title',\n this._context._options.localization.nextCentury\n );\n this._decadeDisplay._update();\n break;\n case Namespace.Css.yearsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousDecade\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectDecade\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextDecade\n );\n this._yearDisplay._update();\n break;\n case Namespace.Css.monthsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousYear\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectYear\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextYear\n );\n this._monthDisplay._update();\n break;\n case Namespace.Css.daysContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousMonth\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectMonth\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextMonth\n );\n this._dateDisplay._update();\n break;\n }\n\n picker.style.display = 'grid';\n }\n\n /**\n * Hides the picker if needed.\n * Remove document click event to hide when clicking outside the picker.\n * @fires Events#hide\n */\n hide(): void {\n this.widget.classList.remove(Namespace.Css.show);\n\n if (this._isVisible) {\n this._context._triggerEvent({\n type: Namespace.Events.hide,\n date: this._context._unset\n ? null\n : this._context.dates.lastPicked\n ? this._context.dates.lastPicked.clone\n : void 0,\n } as HideEvent);\n this._isVisible = false;\n }\n\n document.removeEventListener('click', this._documentClickEvent);\n }\n\n /**\n * Toggles the picker's open state. Fires a show/hide event depending.\n */\n toggle() {\n return this._isVisible ? this.hide() : this.show();\n }\n\n /**\n * Removes document and data-action click listener and reset the widget\n * @private\n */\n _dispose() {\n document.removeEventListener('click', this._documentClickEvent);\n if (!this.widget) return;\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.removeEventListener('click', this._actionsClickEvent)\n );\n this.widget.parentNode.removeChild(this.widget);\n this._widget = undefined;\n }\n\n /**\n * Builds the widgets html template.\n * @private\n */\n private _buildWidget(): HTMLElement {\n const template = document.createElement('div');\n template.classList.add(Namespace.Css.widget);\n\n const dateView = document.createElement('div');\n dateView.classList.add(Namespace.Css.dateContainer);\n dateView.append(\n this._headTemplate,\n this._decadeDisplay._picker,\n this._yearDisplay._picker,\n this._monthDisplay._picker,\n this._dateDisplay._picker\n );\n\n const timeView = document.createElement('div');\n timeView.classList.add(Namespace.Css.timeContainer);\n timeView.appendChild(this._timeDisplay._picker);\n timeView.appendChild(this._hourDisplay._picker);\n timeView.appendChild(this._minuteDisplay._picker);\n timeView.appendChild(this._secondDisplay._picker);\n\n const toolbar = document.createElement('div');\n toolbar.classList.add(Namespace.Css.toolbar);\n toolbar.append(...this._toolbar);\n\n if (this._context._options.display.inline) {\n template.classList.add(Namespace.Css.inline);\n }\n\n if (this._context._options.display.calendarWeeks) {\n template.classList.add('calendarWeeks');\n }\n\n if (\n this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n template.classList.add(Namespace.Css.sideBySide);\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n const row = document.createElement('div');\n row.classList.add('td-row');\n dateView.classList.add('td-half');\n timeView.classList.add('td-half');\n\n row.appendChild(dateView);\n row.appendChild(timeView);\n template.appendChild(row);\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n this._widget = template;\n return;\n }\n\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n\n if (this._hasDate) {\n if (this._hasTime) {\n dateView.classList.add(Namespace.Css.collapse);\n if (this._context._options.display.viewMode !== 'clock')\n dateView.classList.add(Namespace.Css.show);\n }\n template.appendChild(dateView);\n }\n\n if (this._hasTime) {\n if (this._hasDate) {\n timeView.classList.add(Namespace.Css.collapse);\n if (this._context._options.display.viewMode === 'clock')\n timeView.classList.add(Namespace.Css.show);\n }\n template.appendChild(timeView);\n }\n\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n\n const arrow = document.createElement('div');\n arrow.classList.add('arrow');\n arrow.setAttribute('data-popper-arrow', '');\n template.appendChild(arrow);\n\n this._widget = template;\n }\n\n /**\n * Returns true if the hours, minutes, or seconds component is turned on\n */\n get _hasTime(): boolean {\n return (\n this._context._options.display.components.clock &&\n (this._context._options.display.components.hours ||\n this._context._options.display.components.minutes ||\n this._context._options.display.components.seconds)\n );\n }\n\n /**\n * Returns true if the year, month, or date component is turned on\n */\n get _hasDate(): boolean {\n return (\n this._context._options.display.components.calendar &&\n (this._context._options.display.components.year ||\n this._context._options.display.components.month ||\n this._context._options.display.components.date)\n );\n }\n\n /**\n * Get the toolbar html based on options like buttons.today\n * @private\n */\n get _toolbar(): HTMLElement[] {\n const toolbar = [];\n\n if (this._context._options.display.buttons.today) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.today);\n div.setAttribute('title', this._context._options.localization.today);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.today)\n );\n toolbar.push(div);\n }\n if (\n !this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n let title, icon;\n if (this._context._options.display.viewMode === 'clock') {\n title = this._context._options.localization.selectDate;\n icon = this._context._options.display.icons.date;\n } else {\n title = this._context._options.localization.selectTime;\n icon = this._context._options.display.icons.time;\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.togglePicker);\n div.setAttribute('title', title);\n\n div.appendChild(this._iconTag(icon));\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.clear) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.clear);\n div.setAttribute('title', this._context._options.localization.clear);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.clear)\n );\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.close) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.close);\n div.setAttribute('title', this._context._options.localization.close);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.close)\n );\n toolbar.push(div);\n }\n\n return toolbar;\n }\n\n /***\n * Builds the base header template with next and previous icons\n * @private\n */\n get _headTemplate(): HTMLElement {\n const calendarHeader = document.createElement('div');\n calendarHeader.classList.add(Namespace.Css.calendarHeader);\n\n const previous = document.createElement('div');\n previous.classList.add(Namespace.Css.previous);\n previous.setAttribute('data-action', ActionTypes.previous);\n previous.appendChild(\n this._iconTag(this._context._options.display.icons.previous)\n );\n\n const switcher = document.createElement('div');\n switcher.classList.add(Namespace.Css.switch);\n switcher.setAttribute('data-action', ActionTypes.pickerSwitch);\n\n const next = document.createElement('div');\n next.classList.add(Namespace.Css.next);\n next.setAttribute('data-action', ActionTypes.next);\n next.appendChild(this._iconTag(this._context._options.display.icons.next));\n\n calendarHeader.append(previous, switcher, next);\n return calendarHeader;\n }\n\n /**\n * Builds an icon tag as either an ``\n * or with icons.type is `sprites` then an svg tag instead\n * @param iconClass\n * @private\n */\n _iconTag(iconClass: string): HTMLElement {\n if (this._context._options.display.icons.type === 'sprites') {\n const svg = document.createElement('svg');\n svg.innerHTML = ``;\n return svg;\n }\n const icon = document.createElement('i');\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\n return icon;\n }\n\n /**\n * A document click event to hide the widget if click is outside\n * @private\n * @param e MouseEvent\n */\n private _documentClickEvent = (e: MouseEvent) => {\n if (\n this._isVisible &&\n !e.composedPath().includes(this.widget) && // click inside the widget\n !e.composedPath()?.includes(this._context._element) && // click on the element\n (!this._context._options.display.keepOpen ||\n !this._context._options.debug ||\n !(window as any).debug)\n ) {\n this.hide();\n }\n };\n\n /**\n * Click event for any action like selecting a date\n * @param e MouseEvent\n * @private\n */\n private _actionsClickEvent = (e: MouseEvent) => {\n this._context._action.do(e);\n };\n\n /**\n * Causes the widget to get rebuilt on next show. If the picker is already open\n * then hide and reshow it.\n * @private\n */\n _rebuild() {\n const wasVisible = this._isVisible;\n if (wasVisible) this.hide();\n this._dispose();\n if (wasVisible) {\n this.show();\n }\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Dates from './dates';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provide to chek portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (\n this._context._options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this._context._options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n ) {\n return false;\n }\n\n if (\n this._context._options.restrictions.minDate &&\n targetDate.isBefore(\n this._context._options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.maxDate &&\n targetDate.isAfter(\n this._context._options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (\n this._context._options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.disabledTimeIntervals.length > 0\n ) {\n for (\n let i = 0;\n i < this._context._options.restrictions.disabledTimeIntervals.length;\n i++\n ) {\n if (\n targetDate.isBetween(\n this._context._options.restrictions.disabledTimeIntervals[i].from,\n this._context._options.restrictions.disabledTimeIntervals[i].to\n )\n )\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledDates ||\n this._context._options.restrictions.disabledDates.length === 0\n )\n return false;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.disabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledDates ||\n this._context._options.restrictions.enabledDates.length === 0\n )\n return true;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.enabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledHours ||\n this._context._options.restrictions.disabledHours.length === 0\n )\n return false;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.disabledHours.find(\n (x) => x === formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledHours ||\n this._context._options.restrictions.enabledHours.length === 0\n )\n return true;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.enabledHours.find(\n (x) => x === formattedDate\n );\n }\n}\n","import { DateTime } from './datetime';\nimport DateTimeFormatOptions = Intl.DateTimeFormatOptions;\nimport Namespace from './namespace';\nimport { DefaultOptions } from './conts';\n\nexport default interface Options {\n restrictions: {\n minDate: DateTime;\n maxDate: DateTime;\n enabledDates: DateTime[];\n disabledDates: DateTime[];\n enabledHours: number[];\n disabledHours: number[];\n disabledTimeIntervals: { from: DateTime; to: DateTime }[];\n daysOfWeekDisabled: number[];\n };\n display: {\n toolbarPlacement: 'top' | 'bottom';\n components: {\n calendar: boolean;\n date: boolean;\n month: boolean;\n year: boolean;\n decades: boolean;\n clock: boolean;\n hours: boolean;\n minutes: boolean;\n seconds: boolean;\n useTwentyfourHour: boolean;\n };\n buttons: { today: boolean; close: boolean; clear: boolean };\n calendarWeeks: boolean;\n icons: {\n date: string;\n next: string;\n previous: string;\n today: string;\n clear: string;\n time: string;\n up: string;\n type: 'icons' | 'sprites';\n down: string;\n close: string;\n };\n viewMode: 'clock' | 'calendar' | 'months' | 'years' | 'decades';\n sideBySide: boolean;\n inputFormat: DateTimeFormatOptions;\n inline: boolean;\n };\n stepping: number;\n useCurrent: boolean;\n defaultDate: DateTime;\n localization: {\n nextMonth: string;\n pickHour: string;\n incrementSecond: string;\n nextDecade: string;\n selectDecade: string;\n dayViewHeaderFormat: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';\n decrementHour: string;\n selectDate: string;\n incrementHour: string;\n previousCentury: string;\n decrementSecond: string;\n today: string;\n previousMonth: string;\n selectYear: string;\n pickSecond: string;\n nextCentury: string;\n close: string;\n incrementMinute: string;\n selectTime: string;\n clear: string;\n togglePeriod: string;\n selectMonth: string;\n decrementMinute: string;\n pickMinute: string;\n nextYear: string;\n previousYear: string;\n previousDecade: string;\n locale: string;\n };\n keepInvalid: boolean;\n debug: boolean;\n allowInputToggle: boolean;\n viewDate: DateTime;\n multipleDates: boolean;\n multipleDatesSeparator: string;\n promptTimeOnDateChange: boolean;\n promptTimeOnDateChangeTransitionDelay: number;\n}\n\nexport class OptionConverter {\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newOptions = {} as Options;\n let path = '';\n\n const processKey = (key, value, providedType, defaultType) => {\n switch (key) {\n case 'viewDate': {\n const dateTime = this._dateConversion(value, 'viewDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.ErrorMessages.typeMismatch(\n 'viewDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'minDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.minDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.ErrorMessages.typeMismatch(\n 'restrictions.minDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'maxDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.maxDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.ErrorMessages.typeMismatch(\n 'restrictions.maxDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'disabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.disabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.ErrorMessages.numbersOutOfRage(\n 'restrictions.disabledHours',\n 0,\n 23\n );\n return value;\n case 'enabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.enabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.ErrorMessages.numbersOutOfRage(\n 'restrictions.enabledHours',\n 0,\n 23\n );\n return value;\n case 'daysOfWeekDisabled':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.daysOfWeekDisabled',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 6).length > 0)\n Namespace.ErrorMessages.numbersOutOfRage(\n 'restrictions.daysOfWeekDisabled',\n 0,\n 6\n );\n return value;\n case 'enabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.enabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.disabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledTimeIntervals':\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.ErrorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[];\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n let d = valueObject[i][vk];\n const dateTime = this._dateConversion(d, subOptionName);\n if (!dateTime) {\n Namespace.ErrorMessages.typeMismatch(\n subOptionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n case 'toolbarPlacement':\n case 'type':\n case 'viewMode':\n case 'dayViewHeaderFormat':\n const optionValues = {\n toolbarPlacement: ['top', 'bottom', 'default'],\n type: ['icons', 'sprites'],\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\n dayViewHeaderFormat: [\n 'numeric',\n '2-digit',\n 'long',\n 'short',\n 'narrow',\n ],\n };\n const keyOptions = optionValues[key];\n if (!keyOptions.includes(value))\n Namespace.ErrorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n\n return value;\n case 'inputFormat':\n return value;\n default:\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.ErrorMessages.typeMismatch(\n path.substring(1),\n providedType,\n defaultType\n );\n }\n }\n };\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param mergeOption Default option to compare types against\n * @param copyTo Destination object. This was add to prevent reference copies\n */\n const spread = (provided, mergeOption, copyTo) => {\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(mergeOption).includes(x)\n );\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter._flattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.ErrorMessages.unexpectedOptions(errors);\n }\n Object.keys(mergeOption).forEach((key) => {\n const defaultOptionValue = mergeOption[key];\n let providedType = typeof provided[key];\n let defaultType = typeof defaultOptionValue;\n let value = provided[key];\n if (!provided.hasOwnProperty(key)) {\n if (\n defaultType === 'undefined' ||\n (value?.length === 0 && Array.isArray(defaultOptionValue))\n ) {\n copyTo[key] = defaultOptionValue;\n return;\n }\n provided[key] = defaultOptionValue;\n value = provided[key];\n }\n path += `.${key}`;\n copyTo[key] = processKey(key, value, providedType, defaultType);\n\n if (typeof defaultOptionValue !== 'object' || key === 'inputFormat') {\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n if (!Array.isArray(provided[key])) {\n spread(provided[key], defaultOptionValue, copyTo[key]);\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n }\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n };\n spread(providedOptions, mergeTo, newOptions);\n\n return newOptions;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = element.dataset;\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n let dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const rabbitHole = (\n split: string[],\n index: number,\n optionSubgroup: {},\n value: any\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = rabbitHole(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = rabbitHole(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @private\n */\n static _dateTypeCheck(d: any): DateTime | null {\n if (d.constructor.name === 'DateTime') return d;\n if (d.constructor.name === 'Date') {\n return DateTime.convert(d);\n }\n if (typeof d === typeof '') {\n const dateTime = new DateTime(d);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckDateArray(optionName: string, value, providedType: string) {\n if (!Array.isArray(value)) {\n Namespace.ErrorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n let d = value[i];\n const dateTime = this._dateConversion(d, optionName);\n if (!dateTime) {\n Namespace.ErrorMessages.typeMismatch(\n optionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n value[i] = dateTime;\n }\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\n Namespace.ErrorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n return;\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n */\n static _dateConversion(d: any, optionName: string) {\n if (typeof d === typeof '') {\n Namespace.ErrorMessages.dateString();\n }\n\n const converted = this._dateTypeCheck(d);\n\n if (!converted) {\n Namespace.ErrorMessages.failedToParseDate(optionName, d);\n }\n return converted;\n }\n\n private static _flattenDefaultOptions(): string[] {\n const deepKeys = (t, pre = []) =>\n Array.isArray(t)\n ? []\n : Object(t) === t\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\n : pre.join('.');\n\n return deepKeys(DefaultOptions);\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflcits(config: Options) {\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.ErrorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.ErrorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n }\n}\n","import Display from './display/index';\nimport Validation from './validation';\nimport Dates from './dates';\nimport Actions, { ActionTypes } from './actions';\nimport { DatePickerModes, DefaultOptions } from './conts';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options, { OptionConverter } from './options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n FailEvent,\n} from './event-types';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n dates: Dates;\n\n _options: Options;\n _currentViewMode = 0;\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\n _element: HTMLElement;\n _input: HTMLInputElement;\n _unset: boolean;\n _minViewModeNumber = 0;\n _display: Display;\n _validation: Validation;\n _action: Actions;\n private _isDisabled = false;\n private _notifyChangeEventContext = 0;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: any;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n if (!element) {\n Namespace.ErrorMessages.mustProvideElement;\n }\n this._element = element;\n this._options = this._initializeOptions(options, DefaultOptions, true);\n this._viewDate.setLocale(this._options.localization.locale);\n this._unset = true;\n\n this._display = new Display(this);\n this._validation = new Validation(this);\n this.dates = new Dates(this);\n this._action = new Actions(this);\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this._options.display.inline) this._display.show();\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._options = this._initializeOptions(options, DefaultOptions);\n else this._options = this._initializeOptions(options, this._options);\n this._display._rebuild();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this._display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this._display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this._input?.setAttribute('disabled', 'disabled');\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this._input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => {} | ((event: any) => {})[]\n ): { unsubscribe: void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray = [];\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.ErrorMessages.subscribeMismatch;\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this._display.hide();\n // this will clear the document click event listener\n this._display._dispose();\n this._input?.removeEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.removeEventListener('click', this._toggleClickEvent);\n }\n this._toggle.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n _triggerEvent(event: BaseEvent) {\n // checking hasOwnProperty because the BasicEvent also falls through here otherwise\n if ((event as ChangeEvent) && event.hasOwnProperty('date')) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n // this was to prevent a max call stack error\n // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb\n // todo see if this is still needed or if there's a cleaner way\n this._notifyChangeEventContext++;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate) ||\n this._notifyChangeEventContext > 1\n ) {\n this._notifyChangeEventContext = 0;\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n }\n\n this._element.dispatchEvent(\n new CustomEvent(event.type, { detail: event as any })\n );\n\n if ((window as any).jQuery) {\n const $ = (window as any).jQuery;\n $(this._element).trigger(event);\n }\n\n const publish = () => {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n };\n\n publish();\n\n this._notifyChangeEventContext = 0;\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @param {Unit} unit\n * @private\n */\n _viewUpdate(unit: Unit) {\n this._triggerEvent({\n type: Namespace.Events.update,\n change: unit,\n viewDate: this._viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): Options {\n config = OptionConverter._mergeOptions(config, mergeTo);\n if (includeDataset)\n config = OptionConverter._dataToOptions(this._element, config);\n\n OptionConverter._validateConflcits(config);\n\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\n\n if (!this._viewDate.isSame(config.viewDate)) {\n this._viewDate = config.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (config.display.components.year) {\n this._minViewModeNumber = 2;\n }\n if (config.display.components.month) {\n this._minViewModeNumber = 1;\n }\n if (config.display.components.date) {\n this._minViewModeNumber = 0;\n }\n\n this._currentViewMode = Math.max(\n this._minViewModeNumber,\n this._currentViewMode\n );\n\n // Update view mode if needed\n if (\n DatePickerModes[this._currentViewMode].name !== config.display.viewMode\n ) {\n this._currentViewMode = Math.max(\n DatePickerModes.findIndex((x) => x.name === config.display.viewMode),\n this._minViewModeNumber\n );\n }\n\n // defaults the input format based on the components enabled\n if (config.display.inputFormat === undefined) {\n const components = config.display.components;\n config.display.inputFormat = {\n year: components.calendar && components.year ? 'numeric' : undefined,\n month: components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute: components.clock && components.minutes ? '2-digit' : undefined,\n second: components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n };\n }\n\n if (this._display?.isVisible) {\n this._display._update('all');\n }\n\n return config;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this._element.tagName == 'INPUT') {\n this._input = this._element as HTMLInputElement;\n } else {\n let query = this._element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this._input = this._element.querySelector('input');\n } else {\n this._input = this._element.querySelector(query);\n }\n }\n\n this._input?.addEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.addEventListener('click', this._toggleClickEvent);\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this._options.display.inline) return;\n let query = this._element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined ? this._element : this._element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this._options.promptTimeOnDateChange ||\n this._options.display.inline ||\n this._options.display.sideBySide ||\n // time is disabled\n !this._display._hasTime ||\n // clock component is already showing\n this._display.widget\n ?.getElementsByClassName(Namespace.Css.show)[0]\n .classList.contains(Namespace.Css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this._options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this._display.widget) {\n this._action.do(\n {\n currentTarget: this._display.widget.querySelector(\n `.${Namespace.Css.switch} div`\n ),\n },\n ActionTypes.togglePicker\n );\n }\n }, this._options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _inputChangeEvent = () => {\n let parsedDate = OptionConverter._dateTypeCheck(this._input.value);\n\n if (parsedDate) {\n this.dates._setValue(parsedDate);\n } else {\n this._triggerEvent({\n type: Namespace.Events.error,\n reason: Namespace.ErrorMessages.failedToParseInput,\n date: parsedDate,\n } as FailEvent);\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n this.toggle();\n };\n}\n\nexport { TempusDominus, Namespace, DefaultOptions, DateTime };\n"],"names":["SecondDisplay","createPopper"],"mappings":";;;;;;IAAA,IAAY,IAOX;IAPD,WAAY,IAAI;QACd,2BAAmB,CAAA;QACnB,2BAAmB,CAAA;QACnB,uBAAe,CAAA;QACf,qBAAa,CAAA;QACb,uBAAe,CAAA;QACf,qBAAa,CAAA;IACf,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;IAOD;;;;UAIa,QAAS,SAAQ,IAAI;QAAlC;;;;;YAIE,WAAM,GAAG,SAAS,CAAC;SAyZpB;;;;;QAnZC,SAAS,CAAC,KAAa;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,OAAO,IAAI,CAAC;SACb;;;;;;QAOD,OAAO,OAAO,CAAC,IAAU;YACvB,IAAI,CAAC,IAAI;gBAAE,MAAM,oBAAoB,CAAC;YACtC,OAAO,IAAI,QAAQ,CACjB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,OAAO,EAAE,EACd,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,eAAe,EAAE,CACvB,CAAC;SACH;;;;QAKD,IAAI,KAAK;YACP,OAAO,IAAI,QAAQ,CACjB,IAAI,CAAC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C,IAAI,CAAC,yBAAyB,GAAG,UAAU,CAAC;gBAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CACb;wBACE,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAC/C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,MAAM,CAC/B;qBACF,EACD,WAAW,CAAC,YAAY,CACzB,CAAC;iBACH;aACF,EAAE,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;SACzD;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/errors.ts","../../src/js/namespace.ts","../../src/js/conts.ts","../../src/js/display/collapse.ts","../../src/js/actions.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/dates.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/index.ts","../../src/js/validation.ts","../../src/js/options.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\ninterface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n /**\n * Used with Intl.DateTimeFormat\n */\n locale = 'default';\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n */\n setLocale(value: string): this {\n this.locale = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n */\n static convert(date: Date): DateTime {\n if (!date) throw `A date is required`;\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n );\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocale(this.locale);\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n */\n startOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(0 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n */\n endOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(6 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.year);\n this.setDate(0);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n this[unit] += value;\n return this;\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An object. Uses browser defaults otherwise.\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(template: DateTimeFormatOptions, locale = this.locale): string {\n return new Intl.DateTimeFormat(locale, template).format(this);\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n return (\n ((leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit)) &&\n (rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit))) ||\n ((leftInclusivity\n ? this.isBefore(left, unit)\n : !this.isAfter(left, unit)) &&\n (rightInclusivity\n ? this.isAfter(right, unit)\n : !this.isBefore(right, unit)))\n );\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.locale,\n template: any = { dateStyle: 'full', timeStyle: 'long' }\n ) {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit hours\n */\n get minutesFormatted(): string {\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hours\n */\n get hoursFormatted(): string {\n return this.hours < 10 ? `0${this.hours}` : `${this.hours}`;\n }\n\n /**\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\n */\n get twelveHoursFormatted(): string {\n let hour = this.hours;\n if (hour > 12) hour = hour - 12;\n if (hour === 0) hour = 12;\n return hour < 10 ? `0${hour}` : `${hour}`;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.locale): string {\n /*\n for some reason this stopped returning \"AM/PM\" and returned \"in the morning\"\n const dayPeriod = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n dayPeriod: 'narrow',\n } as any)\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;*/\n return this.hours <= 12 ? 'AM' : 'PM';\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\n }\n\n // https://github.com/you-dont-need/You-Dont-Need-Momentjs#week-of-year\n /**\n * Gets the week of the year\n */\n get week(): number {\n const MILLISECONDS_IN_WEEK = 604800000;\n const firstDayOfWeek = 1; // monday as the first day (0 = sunday)\n const startOfYear = new Date(this.year, 0, 1);\n startOfYear.setDate(\n startOfYear.getDate() + (firstDayOfWeek - (startOfYear.getDay() % 7))\n );\n return (\n Math.round(\n (this.valueOf() - startOfYear.valueOf()) / MILLISECONDS_IN_WEEK\n ) + 1\n );\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n}\n","import Namespace from './namespace';\n\nexport class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalide string or an invalid Date object.\n * @param optionName\n * @param date\n */\n failedToParseDate(optionName: string, date: any) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for option ${optionName}.`\n );\n error.code = 5;\n throw error;\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\n );\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-alpha1',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options from './options';\n\nconst DefaultOptions: Options = {\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: [],\n },\n display: {\n icons: {\n type: 'icons',\n time: 'fas fa-clock',\n date: 'fas fa-calendar',\n up: 'fas fa-arrow-up',\n down: 'fas fa-arrow-down',\n previous: 'fas fa-chevron-left',\n next: 'fas fa-chevron-right',\n today: 'fas fa-calendar-check',\n clear: 'fas fa-trash',\n close: 'fas fa-times',\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false,\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: false,\n },\n inputFormat: undefined,\n inline: false,\n },\n stepping: 1,\n useCurrent: true,\n defaultDate: undefined,\n localization: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n previousYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n previousDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n previousCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n togglePeriod: 'Toggle Period',\n selectTime: 'Select Time',\n selectDate: 'Select Date',\n dayViewHeaderFormat: 'long',\n locale: 'default',\n },\n keepInvalid: false,\n debug: false,\n allowInputToggle: false,\n viewDate: new DateTime(),\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n};\n\nconst DatePickerModes: {\n name: string;\n className: string;\n unit: Unit;\n step: number;\n}[] = [\n {\n name: 'calendar',\n className: Namespace.css.daysContainer,\n unit: Unit.month,\n step: 1,\n },\n {\n name: 'months',\n className: Namespace.css.monthsContainer,\n unit: Unit.year,\n step: 1,\n },\n {\n name: 'years',\n className: Namespace.css.yearsContainer,\n unit: Unit.year,\n step: 10,\n },\n {\n name: 'decades',\n className: Namespace.css.decadesContainer,\n unit: Unit.year,\n step: 100,\n },\n];\n\nexport { DefaultOptions, DatePickerModes, Namespace };\n","import Namespace from '../namespace';\n\n/**\n * Provides a collapse functionality to the view changes\n */\nexport default class Collapse {\n private timeOut;\n\n /**\n * Flips the show/hide state of `target`\n * @param target html element to affect.\n */\n toggle(target: HTMLElement) {\n if (target.classList.contains(Namespace.css.show)) {\n this.hide(target);\n } else {\n this.show(target);\n }\n }\n\n /**\n * If `target` is not already showing, then show after the animation.\n * @param target\n */\n show(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n target.classList.contains(Namespace.css.show)\n )\n return;\n\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\n target.style.height = '';\n this.timeOut = null;\n };\n\n target.style.height = '0';\n target.classList.remove(Namespace.css.collapse);\n target.classList.add(Namespace.css.collapsing);\n\n this.timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n target.style.height = `${target.scrollHeight}px`;\n }\n\n /**\n * If `target` is not already hidden, then hide after the animation.\n * @param target HTML Element\n */\n hide(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n !target.classList.contains(Namespace.css.show)\n )\n return;\n\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse);\n this.timeOut = null;\n };\n\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\n\n const reflow = (element) => element.offsetHeight;\n\n reflow(target);\n\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\n target.classList.add(Namespace.css.collapsing);\n target.style.height = '';\n\n this.timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n }\n\n /**\n * Gets the transition duration from the `element` by getting css properties\n * `transition-duration` and `transition-delay`\n * @param element HTML Element\n */\n private getTransitionDurationFromElement = (element: HTMLElement) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } =\n window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) +\n Number.parseFloat(transitionDelay)) *\n 1000\n );\n };\n}\n","import { DatePickerModes } from './conts.js';\nimport { DateTime, Unit } from './datetime';\nimport { TempusDominus } from './tempus-dominus';\nimport Collapse from './display/collapse';\nimport Namespace from './namespace';\n\n/**\n *\n */\nexport default class Actions {\n private _context: TempusDominus;\n private collapse: Collapse;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this.collapse = new Collapse();\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e.currentTarget;\n if (currentTarget.classList.contains(Namespace.css.disabled)) return false;\n action = action || currentTarget.dataset.action;\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`\n * @param unit\n * @param value Value to change by\n */\n const manipulateAndSet = (unit: Unit, value = 1) => {\n const newDate = lastPicked.manipulate(value, unit);\n if (this._context._validation.isValid(newDate, unit)) {\n /*if (this.context.dates.lastPickedIndex < 0) {\n this.date(newDate);\n }*/\n this._context.dates._setValue(\n newDate,\n this._context.dates.lastPickedIndex\n );\n }\n };\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n const { unit, step } = DatePickerModes[this._context._currentViewMode];\n if (action === ActionTypes.next)\n this._context._viewDate.manipulate(step, unit);\n else this._context._viewDate.manipulate(step * -1, unit);\n this._context._viewUpdate(unit);\n\n this._context._display._showMode();\n break;\n case ActionTypes.pickerSwitch:\n this._context._display._showMode(1);\n this._context._viewUpdate(\n DatePickerModes[this._context._currentViewMode].unit\n );\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.getAttribute('data-value');\n switch (action) {\n case ActionTypes.selectMonth:\n this._context._viewDate.month = value;\n this._context._viewUpdate(Unit.month);\n break;\n case ActionTypes.selectYear:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n case ActionTypes.selectDecade:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n }\n\n if (\n this._context._currentViewMode === this._context._minViewModeNumber\n ) {\n this._context.dates._setValue(\n this._context._viewDate,\n this._context.dates.lastPickedIndex\n );\n if (!this._context._options.display.inline) {\n this._context._display.hide();\n }\n } else {\n this._context._display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this._context._viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.innerText;\n let index = 0;\n if (this._context._options.multipleDates) {\n index = this._context.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this._context.dates._setValue(null, index); //deselect multi-date\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex + 1\n );\n }\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex\n );\n }\n\n if (\n !this._context._display._hasTime &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline &&\n !this._context._options.multipleDates\n ) {\n this._context._display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.getAttribute('data-value');\n lastPicked.hours = hour;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.minutes &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.seconds &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.incrementHours:\n manipulateAndSet(Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping);\n break;\n case ActionTypes.incrementSeconds:\n manipulateAndSet(Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n manipulateAndSet(Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping * -1);\n break;\n case ActionTypes.decrementSeconds:\n manipulateAndSet(Unit.seconds, -1);\n break;\n case ActionTypes.togglePeriod:\n manipulateAndSet(\n Unit.hours,\n this._context.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n this._context._display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) =>\n this.collapse.toggle(htmlElement)\n );\n\n if (\n currentTarget.getAttribute('title') ===\n this._context._options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectTime\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.time\n ).outerHTML;\n\n this._context._display._updateCalendarHeader();\n } else {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectDate\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.date\n ).outerHTML;\n this.do(e, ActionTypes.showClock);\n this._context._display._update('clock');\n }\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this._context._display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this._context._display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this._context._display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this._context._display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this._context._display._update(Unit.seconds);\n break;\n }\n\n ((\n this._context._display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this._context.dates._setValue(null);\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this._context._display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n this._context._viewDate = today;\n if (this._context._validation.isValid(today, Unit.date))\n this._context.dates._setValue(\n today,\n this._context.dates.lastPickedIndex\n );\n break;\n }\n }\n}\n\nexport enum ActionTypes {\n next = 'next',\n previous = 'previous',\n pickerSwitch = 'pickerSwitch',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n togglePeriod = 'togglePeriod',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this._context._viewDate.format({\n month: this._context._options.localization.dayViewHeaderFormat,\n })\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay')\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement, index) => {\n if (\n this._context._options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.innerText = `${innerDate.date}`;\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this._context._viewDate.clone\n .startOf('weekDay')\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this._context._options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this._context._viewDate.format({ year: 'numeric' })\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport { ChangeEvent, FailEvent } from './event-types';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return this._dates;\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex];\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!unit) return this._dates.indexOf(targetDate);\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this._context._unset = true;\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n _setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this._context._unset ? null : this._dates[index];\n if (!oldDate && !this._context._unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n const updateInput = () => {\n if (!this._context._input) return;\n\n let newValue =\n target?.format(this._context._options.display.inputFormat) || '';\n if (this._context._options.multipleDates) {\n newValue = this._dates\n .map((d) => d.format(this._context._options.display.inputFormat))\n .join(this._context._options.multipleDatesSeparator);\n }\n if (this._context._input.value != newValue)\n this._context._input.value = newValue;\n };\n\n // case of calling setValue(null)\n if (!target) {\n if (\n !this._context._options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this._context._unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n updateInput();\n this._context._display._update('all');\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this._context._options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this._context._options.stepping) *\n this._context._options.stepping;\n target.seconds = 0;\n }\n\n if (this._context._validation.isValid(target)) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._unset = false;\n this._context._display._update('all');\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n return;\n }\n\n if (this._context._options.keepInvalid) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: false,\n } as ChangeEvent);\n }\n this._context._triggerEvent({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n\n /**\n * Returns a format object based on the granularity of `unit`\n * @param unit\n */\n static getFormatByUnit(unit: Unit): object {\n switch (unit) {\n case 'date':\n return { dateStyle: 'short' };\n case 'month':\n return {\n month: 'numeric',\n year: 'numeric',\n };\n case 'year':\n return { year: 'numeric' };\n }\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\nimport Dates from '../../dates';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _context: TempusDominus;\n private _startYear: DateTime;\n private _endYear: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year);\n this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year);\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.yearsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(Namespace.css.yearsContainer,`${this._startYear.year}-${this._endYear.year}`);\n\n this._context._validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this._context._validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.year);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = `${innerDate.year}`;\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _context: TempusDominus;\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.decadesContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.decadesContainer,\n `${this._startDecade.year}-${this._endDecade.year}`\n );\n\n this._context._validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this._context._validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n const pickedYears = this._context.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.css.disabled);\n containerClone.classList.add(Namespace.css.disabled);\n containerClone.setAttribute('data-value', ``);\n return;\n } else {\n containerClone.innerText = `${this._startDecade.year - 10}`;\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n return;\n }\n }\n\n let classes = [];\n classes.push(Namespace.css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this._context._unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.css.active);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n containerClone.innerText = `${this._startDecade.year}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _context: TempusDominus;\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid());\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(): void {\n const timesDiv = this._context._display.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0];\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n let columns = 0;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this._context._options.display.components.hours) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this._context._options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this._context._options.display.components.minutes) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this._context._options.display.components.seconds) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n columns++;\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.togglePeriod}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this._context._validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.classList.add(`clock-columns-${columns}`);\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(): HTMLElement[] {\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = this._context._display._iconTag(\n this._context._options.display.icons.up\n ),\n downIcon = this._context._display._iconTag(\n this._context._options.display.icons.down\n );\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this._context._options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.minutes) {\n if (this._context._options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.seconds) {\n if (this._context._options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this._context._options.localization.togglePeriod\n );\n button.setAttribute('data-action', ActionTypes.togglePeriod);\n button.setAttribute('tabindex', '-1');\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this._context._options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this._context._validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this._context._options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.hours);\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this._context._validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.minutes}`);\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.second);\n\n if (!this._context._validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import DateDisplay from './calendar/date-display';\nimport MonthDisplay from './calendar/month-display';\nimport YearDisplay from './calendar/year-display';\nimport DecadeDisplay from './calendar/decade-display';\nimport TimeDisplay from './time/time-display';\nimport HourDisplay from './time/hour-display';\nimport MinuteDisplay from './time/minute-display';\nimport SecondDisplay from './time/second-display';\nimport { DateTime, Unit } from '../datetime';\nimport { DatePickerModes } from '../conts';\nimport { TempusDominus } from '../tempus-dominus';\nimport { ActionTypes } from '../actions';\nimport { createPopper } from '@popperjs/core';\nimport Namespace from '../namespace';\nimport { HideEvent } from '../event-types';\n\n/**\n * Main class for all things display related.\n */\nexport default class Display {\n private _context: TempusDominus;\n private _dateDisplay: DateDisplay;\n private _monthDisplay: MonthDisplay;\n private _yearDisplay: YearDisplay;\n private _decadeDisplay: DecadeDisplay;\n private _timeDisplay: TimeDisplay;\n private _widget: HTMLElement;\n private _hourDisplay: HourDisplay;\n private _minuteDisplay: MinuteDisplay;\n private _secondDisplay: SecondDisplay;\n private _popperInstance: any;\n private _isVisible = false;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this._dateDisplay = new DateDisplay(context);\n this._monthDisplay = new MonthDisplay(context);\n this._yearDisplay = new YearDisplay(context);\n this._decadeDisplay = new DecadeDisplay(context);\n this._timeDisplay = new TimeDisplay(context);\n this._hourDisplay = new HourDisplay(context);\n this._minuteDisplay = new MinuteDisplay(context);\n this._secondDisplay = new SecondDisplay(context);\n\n this._widget = undefined;\n }\n\n /**\n * Returns the widget body or undefined\n * @private\n */\n get widget(): HTMLElement | undefined {\n return this._widget;\n }\n\n /**\n * Returns this visible state of the picker (shown)\n */\n get isVisible() {\n return this._isVisible;\n }\n\n /**\n * Updates the table for a particular unit. Used when an option as changed or\n * whenever the class list might need to be refreshed.\n * @param unit\n * @private\n */\n _update(unit: Unit | 'clock' | 'calendar' | 'all'): void {\n if (!this.widget) return;\n //todo do I want some kind of error catching or other guards here?\n switch (unit) {\n case Unit.seconds:\n this._secondDisplay._update();\n break;\n case Unit.minutes:\n this._minuteDisplay._update();\n break;\n case Unit.hours:\n this._hourDisplay._update();\n break;\n case Unit.date:\n this._dateDisplay._update();\n break;\n case Unit.month:\n this._monthDisplay._update();\n break;\n case Unit.year:\n this._yearDisplay._update();\n break;\n case 'clock':\n this._timeDisplay._update();\n this._update(Unit.hours);\n this._update(Unit.minutes);\n this._update(Unit.seconds);\n break;\n case 'calendar':\n this._update(Unit.date);\n this._update(Unit.year);\n this._update(Unit.month);\n this._decadeDisplay._update();\n this._updateCalendarHeader();\n break;\n case 'all':\n if (this._hasTime) {\n this._update('clock');\n }\n if (this._hasDate) {\n this._update('calendar');\n }\n }\n }\n\n /**\n * Shows the picker and creates a Popper instance if needed.\n * Add document click event to hide when clicking outside the picker.\n * @fires Events#show\n */\n show(): void {\n if (this.widget == undefined) {\n if (\n this._context._options.useCurrent &&\n !this._context._options.defaultDate\n ) {\n //todo in the td4 branch a pr changed this to allow granularity\n const date = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n if (!this._context._options.keepInvalid) {\n let tries = 0;\n let direction = 1;\n if (this._context._options.restrictions.maxDate?.isBefore(date)) {\n direction = -1;\n }\n while (!this._context._validation.isValid(date)) {\n date.manipulate(direction, Unit.date);\n if (tries > 31) break;\n tries++;\n }\n }\n this._context.dates._setValue(date);\n }\n\n if (this._context._options.defaultDate) {\n this._context.dates._setValue(this._context._options.defaultDate);\n }\n\n this._buildWidget();\n if (this._hasDate) {\n this._showMode();\n }\n\n if (!this._context._options.display.inline) {\n document.body.appendChild(this.widget);\n\n this._popperInstance = createPopper(\n this._context._element,\n this.widget,\n {\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [2, 8],\n },\n },\n { name: 'eventListeners', enabled: true },\n ],\n placement: 'auto',\n }\n );\n } else {\n this._context._element.appendChild(this.widget);\n }\n\n if (this._context._options.display.viewMode == 'clock') {\n this._context._action.do(\n {\n currentTarget: this.widget.querySelector(\n `.${Namespace.css.timeContainer}`\n ),\n },\n ActionTypes.showClock\n );\n }\n\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.addEventListener('click', this._actionsClickEvent)\n );\n\n // show the clock when using sideBySide\n if (this._context._options.display.sideBySide) {\n this._timeDisplay._update();\n (\n this.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0] as HTMLElement\n ).style.display = 'grid';\n }\n }\n\n this.widget.classList.add(Namespace.css.show);\n if (!this._context._options.display.inline) {\n this._popperInstance.update();\n document.addEventListener('click', this._documentClickEvent);\n }\n this._context._triggerEvent({ type: Namespace.events.show });\n this._isVisible = true;\n }\n\n /**\n * Changes the calendar view mode. E.g. month <-> year\n * @param direction -/+ number to move currentViewMode\n * @private\n */\n _showMode(direction?: number): void {\n if (!this.widget) {\n return;\n }\n if (direction) {\n const max = Math.max(\n this._context._minViewModeNumber,\n Math.min(3, this._context._currentViewMode + direction)\n );\n if (this._context._currentViewMode == max) return;\n this._context._currentViewMode = max;\n }\n\n this.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div`\n )\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\n\n const datePickerMode = DatePickerModes[this._context._currentViewMode];\n let picker: HTMLElement = this.widget.querySelector(\n `.${datePickerMode.className}`\n );\n\n switch (datePickerMode.className) {\n case Namespace.css.decadesContainer:\n this._decadeDisplay._update();\n break;\n case Namespace.css.yearsContainer:\n this._yearDisplay._update();\n break;\n case Namespace.css.monthsContainer:\n this._monthDisplay._update();\n break;\n case Namespace.css.daysContainer:\n this._dateDisplay._update();\n break;\n }\n\n picker.style.display = 'grid';\n this._updateCalendarHeader();\n }\n\n _updateCalendarHeader() {\n const showing = [\n ...this.widget.querySelector(\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\n ).classList,\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\n\n const [previous, switcher, next] = this._context._display.widget\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switch (showing) {\n case Namespace.css.decadesContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousCentury\n );\n switcher.setAttribute('title', '');\n next.setAttribute(\n 'title',\n this._context._options.localization.nextCentury\n );\n break;\n case Namespace.css.yearsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousDecade\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectDecade\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextDecade\n );\n break;\n case Namespace.css.monthsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousYear\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectYear\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextYear\n );\n break;\n case Namespace.css.daysContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousMonth\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectMonth\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextMonth\n );\n switcher.innerText = this._context._viewDate.format({\n month: this._context._options.localization.dayViewHeaderFormat,\n });\n break;\n }\n switcher.innerText = switcher.getAttribute(showing);\n }\n\n /**\n * Hides the picker if needed.\n * Remove document click event to hide when clicking outside the picker.\n * @fires Events#hide\n */\n hide(): void {\n this.widget.classList.remove(Namespace.css.show);\n\n if (this._isVisible) {\n this._context._triggerEvent({\n type: Namespace.events.hide,\n date: this._context._unset\n ? null\n : this._context.dates.lastPicked\n ? this._context.dates.lastPicked.clone\n : void 0,\n } as HideEvent);\n this._isVisible = false;\n }\n\n document.removeEventListener('click', this._documentClickEvent);\n }\n\n /**\n * Toggles the picker's open state. Fires a show/hide event depending.\n */\n toggle() {\n return this._isVisible ? this.hide() : this.show();\n }\n\n /**\n * Removes document and data-action click listener and reset the widget\n * @private\n */\n _dispose() {\n document.removeEventListener('click', this._documentClickEvent);\n if (!this.widget) return;\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.removeEventListener('click', this._actionsClickEvent)\n );\n this.widget.parentNode.removeChild(this.widget);\n this._widget = undefined;\n }\n\n /**\n * Builds the widgets html template.\n * @private\n */\n private _buildWidget(): HTMLElement {\n const template = document.createElement('div');\n template.classList.add(Namespace.css.widget);\n\n const dateView = document.createElement('div');\n dateView.classList.add(Namespace.css.dateContainer);\n dateView.append(\n this._headTemplate,\n this._decadeDisplay._picker,\n this._yearDisplay._picker,\n this._monthDisplay._picker,\n this._dateDisplay._picker\n );\n\n const timeView = document.createElement('div');\n timeView.classList.add(Namespace.css.timeContainer);\n timeView.appendChild(this._timeDisplay._picker);\n timeView.appendChild(this._hourDisplay._picker);\n timeView.appendChild(this._minuteDisplay._picker);\n timeView.appendChild(this._secondDisplay._picker);\n\n const toolbar = document.createElement('div');\n toolbar.classList.add(Namespace.css.toolbar);\n toolbar.append(...this._toolbar);\n\n if (this._context._options.display.inline) {\n template.classList.add(Namespace.css.inline);\n }\n\n if (this._context._options.display.calendarWeeks) {\n template.classList.add('calendarWeeks');\n }\n\n if (\n this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n template.classList.add(Namespace.css.sideBySide);\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n const row = document.createElement('div');\n row.classList.add('td-row');\n dateView.classList.add('td-half');\n timeView.classList.add('td-half');\n\n row.appendChild(dateView);\n row.appendChild(timeView);\n template.appendChild(row);\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n this._widget = template;\n return;\n }\n\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n\n if (this._hasDate) {\n if (this._hasTime) {\n dateView.classList.add(Namespace.css.collapse);\n if (this._context._options.display.viewMode !== 'clock')\n dateView.classList.add(Namespace.css.show);\n }\n template.appendChild(dateView);\n }\n\n if (this._hasTime) {\n if (this._hasDate) {\n timeView.classList.add(Namespace.css.collapse);\n if (this._context._options.display.viewMode === 'clock')\n timeView.classList.add(Namespace.css.show);\n }\n template.appendChild(timeView);\n }\n\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n\n const arrow = document.createElement('div');\n arrow.classList.add('arrow');\n arrow.setAttribute('data-popper-arrow', '');\n template.appendChild(arrow);\n\n this._widget = template;\n }\n\n /**\n * Returns true if the hours, minutes, or seconds component is turned on\n */\n get _hasTime(): boolean {\n return (\n this._context._options.display.components.clock &&\n (this._context._options.display.components.hours ||\n this._context._options.display.components.minutes ||\n this._context._options.display.components.seconds)\n );\n }\n\n /**\n * Returns true if the year, month, or date component is turned on\n */\n get _hasDate(): boolean {\n return (\n this._context._options.display.components.calendar &&\n (this._context._options.display.components.year ||\n this._context._options.display.components.month ||\n this._context._options.display.components.date)\n );\n }\n\n /**\n * Get the toolbar html based on options like buttons.today\n * @private\n */\n get _toolbar(): HTMLElement[] {\n const toolbar = [];\n\n if (this._context._options.display.buttons.today) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.today);\n div.setAttribute('title', this._context._options.localization.today);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.today)\n );\n toolbar.push(div);\n }\n if (\n !this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n let title, icon;\n if (this._context._options.display.viewMode === 'clock') {\n title = this._context._options.localization.selectDate;\n icon = this._context._options.display.icons.date;\n } else {\n title = this._context._options.localization.selectTime;\n icon = this._context._options.display.icons.time;\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.togglePicker);\n div.setAttribute('title', title);\n\n div.appendChild(this._iconTag(icon));\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.clear) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.clear);\n div.setAttribute('title', this._context._options.localization.clear);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.clear)\n );\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.close) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.close);\n div.setAttribute('title', this._context._options.localization.close);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.close)\n );\n toolbar.push(div);\n }\n\n return toolbar;\n }\n\n /***\n * Builds the base header template with next and previous icons\n * @private\n */\n get _headTemplate(): HTMLElement {\n const calendarHeader = document.createElement('div');\n calendarHeader.classList.add(Namespace.css.calendarHeader);\n\n const previous = document.createElement('div');\n previous.classList.add(Namespace.css.previous);\n previous.setAttribute('data-action', ActionTypes.previous);\n previous.appendChild(\n this._iconTag(this._context._options.display.icons.previous)\n );\n\n const switcher = document.createElement('div');\n switcher.classList.add(Namespace.css.switch);\n switcher.setAttribute('data-action', ActionTypes.pickerSwitch);\n\n const next = document.createElement('div');\n next.classList.add(Namespace.css.next);\n next.setAttribute('data-action', ActionTypes.next);\n next.appendChild(this._iconTag(this._context._options.display.icons.next));\n\n calendarHeader.append(previous, switcher, next);\n return calendarHeader;\n }\n\n /**\n * Builds an icon tag as either an ``\n * or with icons.type is `sprites` then an svg tag instead\n * @param iconClass\n * @private\n */\n _iconTag(iconClass: string): HTMLElement {\n if (this._context._options.display.icons.type === 'sprites') {\n const svg = document.createElement('svg');\n svg.innerHTML = ``;\n return svg;\n }\n const icon = document.createElement('i');\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\n return icon;\n }\n\n /**\n * A document click event to hide the widget if click is outside\n * @private\n * @param e MouseEvent\n */\n private _documentClickEvent = (e: MouseEvent) => {\n if (\n this._isVisible &&\n !e.composedPath().includes(this.widget) && // click inside the widget\n !e.composedPath()?.includes(this._context._element) && // click on the element\n (!this._context._options.display.keepOpen ||\n !this._context._options.debug ||\n !(window as any).debug)\n ) {\n this.hide();\n }\n };\n\n /**\n * Click event for any action like selecting a date\n * @param e MouseEvent\n * @private\n */\n private _actionsClickEvent = (e: MouseEvent) => {\n this._context._action.do(e);\n };\n\n /**\n * Causes the widget to get rebuilt on next show. If the picker is already open\n * then hide and reshow it.\n * @private\n */\n _rebuild() {\n const wasVisible = this._isVisible;\n if (wasVisible) this.hide();\n this._dispose();\n if (wasVisible) {\n this.show();\n }\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Dates from './dates';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provide to chek portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (\n this._context._options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this._context._options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n ) {\n return false;\n }\n\n if (\n this._context._options.restrictions.minDate &&\n targetDate.isBefore(\n this._context._options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.maxDate &&\n targetDate.isAfter(\n this._context._options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (\n this._context._options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.disabledTimeIntervals.length > 0\n ) {\n for (\n let i = 0;\n i < this._context._options.restrictions.disabledTimeIntervals.length;\n i++\n ) {\n if (\n targetDate.isBetween(\n this._context._options.restrictions.disabledTimeIntervals[i].from,\n this._context._options.restrictions.disabledTimeIntervals[i].to\n )\n )\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledDates ||\n this._context._options.restrictions.disabledDates.length === 0\n )\n return false;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.disabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledDates ||\n this._context._options.restrictions.enabledDates.length === 0\n )\n return true;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.enabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledHours ||\n this._context._options.restrictions.disabledHours.length === 0\n )\n return false;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.disabledHours.find(\n (x) => x === formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledHours ||\n this._context._options.restrictions.enabledHours.length === 0\n )\n return true;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.enabledHours.find(\n (x) => x === formattedDate\n );\n }\n}\n","import { DateTime } from './datetime';\nimport DateTimeFormatOptions = Intl.DateTimeFormatOptions;\nimport Namespace from './namespace';\nimport { DefaultOptions } from './conts';\n\nexport default interface Options {\n restrictions: {\n minDate: DateTime;\n maxDate: DateTime;\n enabledDates: DateTime[];\n disabledDates: DateTime[];\n enabledHours: number[];\n disabledHours: number[];\n disabledTimeIntervals: { from: DateTime; to: DateTime }[];\n daysOfWeekDisabled: number[];\n };\n display: {\n toolbarPlacement: 'top' | 'bottom';\n components: {\n calendar: boolean;\n date: boolean;\n month: boolean;\n year: boolean;\n decades: boolean;\n clock: boolean;\n hours: boolean;\n minutes: boolean;\n seconds: boolean;\n useTwentyfourHour: boolean;\n };\n buttons: { today: boolean; close: boolean; clear: boolean };\n calendarWeeks: boolean;\n icons: {\n date: string;\n next: string;\n previous: string;\n today: string;\n clear: string;\n time: string;\n up: string;\n type: 'icons' | 'sprites';\n down: string;\n close: string;\n };\n viewMode: 'clock' | 'calendar' | 'months' | 'years' | 'decades';\n sideBySide: boolean;\n inputFormat: DateTimeFormatOptions;\n inline: boolean;\n keepOpen: boolean;\n };\n stepping: number;\n useCurrent: boolean;\n defaultDate: DateTime;\n localization: {\n nextMonth: string;\n pickHour: string;\n incrementSecond: string;\n nextDecade: string;\n selectDecade: string;\n dayViewHeaderFormat: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';\n decrementHour: string;\n selectDate: string;\n incrementHour: string;\n previousCentury: string;\n decrementSecond: string;\n today: string;\n previousMonth: string;\n selectYear: string;\n pickSecond: string;\n nextCentury: string;\n close: string;\n incrementMinute: string;\n selectTime: string;\n clear: string;\n togglePeriod: string;\n selectMonth: string;\n decrementMinute: string;\n pickMinute: string;\n nextYear: string;\n previousYear: string;\n previousDecade: string;\n locale: string;\n };\n keepInvalid: boolean;\n debug: boolean;\n allowInputToggle: boolean;\n viewDate: DateTime;\n multipleDates: boolean;\n multipleDatesSeparator: string;\n promptTimeOnDateChange: boolean;\n promptTimeOnDateChangeTransitionDelay: number;\n}\n\nexport class OptionConverter {\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newOptions = {} as Options;\n let path = '';\n\n const processKey = (key, value, providedType, defaultType) => {\n switch (key) {\n case 'viewDate': {\n const dateTime = this._dateConversion(value, 'viewDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'viewDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'minDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.minDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.minDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'maxDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.maxDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.maxDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'disabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.disabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.disabledHours',\n 0,\n 23\n );\n return value;\n case 'enabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.enabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.enabledHours',\n 0,\n 23\n );\n return value;\n case 'daysOfWeekDisabled':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.daysOfWeekDisabled',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 6).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.daysOfWeekDisabled',\n 0,\n 6\n );\n return value;\n case 'enabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.enabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.disabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledTimeIntervals':\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[];\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n let d = valueObject[i][vk];\n const dateTime = this._dateConversion(d, subOptionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n subOptionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n case 'toolbarPlacement':\n case 'type':\n case 'viewMode':\n case 'dayViewHeaderFormat':\n const optionValues = {\n toolbarPlacement: ['top', 'bottom', 'default'],\n type: ['icons', 'sprites'],\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\n dayViewHeaderFormat: [\n 'numeric',\n '2-digit',\n 'long',\n 'short',\n 'narrow',\n ],\n };\n const keyOptions = optionValues[key];\n if (!keyOptions.includes(value))\n Namespace.errorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n\n return value;\n case 'inputFormat':\n return value;\n default:\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n providedType,\n defaultType\n );\n }\n }\n };\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param mergeOption Default option to compare types against\n * @param copyTo Destination object. This was add to prevent reference copies\n */\n const spread = (provided, mergeOption, copyTo) => {\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(mergeOption).includes(x)\n );\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter._flattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.errorMessages.unexpectedOptions(errors);\n }\n Object.keys(mergeOption).forEach((key) => {\n const defaultOptionValue = mergeOption[key];\n let providedType = typeof provided[key];\n let defaultType = typeof defaultOptionValue;\n let value = provided[key];\n if (!provided.hasOwnProperty(key)) {\n if (\n defaultType === 'undefined' ||\n (value?.length === 0 && Array.isArray(defaultOptionValue))\n ) {\n copyTo[key] = defaultOptionValue;\n return;\n }\n provided[key] = defaultOptionValue;\n value = provided[key];\n }\n path += `.${key}`;\n copyTo[key] = processKey(key, value, providedType, defaultType);\n\n if (typeof defaultOptionValue !== 'object' || key === 'inputFormat') {\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n if (!Array.isArray(provided[key])) {\n spread(provided[key], defaultOptionValue, copyTo[key]);\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n }\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n };\n spread(providedOptions, mergeTo, newOptions);\n\n return newOptions;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = element.dataset;\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n let dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const rabbitHole = (\n split: string[],\n index: number,\n optionSubgroup: {},\n value: any\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = rabbitHole(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = rabbitHole(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @private\n */\n static _dateTypeCheck(d: any): DateTime | null {\n if (d.constructor.name === 'DateTime') return d;\n if (d.constructor.name === 'Date') {\n return DateTime.convert(d);\n }\n if (typeof d === typeof '') {\n const dateTime = new DateTime(d);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckDateArray(optionName: string, value, providedType: string) {\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n let d = value[i];\n const dateTime = this._dateConversion(d, optionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n value[i] = dateTime;\n }\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n return;\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n */\n static _dateConversion(d: any, optionName: string) {\n if (typeof d === typeof '') {\n Namespace.errorMessages.dateString();\n }\n\n const converted = this._dateTypeCheck(d);\n\n if (!converted) {\n Namespace.errorMessages.failedToParseDate(optionName, d);\n }\n return converted;\n }\n\n private static _flattenDefaultOptions(): string[] {\n const deepKeys = (t, pre = []) =>\n Array.isArray(t)\n ? []\n : Object(t) === t\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\n : pre.join('.');\n\n return deepKeys(DefaultOptions);\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflcits(config: Options) {\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n }\n}\n","import Display from './display/index';\nimport Validation from './validation';\nimport Dates from './dates';\nimport Actions, { ActionTypes } from './actions';\nimport { DatePickerModes, DefaultOptions } from './conts';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options, { OptionConverter } from './options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n FailEvent,\n} from './event-types';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n dates: Dates;\n\n _options: Options;\n _currentViewMode = 0;\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\n _element: HTMLElement;\n _input: HTMLInputElement;\n _unset: boolean;\n _minViewModeNumber = 0;\n _display: Display;\n _validation: Validation;\n _action: Actions;\n private _isDisabled = false;\n private _notifyChangeEventContext = 0;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: any;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n if (!element) {\n Namespace.errorMessages.mustProvideElement;\n }\n this._element = element;\n this._options = this._initializeOptions(options, DefaultOptions, true);\n this._viewDate.setLocale(this._options.localization.locale);\n this._unset = true;\n\n this._display = new Display(this);\n this._validation = new Validation(this);\n this.dates = new Dates(this);\n this._action = new Actions(this);\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this._options.display.inline) this._display.show();\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._options = this._initializeOptions(options, DefaultOptions);\n else this._options = this._initializeOptions(options, this._options);\n this._display._rebuild();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this._display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this._display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this._input?.setAttribute('disabled', 'disabled');\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this._input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => {} | ((event: any) => {})[]\n ): { unsubscribe: void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray = [];\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.errorMessages.subscribeMismatch;\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this._display.hide();\n // this will clear the document click event listener\n this._display._dispose();\n this._input?.removeEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.removeEventListener('click', this._toggleClickEvent);\n }\n this._toggle.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n _triggerEvent(event: BaseEvent) {\n // checking hasOwnProperty because the BasicEvent also falls through here otherwise\n if ((event as ChangeEvent) && event.hasOwnProperty('date')) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n // this was to prevent a max call stack error\n // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb\n // todo see if this is still needed or if there's a cleaner way\n this._notifyChangeEventContext++;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate) ||\n this._notifyChangeEventContext > 1\n ) {\n this._notifyChangeEventContext = 0;\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n }\n\n this._element.dispatchEvent(\n new CustomEvent(event.type, { detail: event as any })\n );\n\n if ((window as any).jQuery) {\n const $ = (window as any).jQuery;\n $(this._element).trigger(event);\n }\n\n const publish = () => {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n };\n\n publish();\n\n this._notifyChangeEventContext = 0;\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @param {Unit} unit\n * @private\n */\n _viewUpdate(unit: Unit) {\n this._triggerEvent({\n type: Namespace.events.update,\n change: unit,\n viewDate: this._viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): Options {\n config = OptionConverter._mergeOptions(config, mergeTo);\n if (includeDataset)\n config = OptionConverter._dataToOptions(this._element, config);\n\n OptionConverter._validateConflcits(config);\n\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\n\n if (!this._viewDate.isSame(config.viewDate)) {\n this._viewDate = config.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (config.display.components.year) {\n this._minViewModeNumber = 2;\n }\n if (config.display.components.month) {\n this._minViewModeNumber = 1;\n }\n if (config.display.components.date) {\n this._minViewModeNumber = 0;\n }\n\n this._currentViewMode = Math.max(\n this._minViewModeNumber,\n this._currentViewMode\n );\n\n // Update view mode if needed\n if (\n DatePickerModes[this._currentViewMode].name !== config.display.viewMode\n ) {\n this._currentViewMode = Math.max(\n DatePickerModes.findIndex((x) => x.name === config.display.viewMode),\n this._minViewModeNumber\n );\n }\n\n // defaults the input format based on the components enabled\n if (config.display.inputFormat === undefined) {\n const components = config.display.components;\n config.display.inputFormat = {\n year: components.calendar && components.year ? 'numeric' : undefined,\n month: components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute: components.clock && components.minutes ? '2-digit' : undefined,\n second: components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n };\n }\n\n if (this._display?.isVisible) {\n this._display._update('all');\n }\n\n return config;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this._element.tagName == 'INPUT') {\n this._input = this._element as HTMLInputElement;\n } else {\n let query = this._element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this._input = this._element.querySelector('input');\n } else {\n this._input = this._element.querySelector(query);\n }\n }\n\n this._input?.addEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.addEventListener('click', this._toggleClickEvent);\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this._options.display.inline) return;\n let query = this._element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined ? this._element : this._element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this._options.promptTimeOnDateChange ||\n this._options.display.inline ||\n this._options.display.sideBySide ||\n // time is disabled\n !this._display._hasTime ||\n // clock component is already showing\n this._display.widget\n ?.getElementsByClassName(Namespace.css.show)[0]\n .classList.contains(Namespace.css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this._options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this._display.widget) {\n this._action.do(\n {\n currentTarget: this._display.widget.querySelector(\n `.${Namespace.css.switch} div`\n ),\n },\n ActionTypes.togglePicker\n );\n }\n }, this._options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _inputChangeEvent = () => {\n let parsedDate = OptionConverter._dateTypeCheck(this._input.value);\n\n if (parsedDate) {\n this.dates._setValue(parsedDate);\n } else {\n this._triggerEvent({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToParseInput,\n date: parsedDate,\n } as FailEvent);\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n this.toggle();\n };\n}\n\nexport { TempusDominus, Namespace, DefaultOptions, DateTime };\n"],"names":["SecondDisplay","createPopper"],"mappings":";;;;;;IAAA,IAAY,IAOX;IAPD,WAAY,IAAI;QACd,2BAAmB,CAAA;QACnB,2BAAmB,CAAA;QACnB,uBAAe,CAAA;QACf,qBAAa,CAAA;QACb,uBAAe,CAAA;QACf,qBAAa,CAAA;IACf,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;IAOD;;;;UAIa,QAAS,SAAQ,IAAI;QAAlC;;;;;YAIE,WAAM,GAAG,SAAS,CAAC;SAyZpB;;;;;QAnZC,SAAS,CAAC,KAAa;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,OAAO,IAAI,CAAC;SACb;;;;;;QAOD,OAAO,OAAO,CAAC,IAAU;YACvB,IAAI,CAAC,IAAI;gBAAE,MAAM,oBAAoB,CAAC;YACtC,OAAO,IAAI,QAAQ,CACjB,IAAI,CAAC,WAAW,EAAE,EACl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A,OAAO;aACR;YAED,YAAY,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YAC7C,IAAI,CAAC,yBAAyB,GAAG,UAAU,CAAC;gBAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CACb;wBACE,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAC/C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,MAAM,CAC/B;qBACF,EACD,WAAW,CAAC,YAAY,CACzB,CAAC;iBACH;aACF,EAAE,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;SACzD;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/6/change-log.html b/docs/6/change-log.html index 5ef6baa89..8a562ef45 100644 --- a/docs/6/change-log.html +++ b/docs/6/change-log.html @@ -158,262 +158,73 @@
+ +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Change Log

    -
    +
    +
    +

    Change Log

    -
    +
    +

    Version 6

    General

    diff --git a/docs/6/datetime.html b/docs/6/datetime.html index 225032d10..5208d076f 100644 --- a/docs/6/datetime.html +++ b/docs/6/datetime.html @@ -158,262 +158,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    DateTime

    -
    +
    +
    +

    DateTime

    -
    +
    +

    In v6 I dropped moment as a required library since it is no longer recommended. Almost all of the functions in the picker make use of my custom DateTime class which extends the native Date object. You can read more about it on my blog. diff --git a/docs/6/examples/index.html b/docs/6/examples/index.html index c6de46065..51fa39152 100644 --- a/docs/6/examples/index.html +++ b/docs/6/examples/index.html @@ -158,262 +158,73 @@

    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Examples

    -
    +
    +
    +

    Examples

    -
    +
    +

    Version 6 removes the need for an input field, Bootstrap, jQuery and MomemntJs. @@ -563,17 +374,6 @@

    Simple Setup @@ -1203,7 +1003,7 @@

    Linked pickers Linked pickers Linked pickers Linked pickers

    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Examples using jQuery

    -
    +
    +
    +

    Examples using jQuery

    -
    +
    + - - - + + - [ - 'change', - 'update', - 'error', - 'show', - 'hide', - 'blur', - 'keyup', - 'keydown', - 'focus', - 'click', - ].forEach((e) => { - document.getElementById('popcorn').addEventListener(e, () => { - console.log('event:', e); - }); - }); - - - + + + + + + + \ No newline at end of file diff --git a/docs/6/functions.html b/docs/6/functions.html index 5b1604f35..47df2a570 100644 --- a/docs/6/functions.html +++ b/docs/6/functions.html @@ -158,262 +158,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Functions

    -
    +
    +
    +

    Functions

    -
    +
    +
    For the sake of the following documentation, assume there's a picker setup like this:
      
    diff --git a/docs/6/index.html b/docs/6/index.html
    new file mode 100644
    index 000000000..13a2bebc7
    --- /dev/null
    +++ b/docs/6/index.html
    @@ -0,0 +1,288 @@
    +
    +
    +  
    +  
    +  
    +  
    +
    +  Introduction - Tempus Dominus
    +
    +  
    +  
    +  
    +  
    +  
    +  
    +  
    +
    +  
    +  
    +
    +  
    +  
    +  
    +  
    +  
    +  
    +
    +  
    +  
    +  
    +  
    +  
    +
    +  
    +  
    +  
    +  
    +  
    +  
    +  
    +  
    +  
    +
    +  
    +  
    +  
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Introduction

    +
    +
    +
    + Full page coming soon +
    +
    + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/6/installing.html b/docs/6/installing.html index 5b1f5788b..fe8070149 100644 --- a/docs/6/installing.html +++ b/docs/6/installing.html @@ -5,7 +5,7 @@ - How to use Tempus Dominus datetime picker - Tempus Dominus + Download - Tempus Dominus @@ -15,16 +15,14 @@ - - + + - - + + @@ -38,9 +36,8 @@ - - + + @@ -158,262 +155,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    How to use Tempus Dominus datetime picker

    -
    +
    +
    +

    Download

    -
    +
    +
    Full installation doc comming soon. If you want to test out the alpha, grab the js/css files from the dist folder.
    diff --git a/docs/6/js/jQuery-provider.js b/docs/6/js/jQuery-provider.js index 10be69ff1..349605690 100644 --- a/docs/6/js/jQuery-provider.js +++ b/docs/6/js/jQuery-provider.js @@ -66,7 +66,7 @@ tempusDominus.getSelectorFromElement = function ($element) { */ $(document) .on( - `click${tempusDominus.Namespace.Events.key}.data-api`, + `click${tempusDominus.Namespace.events.key}.data-api`, `[data-toggle="${tempusDominus.Namespace.dataKey}"]`, function () { const $originalTarget = $(this), @@ -85,7 +85,7 @@ $(document) } ) .on( - tempusDominus.Namespace.Events.change, + tempusDominus.Namespace.events.change, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)); @@ -96,7 +96,7 @@ $(document) } ) .on( - tempusDominus.Namespace.Events.blur, + tempusDominus.Namespace.events.blur, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)), @@ -125,7 +125,7 @@ $(document) tempusDominus.jQueryInterface.call($target, '_keyup', event); })*/ .on( - tempusDominus.Namespace.Events.focus, + tempusDominus.Namespace.events.focus, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)), diff --git a/docs/6/js/search.json b/docs/6/js/search.json index 230b27e1e..baf0d967e 100644 --- a/docs/6/js/search.json +++ b/docs/6/js/search.json @@ -20,7 +20,7 @@ { "file": "index.html", "title": "Examples", - "body": "version removes the need for an input field bootstrap jquery and momemntjs if you still check out examples minimum setup all is element to atach picker html javascript events span id='icon-only class='log-event style='display inline-block i class='fas fa-calendar fa-9x'>russian localefromtorussian localefromto
    russian localefromtorussian localefromto { - target.classList.remove(Namespace.Css.collapsing); - target.classList.add(Namespace.Css.collapse, Namespace.Css.show); + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse, Namespace.css.show); target.style.height = ''; this.timeOut = null; }; target.style.height = '0'; - target.classList.remove(Namespace.Css.collapse); - target.classList.add(Namespace.Css.collapsing); + target.classList.remove(Namespace.css.collapse); + target.classList.add(Namespace.css.collapsing); this.timeOut = setTimeout(complete, this.getTransitionDurationFromElement(target)); target.style.height = `${target.scrollHeight}px`; } @@ -900,19 +900,19 @@ * @param target HTML Element */ hide(target) { - if (target.classList.contains(Namespace.Css.collapsing) || - !target.classList.contains(Namespace.Css.show)) + if (target.classList.contains(Namespace.css.collapsing) || + !target.classList.contains(Namespace.css.show)) return; const complete = () => { - target.classList.remove(Namespace.Css.collapsing); - target.classList.add(Namespace.Css.collapse); + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse); this.timeOut = null; }; target.style.height = `${target.getBoundingClientRect()['height']}px`; const reflow = (element) => element.offsetHeight; reflow(target); - target.classList.remove(Namespace.Css.collapse, Namespace.Css.show); - target.classList.add(Namespace.Css.collapsing); + target.classList.remove(Namespace.css.collapse, Namespace.css.show); + target.classList.add(Namespace.css.collapsing); target.style.height = ''; this.timeOut = setTimeout(complete, this.getTransitionDurationFromElement(target)); } @@ -933,7 +933,7 @@ */ do(e, action) { const currentTarget = e.currentTarget; - if (currentTarget.classList.contains(Namespace.Css.disabled)) + if (currentTarget.classList.contains(Namespace.css.disabled)) return false; action = action || currentTarget.dataset.action; const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; @@ -959,12 +959,13 @@ this._context._viewDate.manipulate(step, unit); else this._context._viewDate.manipulate(step * -1, unit); - this._context._display._showMode(); this._context._viewUpdate(unit); + this._context._display._showMode(); break; case ActionTypes.pickerSwitch: this._context._display._showMode(1); this._context._viewUpdate(DatePickerModes[this._context._currentViewMode].unit); + this._context._display._updateCalendarHeader(); break; case ActionTypes.selectMonth: case ActionTypes.selectYear: @@ -996,10 +997,10 @@ break; case ActionTypes.selectDay: const day = this._context._viewDate.clone; - if (currentTarget.classList.contains(Namespace.Css.old)) { + if (currentTarget.classList.contains(Namespace.css.old)) { day.manipulate(-1, Unit.month); } - if (currentTarget.classList.contains(Namespace.Css.new)) { + if (currentTarget.classList.contains(Namespace.css.new)) { day.manipulate(1, Unit.month); } day.date = +currentTarget.innerText; @@ -1085,13 +1086,13 @@ break; case ActionTypes.togglePicker: this._context._display.widget - .querySelectorAll(`.${Namespace.Css.dateContainer}, .${Namespace.Css.timeContainer}`) + .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) .forEach((htmlElement) => this.collapse.toggle(htmlElement)); if (currentTarget.getAttribute('title') === this._context._options.localization.selectDate) { currentTarget.setAttribute('title', this._context._options.localization.selectTime); currentTarget.innerHTML = this._context._display._iconTag(this._context._options.display.icons.time).outerHTML; - this._context._display._showMode(); + this._context._display._updateCalendarHeader(); } else { currentTarget.setAttribute('title', this._context._options.localization.selectDate); @@ -1105,24 +1106,24 @@ case ActionTypes.showMinutes: case ActionTypes.showSeconds: this._context._display.widget - .querySelectorAll(`.${Namespace.Css.timeContainer} > div`) + .querySelectorAll(`.${Namespace.css.timeContainer} > div`) .forEach((htmlElement) => (htmlElement.style.display = 'none')); let classToUse = ''; switch (action) { case ActionTypes.showClock: - classToUse = Namespace.Css.clockContainer; + classToUse = Namespace.css.clockContainer; this._context._display._update('clock'); break; case ActionTypes.showHours: - classToUse = Namespace.Css.hourContainer; + classToUse = Namespace.css.hourContainer; this._context._display._update(Unit.hours); break; case ActionTypes.showMinutes: - classToUse = Namespace.Css.minuteContainer; + classToUse = Namespace.css.minuteContainer; this._context._display._update(Unit.minutes); break; case ActionTypes.showSeconds: - classToUse = Namespace.Css.secondContainer; + classToUse = Namespace.css.secondContainer; this._context._display._update(Unit.seconds); break; } @@ -1130,7 +1131,7 @@ break; case ActionTypes.clear: this._context.dates._setValue(null); - this._context._display._showMode(); + this._context._display._updateCalendarHeader(); break; case ActionTypes.close: this._context._display.hide(); @@ -1186,18 +1187,18 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.daysContainer); + container.classList.add(Namespace.css.daysContainer); container.append(...this._daysOfTheWeek()); if (this._context._options.display.calendarWeeks) { const div = document.createElement('div'); - div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); container.appendChild(div); } for (let i = 0; i < 42; i++) { if (i !== 0 && i % 7 === 0) { if (this._context._options.display.calendarWeeks) { const div = document.createElement('div'); - div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); container.appendChild(div); } } @@ -1212,53 +1213,53 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.daysContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.daysContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = this._context._viewDate.format({ + switcher.setAttribute(Namespace.css.daysContainer, this._context._viewDate.format({ month: this._context._options.localization.dayViewHeaderFormat, - }); + })); this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.month), Unit.month) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.month), Unit.month) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone .startOf(Unit.month) .startOf('weekDay') .manipulate(12, Unit.hours); container - .querySelectorAll(`[data-action="${ActionTypes.selectDay}"], .${Namespace.Css.calendarWeeks}`) + .querySelectorAll(`[data-action="${ActionTypes.selectDay}"], .${Namespace.css.calendarWeeks}`) .forEach((containerClone, index) => { if (this._context._options.display.calendarWeeks && - containerClone.classList.contains(Namespace.Css.calendarWeeks)) { + containerClone.classList.contains(Namespace.css.calendarWeeks)) { if (containerClone.innerText === '#') return; containerClone.innerText = `${innerDate.week}`; return; } let classes = []; - classes.push(Namespace.Css.day); + classes.push(Namespace.css.day); if (innerDate.isBefore(this._context._viewDate, Unit.month)) { - classes.push(Namespace.Css.old); + classes.push(Namespace.css.old); } if (innerDate.isAfter(this._context._viewDate, Unit.month)) { - classes.push(Namespace.Css.new); + classes.push(Namespace.css.new); } if (!this._context._unset && this._context.dates.isPicked(innerDate, Unit.date)) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.date)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } if (innerDate.isSame(new DateTime(), Unit.date)) { - classes.push(Namespace.Css.today); + classes.push(Namespace.css.today); } if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { - classes.push(Namespace.Css.weekend); + classes.push(Namespace.css.weekend); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1279,13 +1280,13 @@ document.createElement('div'); if (this._context._options.display.calendarWeeks) { const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + htmlDivElement.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); htmlDivElement.innerText = '#'; row.push(htmlDivElement); } for (let i = 0; i < 7; i++) { const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.Css.dayOfTheWeek, Namespace.Css.noHighlight); + htmlDivElement.classList.add(Namespace.css.dayOfTheWeek, Namespace.css.noHighlight); htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); innerDate.manipulate(1, Unit.date); row.push(htmlDivElement); @@ -1307,7 +1308,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.monthsContainer); + container.classList.add(Namespace.css.monthsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectMonth); @@ -1320,29 +1321,29 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.monthsContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = this._context._viewDate.format({ year: 'numeric' }); + switcher.setAttribute(Namespace.css.monthsContainer, this._context._viewDate.format({ year: 'numeric' })); this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.year), Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.year), Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone.startOf(Unit.year); container .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.month); + classes.push(Namespace.css.month); if (!this._context._unset && this._context.dates.isPicked(innerDate, Unit.month)) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.month)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1420,7 +1421,7 @@ clear() { this._context._unset = true; this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: undefined, oldDate: this.lastPicked, isClear: true, @@ -1476,7 +1477,7 @@ this._dates.splice(index, 1); } this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: undefined, oldDate, isClear, @@ -1502,7 +1503,7 @@ this._context._unset = false; this._context._display._update('all'); this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: target, oldDate, isClear, @@ -1515,7 +1516,7 @@ this._context._viewDate = target.clone; updateInput(); this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: target, oldDate, isClear, @@ -1523,8 +1524,8 @@ }); } this._context._triggerEvent({ - type: Namespace.Events.error, - reason: Namespace.ErrorMessages.failedToSetInvalidDate, + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToSetInvalidDate, date: target, oldDate, }); @@ -1561,7 +1562,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.yearsContainer); + container.classList.add(Namespace.css.yearsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectYear); @@ -1577,17 +1578,17 @@ Dates.getStartEndYear(100, this._context._viewDate.year); this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year); this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year); - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.yearsContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = `${this._startYear.year}-${this._endYear.year}`; + switcher.setAttribute(Namespace.css.yearsContainer, `${this._startYear.year}-${this._endYear.year}`); this._context._validation.isValid(this._startYear, Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._endYear, Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone .startOf(Unit.year) .manipulate(-1, Unit.year); @@ -1595,13 +1596,13 @@ .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.year); + classes.push(Namespace.css.year); if (!this._context._unset && this._context.dates.isPicked(innerDate, Unit.year)) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.year)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1625,7 +1626,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.decadesContainer); + container.classList.add(Namespace.css.decadesContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectDecade); @@ -1643,27 +1644,27 @@ this._startDecade.year = start; this._endDecade = this._context._viewDate.clone.startOf(Unit.year); this._endDecade.year = end; - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.decadesContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = `${this._startDecade.year}-${this._endDecade.year}`; + switcher.setAttribute(Namespace.css.decadesContainer, `${this._startDecade.year}-${this._endDecade.year}`); this._context._validation.isValid(this._startDecade, Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._endDecade, Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); const pickedYears = this._context.dates.picked.map((x) => x.year); container .querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`) .forEach((containerClone, index) => { if (index === 0) { - containerClone.classList.add(Namespace.Css.old); + containerClone.classList.add(Namespace.css.old); if (this._startDecade.year - 10 < 0) { containerClone.textContent = ' '; - previous.classList.add(Namespace.Css.disabled); - containerClone.classList.add(Namespace.Css.disabled); + previous.classList.add(Namespace.css.disabled); + containerClone.classList.add(Namespace.css.disabled); containerClone.setAttribute('data-value', ``); return; } @@ -1674,13 +1675,13 @@ } } let classes = []; - classes.push(Namespace.Css.decade); + classes.push(Namespace.css.decade); const startDecadeYear = this._startDecade.year; const endDecadeYear = this._startDecade.year + 9; if (!this._context._unset && pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) .length > 0) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1704,7 +1705,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.clockContainer); + container.classList.add(Namespace.css.clockContainer); container.append(...this._grid()); return container; } @@ -1714,23 +1715,23 @@ * @private */ _update() { - const timesDiv = this._context._display.widget.getElementsByClassName(Namespace.Css.clockContainer)[0]; + const timesDiv = this._context._display.widget.getElementsByClassName(Namespace.css.clockContainer)[0]; const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; let columns = 0; timesDiv .querySelectorAll('.disabled') - .forEach((element) => element.classList.remove(Namespace.Css.disabled)); + .forEach((element) => element.classList.remove(Namespace.css.disabled)); if (this._context._options.display.components.hours) { columns++; if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.hours), Unit.hours)) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementHours}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.hours), Unit.hours)) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementHours}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.hours}]`).innerText = this._context._options.display.components.useTwentyfourHour ? lastPicked.hoursFormatted @@ -1741,12 +1742,12 @@ if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.minutes), Unit.minutes)) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.minutes), Unit.minutes)) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.minutes}]`).innerText = lastPicked.minutesFormatted; } @@ -1755,12 +1756,12 @@ if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.seconds), Unit.seconds)) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.seconds), Unit.seconds)) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.seconds}]`).innerText = lastPicked.secondsFormatted; } @@ -1769,10 +1770,10 @@ const toggle = timesDiv.querySelector(`[data-action=${ActionTypes.togglePeriod}]`); toggle.innerText = lastPicked.meridiem(); if (!this._context._validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, Unit.hours))) { - toggle.classList.add(Namespace.Css.disabled); + toggle.classList.add(Namespace.css.disabled); } else { - toggle.classList.remove(Namespace.Css.disabled); + toggle.classList.remove(Namespace.css.disabled); } } timesDiv.classList.add(`clock-columns-${columns}`); @@ -1783,7 +1784,7 @@ */ _grid() { const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = this._context._display._iconTag(this._context._options.display.icons.up), downIcon = this._context._display._iconTag(this._context._options.display.icons.down); - separator.classList.add(Namespace.Css.separator, Namespace.Css.noHighlight); + separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); const separatorColon = separator.cloneNode(true); separatorColon.innerHTML = ':'; const getSeparator = (colon = false) => { @@ -1860,7 +1861,7 @@ button.setAttribute('data-action', ActionTypes.togglePeriod); button.setAttribute('tabindex', '-1'); divElement = document.createElement('div'); - divElement.classList.add(Namespace.Css.noHighlight); + divElement.classList.add(Namespace.css.noHighlight); divElement.appendChild(button); middle.push(divElement); divElement = getSeparator(); @@ -1883,7 +1884,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.hourContainer); + container.classList.add(Namespace.css.hourContainer); for (let i = 0; i < (this._context._options.display.components.useTwentyfourHour ? 24 : 12); i++) { const div = document.createElement('div'); @@ -1897,15 +1898,15 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.hourContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.hourContainer)[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.date); container .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.hour); + classes.push(Namespace.css.hour); if (!this._context._validation.isValid(innerDate, Unit.hours)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1932,7 +1933,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.minuteContainer); + container.classList.add(Namespace.css.minuteContainer); let step = this._context._options.stepping === 1 ? 5 : this._context._options.stepping; @@ -1948,7 +1949,7 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.minuteContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.hours); let step = this._context._options.stepping === 1 ? 5 @@ -1957,9 +1958,9 @@ .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.minute); + classes.push(Namespace.css.minute); if (!this._context._validation.isValid(innerDate, Unit.minutes)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -1983,7 +1984,7 @@ */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.secondContainer); + container.classList.add(Namespace.css.secondContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectSecond); @@ -1996,15 +1997,15 @@ * @private */ _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.Css.secondContainer)[0]; + const container = this._context._display.widget.getElementsByClassName(Namespace.css.secondContainer)[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.minutes); container .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`) .forEach((containerClone, index) => { let classes = []; - classes.push(Namespace.Css.second); + classes.push(Namespace.css.second); if (!this._context._validation.isValid(innerDate, Unit.seconds)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); @@ -2109,7 +2110,7 @@ this._update(Unit.year); this._update(Unit.month); this._decadeDisplay._update(); - this._context._display._showMode(); + this._updateCalendarHeader(); break; case 'all': if (this._hasTime) { @@ -2174,7 +2175,7 @@ } if (this._context._options.display.viewMode == 'clock') { this._context._action.do({ - currentTarget: this.widget.querySelector(`.${Namespace.Css.timeContainer}`), + currentTarget: this.widget.querySelector(`.${Namespace.css.timeContainer}`), }, ActionTypes.showClock); } this.widget @@ -2183,15 +2184,15 @@ // show the clock when using sideBySide if (this._context._options.display.sideBySide) { this._timeDisplay._update(); - this.widget.getElementsByClassName(Namespace.Css.clockContainer)[0].style.display = 'grid'; + this.widget.getElementsByClassName(Namespace.css.clockContainer)[0].style.display = 'grid'; } } - this.widget.classList.add(Namespace.Css.show); + this.widget.classList.add(Namespace.css.show); if (!this._context._options.display.inline) { this._popperInstance.update(); document.addEventListener('click', this._documentClickEvent); } - this._context._triggerEvent({ type: Namespace.Events.show }); + this._context._triggerEvent({ type: Namespace.events.show }); this._isVisible = true; } /** @@ -2210,40 +2211,60 @@ this._context._currentViewMode = max; } this.widget - .querySelectorAll(`.${Namespace.Css.dateContainer} > div:not(.${Namespace.Css.calendarHeader}), .${Namespace.Css.timeContainer} > div`) + .querySelectorAll(`.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div`) .forEach((e) => (e.style.display = 'none')); const datePickerMode = DatePickerModes[this._context._currentViewMode]; let picker = this.widget.querySelector(`.${datePickerMode.className}`); + switch (datePickerMode.className) { + case Namespace.css.decadesContainer: + this._decadeDisplay._update(); + break; + case Namespace.css.yearsContainer: + this._yearDisplay._update(); + break; + case Namespace.css.monthsContainer: + this._monthDisplay._update(); + break; + case Namespace.css.daysContainer: + this._dateDisplay._update(); + break; + } + picker.style.display = 'grid'; + this._updateCalendarHeader(); + } + _updateCalendarHeader() { + const showing = [ + ...this.widget.querySelector(`.${Namespace.css.dateContainer} div[style*="display: grid"]`).classList, + ].find((x) => x.startsWith(Namespace.css.dateContainer)); const [previous, switcher, next] = this._context._display.widget - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switch (datePickerMode.className) { - case Namespace.Css.decadesContainer: + switch (showing) { + case Namespace.css.decadesContainer: previous.setAttribute('title', this._context._options.localization.previousCentury); switcher.setAttribute('title', ''); next.setAttribute('title', this._context._options.localization.nextCentury); - this._decadeDisplay._update(); break; - case Namespace.Css.yearsContainer: + case Namespace.css.yearsContainer: previous.setAttribute('title', this._context._options.localization.previousDecade); switcher.setAttribute('title', this._context._options.localization.selectDecade); next.setAttribute('title', this._context._options.localization.nextDecade); - this._yearDisplay._update(); break; - case Namespace.Css.monthsContainer: + case Namespace.css.monthsContainer: previous.setAttribute('title', this._context._options.localization.previousYear); switcher.setAttribute('title', this._context._options.localization.selectYear); next.setAttribute('title', this._context._options.localization.nextYear); - this._monthDisplay._update(); break; - case Namespace.Css.daysContainer: + case Namespace.css.daysContainer: previous.setAttribute('title', this._context._options.localization.previousMonth); switcher.setAttribute('title', this._context._options.localization.selectMonth); next.setAttribute('title', this._context._options.localization.nextMonth); - this._dateDisplay._update(); + switcher.innerText = this._context._viewDate.format({ + month: this._context._options.localization.dayViewHeaderFormat, + }); break; } - picker.style.display = 'grid'; + switcher.innerText = switcher.getAttribute(showing); } /** * Hides the picker if needed. @@ -2251,10 +2272,10 @@ * @fires Events#hide */ hide() { - this.widget.classList.remove(Namespace.Css.show); + this.widget.classList.remove(Namespace.css.show); if (this._isVisible) { this._context._triggerEvent({ - type: Namespace.Events.hide, + type: Namespace.events.hide, date: this._context._unset ? null : this._context.dates.lastPicked @@ -2291,21 +2312,21 @@ */ _buildWidget() { const template = document.createElement('div'); - template.classList.add(Namespace.Css.widget); + template.classList.add(Namespace.css.widget); const dateView = document.createElement('div'); - dateView.classList.add(Namespace.Css.dateContainer); + dateView.classList.add(Namespace.css.dateContainer); dateView.append(this._headTemplate, this._decadeDisplay._picker, this._yearDisplay._picker, this._monthDisplay._picker, this._dateDisplay._picker); const timeView = document.createElement('div'); - timeView.classList.add(Namespace.Css.timeContainer); + timeView.classList.add(Namespace.css.timeContainer); timeView.appendChild(this._timeDisplay._picker); timeView.appendChild(this._hourDisplay._picker); timeView.appendChild(this._minuteDisplay._picker); timeView.appendChild(this._secondDisplay._picker); const toolbar = document.createElement('div'); - toolbar.classList.add(Namespace.Css.toolbar); + toolbar.classList.add(Namespace.css.toolbar); toolbar.append(...this._toolbar); if (this._context._options.display.inline) { - template.classList.add(Namespace.Css.inline); + template.classList.add(Namespace.css.inline); } if (this._context._options.display.calendarWeeks) { template.classList.add('calendarWeeks'); @@ -2313,7 +2334,7 @@ if (this._context._options.display.sideBySide && this._hasDate && this._hasTime) { - template.classList.add(Namespace.Css.sideBySide); + template.classList.add(Namespace.css.sideBySide); if (this._context._options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } @@ -2335,17 +2356,17 @@ } if (this._hasDate) { if (this._hasTime) { - dateView.classList.add(Namespace.Css.collapse); + dateView.classList.add(Namespace.css.collapse); if (this._context._options.display.viewMode !== 'clock') - dateView.classList.add(Namespace.Css.show); + dateView.classList.add(Namespace.css.show); } template.appendChild(dateView); } if (this._hasTime) { if (this._hasDate) { - timeView.classList.add(Namespace.Css.collapse); + timeView.classList.add(Namespace.css.collapse); if (this._context._options.display.viewMode === 'clock') - timeView.classList.add(Namespace.Css.show); + timeView.classList.add(Namespace.css.show); } template.appendChild(timeView); } @@ -2429,16 +2450,16 @@ */ get _headTemplate() { const calendarHeader = document.createElement('div'); - calendarHeader.classList.add(Namespace.Css.calendarHeader); + calendarHeader.classList.add(Namespace.css.calendarHeader); const previous = document.createElement('div'); - previous.classList.add(Namespace.Css.previous); + previous.classList.add(Namespace.css.previous); previous.setAttribute('data-action', ActionTypes.previous); previous.appendChild(this._iconTag(this._context._options.display.icons.previous)); const switcher = document.createElement('div'); - switcher.classList.add(Namespace.Css.switch); + switcher.classList.add(Namespace.css.switch); switcher.setAttribute('data-action', ActionTypes.pickerSwitch); const next = document.createElement('div'); - next.classList.add(Namespace.Css.next); + next.classList.add(Namespace.css.next); next.setAttribute('data-action', ActionTypes.next); next.appendChild(this._iconTag(this._context._options.display.icons.next)); calendarHeader.append(previous, switcher, next); @@ -2600,7 +2621,7 @@ if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); } case 'minDate': { if (value === undefined) { @@ -2610,7 +2631,7 @@ if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); } case 'maxDate': { if (value === undefined) { @@ -2620,7 +2641,7 @@ if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); } case 'disabledHours': if (value === undefined) { @@ -2628,7 +2649,7 @@ } this._typeCheckNumberArray('restrictions.disabledHours', value, providedType); if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.ErrorMessages.numbersOutOfRage('restrictions.disabledHours', 0, 23); + Namespace.errorMessages.numbersOutOfRage('restrictions.disabledHours', 0, 23); return value; case 'enabledHours': if (value === undefined) { @@ -2636,7 +2657,7 @@ } this._typeCheckNumberArray('restrictions.enabledHours', value, providedType); if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.ErrorMessages.numbersOutOfRage('restrictions.enabledHours', 0, 23); + Namespace.errorMessages.numbersOutOfRage('restrictions.enabledHours', 0, 23); return value; case 'daysOfWeekDisabled': if (value === undefined) { @@ -2644,7 +2665,7 @@ } this._typeCheckNumberArray('restrictions.daysOfWeekDisabled', value, providedType); if (value.filter((x) => x < 0 || x > 6).length > 0) - Namespace.ErrorMessages.numbersOutOfRage('restrictions.daysOfWeekDisabled', 0, 6); + Namespace.errorMessages.numbersOutOfRage('restrictions.daysOfWeekDisabled', 0, 6); return value; case 'enabledDates': if (value === undefined) { @@ -2663,7 +2684,7 @@ return []; } if (!Array.isArray(value)) { - Namespace.ErrorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }'); + Namespace.errorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }'); } const valueObject = value; for (let i = 0; i < valueObject.length; i++) { @@ -2672,7 +2693,7 @@ let d = valueObject[i][vk]; const dateTime = this._dateConversion(d, subOptionName); if (!dateTime) { - Namespace.ErrorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); } valueObject[i][vk] = dateTime; }); @@ -2696,7 +2717,7 @@ }; const keyOptions = optionValues[key]; if (!keyOptions.includes(value)) - Namespace.ErrorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); + Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); return value; case 'inputFormat': return value; @@ -2713,7 +2734,7 @@ case 'function': return value; default: - Namespace.ErrorMessages.typeMismatch(path.substring(1), providedType, defaultType); + Namespace.errorMessages.typeMismatch(path.substring(1), providedType, defaultType); } } }; @@ -2736,7 +2757,7 @@ error += `Did you mean "${didYouMean}"?`; return error; }); - Namespace.ErrorMessages.unexpectedOptions(errors); + Namespace.errorMessages.unexpectedOptions(errors); } Object.keys(mergeOption).forEach((key) => { const defaultOptionValue = mergeOption[key]; @@ -2854,13 +2875,13 @@ */ static _typeCheckDateArray(optionName, value, providedType) { if (!Array.isArray(value)) { - Namespace.ErrorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date'); + Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date'); } for (let i = 0; i < value.length; i++) { let d = value[i]; const dateTime = this._dateConversion(d, optionName); if (!dateTime) { - Namespace.ErrorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); } value[i] = dateTime; } @@ -2873,7 +2894,7 @@ */ static _typeCheckNumberArray(optionName, value, providedType) { if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) { - Namespace.ErrorMessages.typeMismatch(optionName, providedType, 'array of numbers'); + Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of numbers'); } return; } @@ -2884,11 +2905,11 @@ */ static _dateConversion(d, optionName) { if (typeof d === typeof '') { - Namespace.ErrorMessages.dateString(); + Namespace.errorMessages.dateString(); } const converted = this._dateTypeCheck(d); if (!converted) { - Namespace.ErrorMessages.failedToParseDate(optionName, d); + Namespace.errorMessages.failedToParseDate(optionName, d); } return converted; } @@ -2908,10 +2929,10 @@ static _validateConflcits(config) { if (config.restrictions.minDate && config.restrictions.maxDate) { if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { - Namespace.ErrorMessages.conflictingConfiguration('minDate is after maxDate'); + Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); } if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { - Namespace.ErrorMessages.conflictingConfiguration('maxDate is before minDate'); + Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); } } } @@ -2940,8 +2961,8 @@ } else { this._triggerEvent({ - type: Namespace.Events.error, - reason: Namespace.ErrorMessages.failedToParseInput, + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToParseInput, date: parsedDate, }); } @@ -2955,7 +2976,7 @@ this.toggle(); }; if (!element) { - Namespace.ErrorMessages.mustProvideElement; + Namespace.errorMessages.mustProvideElement; } this._element = element; this._options = this._initializeOptions(options, DefaultOptions, true); @@ -3065,7 +3086,7 @@ callBackArray = callbacks; } if (eventTypes.length !== callBackArray.length) { - Namespace.ErrorMessages.subscribeMismatch; + Namespace.errorMessages.subscribeMismatch; } const returnArray = []; for (let i = 0; i < eventTypes.length; i++) { @@ -3146,7 +3167,7 @@ */ _viewUpdate(unit) { this._triggerEvent({ - type: Namespace.Events.update, + type: Namespace.events.update, change: unit, viewDate: this._viewDate.clone, }); @@ -3266,7 +3287,7 @@ !this._display._hasTime || ( // clock component is already showing - (_a = this._display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.Css.show)[0].classList.contains(Namespace.Css.timeContainer))) + (_a = this._display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.css.show)[0].classList.contains(Namespace.css.timeContainer))) return; // First time ever. If useCurrent option is set to true (default), do nothing // because the first date is selected automatically. @@ -3279,7 +3300,7 @@ this._currentPromptTimeTimeout = setTimeout(() => { if (this._display.widget) { this._action.do({ - currentTarget: this._display.widget.querySelector(`.${Namespace.Css.switch} div`), + currentTarget: this._display.widget.querySelector(`.${Namespace.css.switch} div`), }, ActionTypes.togglePicker); } }, this._options.promptTimeOnDateChangeTransitionDelay); diff --git a/docs/6/js/tempus-dominus.js.map b/docs/6/js/tempus-dominus.js.map index 696ca1790..1e59d479f 100644 --- a/docs/6/js/tempus-dominus.js.map +++ b/docs/6/js/tempus-dominus.js.map @@ -1 +1 @@ -{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/errors.ts","../../src/js/namespace.ts","../../src/js/conts.ts","../../src/js/display/collapse.ts","../../src/js/actions.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/dates.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/index.ts","../../src/js/validation.ts","../../src/js/options.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\ninterface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n /**\n * Used with Intl.DateTimeFormat\n */\n locale = 'default';\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n */\n setLocale(value: string): this {\n this.locale = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n */\n static convert(date: Date): DateTime {\n if (!date) throw `A date is required`;\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n );\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocale(this.locale);\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n */\n startOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(0 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n */\n endOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(6 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.year);\n this.setDate(0);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n this[unit] += value;\n return this;\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An object. Uses browser defaults otherwise.\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(template: DateTimeFormatOptions, locale = this.locale): string {\n return new Intl.DateTimeFormat(locale, template).format(this);\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n return (\n ((leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit)) &&\n (rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit))) ||\n ((leftInclusivity\n ? this.isBefore(left, unit)\n : !this.isAfter(left, unit)) &&\n (rightInclusivity\n ? this.isAfter(right, unit)\n : !this.isBefore(right, unit)))\n );\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.locale,\n template: any = { dateStyle: 'full', timeStyle: 'long' }\n ) {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit hours\n */\n get minutesFormatted(): string {\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hours\n */\n get hoursFormatted(): string {\n return this.hours < 10 ? `0${this.hours}` : `${this.hours}`;\n }\n\n /**\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\n */\n get twelveHoursFormatted(): string {\n let hour = this.hours;\n if (hour > 12) hour = hour - 12;\n if (hour === 0) hour = 12;\n return hour < 10 ? `0${hour}` : `${hour}`;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.locale): string {\n /*\n for some reason this stopped returning \"AM/PM\" and returned \"in the morning\"\n const dayPeriod = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n dayPeriod: 'narrow',\n } as any)\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;*/\n return this.hours <= 12 ? 'AM' : 'PM';\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\n }\n\n // https://github.com/you-dont-need/You-Dont-Need-Momentjs#week-of-year\n /**\n * Gets the week of the year\n */\n get week(): number {\n const MILLISECONDS_IN_WEEK = 604800000;\n const firstDayOfWeek = 1; // monday as the first day (0 = sunday)\n const startOfYear = new Date(this.year, 0, 1);\n startOfYear.setDate(\n startOfYear.getDate() + (firstDayOfWeek - (startOfYear.getDay() % 7))\n );\n return (\n Math.round(\n (this.valueOf() - startOfYear.valueOf()) / MILLISECONDS_IN_WEEK\n ) + 1\n );\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n}\n","import Namespace from './namespace';\n\nexport class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalide string or an invalid Date object.\n * @param optionName\n * @param date\n */\n failedToParseDate(optionName: string, date: any) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for option ${optionName}.`\n );\n error.code = 5;\n throw error;\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\n );\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-alpha1',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static Events = new Events();\n\n static Css = new Css();\n\n static ErrorMessages = new ErrorMessages();\n}\n","import { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options from './options';\n\nconst DefaultOptions: Options = {\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: [],\n },\n display: {\n icons: {\n type: 'icons',\n time: 'fas fa-clock',\n date: 'fas fa-calendar',\n up: 'fas fa-arrow-up',\n down: 'fas fa-arrow-down',\n previous: 'fas fa-chevron-left',\n next: 'fas fa-chevron-right',\n today: 'fas fa-calendar-check',\n clear: 'fas fa-trash',\n close: 'fas fa-times',\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false,\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: false,\n },\n inputFormat: undefined,\n inline: false,\n },\n stepping: 1,\n useCurrent: true,\n defaultDate: undefined,\n localization: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n previousYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n previousDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n previousCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n togglePeriod: 'Toggle Period',\n selectTime: 'Select Time',\n selectDate: 'Select Date',\n dayViewHeaderFormat: 'long',\n locale: 'default',\n },\n keepInvalid: false,\n debug: false,\n allowInputToggle: false,\n viewDate: new DateTime(),\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n};\n\nconst DatePickerModes: {\n name: string;\n className: string;\n unit: Unit;\n step: number;\n}[] = [\n {\n name: 'calendar',\n className: Namespace.Css.daysContainer,\n unit: Unit.month,\n step: 1,\n },\n {\n name: 'months',\n className: Namespace.Css.monthsContainer,\n unit: Unit.year,\n step: 1,\n },\n {\n name: 'years',\n className: Namespace.Css.yearsContainer,\n unit: Unit.year,\n step: 10,\n },\n {\n name: 'decades',\n className: Namespace.Css.decadesContainer,\n unit: Unit.year,\n step: 100,\n },\n];\n\nexport { DefaultOptions, DatePickerModes, Namespace };\n","import Namespace from '../namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n private timeOut;\r\n\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n toggle(target: HTMLElement) {\r\n if (target.classList.contains(Namespace.Css.show)) {\r\n this.hide(target);\r\n } else {\r\n this.show(target);\r\n }\r\n }\r\n\r\n /**\r\n * If `target` is not already showing, then show after the animation.\r\n * @param target\r\n */\r\n show(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.Css.collapsing) ||\r\n target.classList.contains(Namespace.Css.show)\r\n )\r\n return;\r\n\r\n const complete = () => {\r\n target.classList.remove(Namespace.Css.collapsing);\r\n target.classList.add(Namespace.Css.collapse, Namespace.Css.show);\r\n target.style.height = '';\r\n this.timeOut = null;\r\n };\r\n\r\n target.style.height = '0';\r\n target.classList.remove(Namespace.Css.collapse);\r\n target.classList.add(Namespace.Css.collapsing);\r\n\r\n this.timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n target.style.height = `${target.scrollHeight}px`;\r\n }\r\n\r\n /**\r\n * If `target` is not already hidden, then hide after the animation.\r\n * @param target HTML Element\r\n */\r\n hide(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.Css.collapsing) ||\r\n !target.classList.contains(Namespace.Css.show)\r\n )\r\n return;\r\n\r\n const complete = () => {\r\n target.classList.remove(Namespace.Css.collapsing);\r\n target.classList.add(Namespace.Css.collapse);\r\n this.timeOut = null;\r\n };\r\n\r\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\r\n\r\n const reflow = (element) => element.offsetHeight;\r\n\r\n reflow(target);\r\n\r\n target.classList.remove(Namespace.Css.collapse, Namespace.Css.show);\r\n target.classList.add(Namespace.Css.collapsing);\r\n target.style.height = '';\r\n\r\n this.timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n }\r\n\r\n /**\r\n * Gets the transition duration from the `element` by getting css properties\r\n * `transition-duration` and `transition-delay`\r\n * @param element HTML Element\r\n */\r\n private getTransitionDurationFromElement = (element: HTMLElement) => {\r\n if (!element) {\r\n return 0;\r\n }\r\n\r\n // Get transition-duration of the element\r\n let { transitionDuration, transitionDelay } = window.getComputedStyle(\r\n element\r\n );\r\n\r\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\r\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\r\n\r\n // Return 0 if element or transition duration is not found\r\n if (!floatTransitionDuration && !floatTransitionDelay) {\r\n return 0;\r\n }\r\n\r\n // If multiple durations are defined, take the first\r\n transitionDuration = transitionDuration.split(',')[0];\r\n transitionDelay = transitionDelay.split(',')[0];\r\n\r\n return (\r\n (Number.parseFloat(transitionDuration) +\r\n Number.parseFloat(transitionDelay)) *\r\n 1000\r\n );\r\n };\r\n}\r\n","import { DatePickerModes } from './conts.js';\nimport { DateTime, Unit } from './datetime';\nimport { TempusDominus } from './tempus-dominus';\nimport Collapse from './display/collapse';\nimport Namespace from './namespace';\n\n/**\n *\n */\nexport default class Actions {\n private _context: TempusDominus;\n private collapse: Collapse;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this.collapse = new Collapse();\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e.currentTarget;\n if (currentTarget.classList.contains(Namespace.Css.disabled)) return false;\n action = action || currentTarget.dataset.action;\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`\n * @param unit\n * @param value Value to change by\n */\n const manipulateAndSet = (unit: Unit, value = 1) => {\n const newDate = lastPicked.manipulate(value, unit);\n if (this._context._validation.isValid(newDate, unit)) {\n /*if (this.context.dates.lastPickedIndex < 0) {\n this.date(newDate);\n }*/\n this._context.dates._setValue(\n newDate,\n this._context.dates.lastPickedIndex\n );\n }\n };\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n const { unit, step } = DatePickerModes[this._context._currentViewMode];\n if (action === ActionTypes.next)\n this._context._viewDate.manipulate(step, unit);\n else this._context._viewDate.manipulate(step * -1, unit);\n this._context._display._showMode();\n this._context._viewUpdate(unit);\n break;\n case ActionTypes.pickerSwitch:\n this._context._display._showMode(1);\n this._context._viewUpdate(\n DatePickerModes[this._context._currentViewMode].unit\n );\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.getAttribute('data-value');\n switch (action) {\n case ActionTypes.selectMonth:\n this._context._viewDate.month = value;\n this._context._viewUpdate(Unit.month);\n break;\n case ActionTypes.selectYear:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n case ActionTypes.selectDecade:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n }\n\n if (\n this._context._currentViewMode === this._context._minViewModeNumber\n ) {\n this._context.dates._setValue(\n this._context._viewDate,\n this._context.dates.lastPickedIndex\n );\n if (!this._context._options.display.inline) {\n this._context._display.hide();\n }\n } else {\n this._context._display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this._context._viewDate.clone;\n if (currentTarget.classList.contains(Namespace.Css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.Css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.innerText;\n let index = 0;\n if (this._context._options.multipleDates) {\n index = this._context.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this._context.dates._setValue(null, index); //deselect multi-date\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex + 1\n );\n }\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex\n );\n }\n\n if (\n !this._context._display._hasTime &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline &&\n !this._context._options.multipleDates\n ) {\n this._context._display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.getAttribute('data-value');\n lastPicked.hours = hour;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.minutes &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.seconds &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.incrementHours:\n manipulateAndSet(Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping);\n break;\n case ActionTypes.incrementSeconds:\n manipulateAndSet(Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n manipulateAndSet(Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping * -1);\n break;\n case ActionTypes.decrementSeconds:\n manipulateAndSet(Unit.seconds, -1);\n break;\n case ActionTypes.togglePeriod:\n manipulateAndSet(\n Unit.hours,\n this._context.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n this._context._display.widget\n .querySelectorAll(\n `.${Namespace.Css.dateContainer}, .${Namespace.Css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) =>\n this.collapse.toggle(htmlElement)\n );\n\n if (\n currentTarget.getAttribute('title') ===\n this._context._options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectTime\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.time\n ).outerHTML;\n\n this._context._display._showMode();\n } else {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectDate\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.date\n ).outerHTML;\n this.do(e, ActionTypes.showClock);\n this._context._display._update('clock');\n }\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this._context._display.widget\n .querySelectorAll(`.${Namespace.Css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.Css.clockContainer;\n this._context._display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.Css.hourContainer;\n this._context._display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.Css.minuteContainer;\n this._context._display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.Css.secondContainer;\n this._context._display._update(Unit.seconds);\n break;\n }\n\n ((\n this._context._display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this._context.dates._setValue(null);\n this._context._display._showMode();\n break;\n case ActionTypes.close:\n this._context._display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n this._context._viewDate = today;\n if (this._context._validation.isValid(today, Unit.date))\n this._context.dates._setValue(\n today,\n this._context.dates.lastPickedIndex\n );\n break;\n }\n }\n}\n\nexport enum ActionTypes {\n next = 'next',\n previous = 'previous',\n pickerSwitch = 'pickerSwitch',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n togglePeriod = 'togglePeriod',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.Css.calendarWeeks,\n Namespace.Css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = this._context._viewDate.format({\n month: this._context._options.localization.dayViewHeaderFormat,\n });\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay')\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.Css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement, index) => {\n if (\n this._context._options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.Css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes = [];\n classes.push(Namespace.Css.day);\n\n if (innerDate.isBefore(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.Css.old);\n }\n if (innerDate.isAfter(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.Css.new);\n }\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.Css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.Css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.Css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.Css.weekend);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.innerText = `${innerDate.date}`;\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this._context._viewDate.clone\n .startOf('weekDay')\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this._context._options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.Css.calendarWeeks,\n Namespace.Css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.Css.dayOfTheWeek,\n Namespace.Css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = this._context._viewDate.format({ year: 'numeric' });\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n let innerDate = this._context._viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.month);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.Css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport { ChangeEvent, FailEvent } from './event-types';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return this._dates;\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex];\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!unit) return this._dates.indexOf(targetDate);\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this._context._unset = true;\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n _setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this._context._unset ? null : this._dates[index];\n if (!oldDate && !this._context._unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n const updateInput = () => {\n if (!this._context._input) return;\n\n let newValue =\n target?.format(this._context._options.display.inputFormat) || '';\n if (this._context._options.multipleDates) {\n newValue = this._dates\n .map((d) => d.format(this._context._options.display.inputFormat))\n .join(this._context._options.multipleDatesSeparator);\n }\n if (this._context._input.value != newValue)\n this._context._input.value = newValue;\n };\n\n // case of calling setValue(null)\n if (!target) {\n if (\n !this._context._options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this._context._unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n updateInput();\n this._context._display._update('all');\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this._context._options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this._context._options.stepping) *\n this._context._options.stepping;\n target.seconds = 0;\n }\n\n if (this._context._validation.isValid(target)) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._unset = false;\n this._context._display._update('all');\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: target,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n return;\n }\n\n if (this._context._options.keepInvalid) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._triggerEvent({\n type: Namespace.Events.change,\n date: target,\n oldDate,\n isClear,\n isValid: false,\n } as ChangeEvent);\n }\n this._context._triggerEvent({\n type: Namespace.Events.error,\n reason: Namespace.ErrorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n\n /**\n * Returns a format object based on the granularity of `unit`\n * @param unit\n */\n static getFormatByUnit(unit: Unit): object {\n switch (unit) {\n case 'date':\n return { dateStyle: 'short' };\n case 'month':\n return {\n month: 'numeric',\n year: 'numeric',\n };\n case 'year':\n return { year: 'numeric' };\n }\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\nimport Dates from '../../dates';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _context: TempusDominus;\n private _startYear: DateTime;\n private _endYear: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year);\n this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year);\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.yearsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = `${this._startYear.year}-${this._endYear.year}`;\n\n this._context._validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n this._context._validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.year);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.Css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = `${innerDate.year}`;\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _context: TempusDominus;\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.decadesContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.innerText = `${this._startDecade.year}-${this._endDecade.year}`;\n\n this._context._validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.Css.disabled)\n : previous.classList.add(Namespace.Css.disabled);\n this._context._validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.Css.disabled)\n : next.classList.add(Namespace.Css.disabled);\n\n const pickedYears = this._context.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.Css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.Css.disabled);\n containerClone.classList.add(Namespace.Css.disabled);\n containerClone.setAttribute('data-value', ``);\n return;\n } else {\n containerClone.innerText = `${this._startDecade.year - 10}`;\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n return;\n }\n }\n\n let classes = [];\n classes.push(Namespace.Css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this._context._unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.Css.active);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n containerClone.innerText = `${this._startDecade.year}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _context: TempusDominus;\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.clockContainer);\n\n container.append(...this._grid());\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(): void {\n const timesDiv = this._context._display.widget.getElementsByClassName(\n Namespace.Css.clockContainer\n )[0];\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n let columns = 0;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.Css.disabled));\n\n if (this._context._options.display.components.hours) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.Css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.Css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this._context._options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this._context._options.display.components.minutes) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.Css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.Css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this._context._options.display.components.seconds) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.Css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.Css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n columns++;\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.togglePeriod}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this._context._validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.Css.disabled);\n } else {\n toggle.classList.remove(Namespace.Css.disabled);\n }\n }\n\n timesDiv.classList.add(`clock-columns-${columns}`);\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(): HTMLElement[] {\n const\n top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = this._context._display._iconTag(\n this._context._options.display.icons.up\n ),\n downIcon = this._context._display._iconTag(\n this._context._options.display.icons.down\n );\n\n separator.classList.add(Namespace.Css.separator, Namespace.Css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this._context._options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.minutes) {\n if (this._context._options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.seconds) {\n if (this._context._options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this._context._options.localization.togglePeriod\n );\n button.setAttribute('data-action', ActionTypes.togglePeriod);\n button.setAttribute('tabindex', '-1');\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.Css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this._context._options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.hourContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.hour);\n\n if (!this._context._validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this._context._options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.minuteContainer);\n\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.minuteContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.hours);\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.minute);\n\n if (!this._context._validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.minutes}`);\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.Css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.Css.secondContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.Css.second);\n\n if (!this._context._validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.Css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import DateDisplay from './calendar/date-display';\nimport MonthDisplay from './calendar/month-display';\nimport YearDisplay from './calendar/year-display';\nimport DecadeDisplay from './calendar/decade-display';\nimport TimeDisplay from './time/time-display';\nimport HourDisplay from './time/hour-display';\nimport MinuteDisplay from './time/minute-display';\nimport SecondDisplay from './time/second-display';\nimport { DateTime, Unit } from '../datetime';\nimport { DatePickerModes } from '../conts';\nimport { TempusDominus } from '../tempus-dominus';\nimport { ActionTypes } from '../actions';\nimport { createPopper } from '@popperjs/core';\nimport Namespace from '../namespace';\nimport { HideEvent } from '../event-types';\n\n/**\n * Main class for all things display related.\n */\nexport default class Display {\n private _context: TempusDominus;\n private _dateDisplay: DateDisplay;\n private _monthDisplay: MonthDisplay;\n private _yearDisplay: YearDisplay;\n private _decadeDisplay: DecadeDisplay;\n private _timeDisplay: TimeDisplay;\n private _widget: HTMLElement;\n private _hourDisplay: HourDisplay;\n private _minuteDisplay: MinuteDisplay;\n private _secondDisplay: SecondDisplay;\n private _popperInstance: any;\n private _isVisible = false;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this._dateDisplay = new DateDisplay(context);\n this._monthDisplay = new MonthDisplay(context);\n this._yearDisplay = new YearDisplay(context);\n this._decadeDisplay = new DecadeDisplay(context);\n this._timeDisplay = new TimeDisplay(context);\n this._hourDisplay = new HourDisplay(context);\n this._minuteDisplay = new MinuteDisplay(context);\n this._secondDisplay = new SecondDisplay(context);\n\n this._widget = undefined;\n }\n\n /**\n * Returns the widget body or undefined\n * @private\n */\n get widget(): HTMLElement | undefined {\n return this._widget;\n }\n\n /**\n * Returns this visible state of the picker (shown)\n */\n get isVisible() {\n return this._isVisible;\n }\n\n /**\n * Updates the table for a particular unit. Used when an option as changed or\n * whenever the class list might need to be refreshed.\n * @param unit\n * @private\n */\n _update(unit: Unit | 'clock' | 'calendar' | 'all'): void {\n if (!this.widget) return;\n //todo do I want some kind of error catching or other guards here?\n switch (unit) {\n case Unit.seconds:\n this._secondDisplay._update();\n break;\n case Unit.minutes:\n this._minuteDisplay._update();\n break;\n case Unit.hours:\n this._hourDisplay._update();\n break;\n case Unit.date:\n this._dateDisplay._update();\n break;\n case Unit.month:\n this._monthDisplay._update();\n break;\n case Unit.year:\n this._yearDisplay._update();\n break;\n case 'clock':\n this._timeDisplay._update();\n this._update(Unit.hours);\n this._update(Unit.minutes);\n this._update(Unit.seconds);\n break;\n case 'calendar':\n this._update(Unit.date);\n this._update(Unit.year);\n this._update(Unit.month);\n this._decadeDisplay._update();\n this._context._display._showMode();\n break;\n case 'all':\n if (this._hasTime) {\n this._update('clock');\n }\n if (this._hasDate) {\n this._update('calendar');\n }\n }\n }\n\n /**\n * Shows the picker and creates a Popper instance if needed.\n * Add document click event to hide when clicking outside the picker.\n * @fires Events#show\n */\n show(): void {\n if (this.widget == undefined) {\n if (\n this._context._options.useCurrent &&\n !this._context._options.defaultDate\n ) {\n //todo in the td4 branch a pr changed this to allow granularity\n const date = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n if (!this._context._options.keepInvalid) {\n let tries = 0;\n let direction = 1;\n if (this._context._options.restrictions.maxDate?.isBefore(date)) {\n direction = -1;\n }\n while (!this._context._validation.isValid(date)) {\n date.manipulate(direction, Unit.date);\n if (tries > 31) break;\n tries++;\n }\n }\n this._context.dates._setValue(date);\n }\n\n if (this._context._options.defaultDate) {\n this._context.dates._setValue(this._context._options.defaultDate);\n }\n\n this._buildWidget();\n if (this._hasDate) {\n this._showMode();\n }\n\n if (!this._context._options.display.inline) {\n document.body.appendChild(this.widget);\n\n this._popperInstance = createPopper(\n this._context._element,\n this.widget,\n {\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [2, 8],\n },\n },\n { name: 'eventListeners', enabled: true },\n ],\n placement: 'auto',\n }\n );\n } else {\n this._context._element.appendChild(this.widget);\n }\n\n if (this._context._options.display.viewMode == 'clock') {\n this._context._action.do(\n {\n currentTarget: this.widget.querySelector(\n `.${Namespace.Css.timeContainer}`\n ),\n },\n ActionTypes.showClock\n );\n }\n\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.addEventListener('click', this._actionsClickEvent)\n );\n\n // show the clock when using sideBySide\n if (this._context._options.display.sideBySide) {\n this._timeDisplay._update();\n (\n this.widget.getElementsByClassName(\n Namespace.Css.clockContainer\n )[0] as HTMLElement\n ).style.display = 'grid';\n }\n }\n\n this.widget.classList.add(Namespace.Css.show);\n if (!this._context._options.display.inline) {\n this._popperInstance.update();\n document.addEventListener('click', this._documentClickEvent);\n }\n this._context._triggerEvent({ type: Namespace.Events.show });\n this._isVisible = true;\n }\n\n /**\n * Changes the calendar view mode. E.g. month <-> year\n * @param direction -/+ number to move currentViewMode\n * @private\n */\n _showMode(direction?: number): void {\n if (!this.widget) {\n return;\n }\n if (direction) {\n const max = Math.max(\n this._context._minViewModeNumber,\n Math.min(3, this._context._currentViewMode + direction)\n );\n if (this._context._currentViewMode == max) return;\n this._context._currentViewMode = max;\n }\n\n this.widget\n .querySelectorAll(\n `.${Namespace.Css.dateContainer} > div:not(.${Namespace.Css.calendarHeader}), .${Namespace.Css.timeContainer} > div`\n )\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\n\n const datePickerMode = DatePickerModes[this._context._currentViewMode];\n let picker: HTMLElement = this.widget.querySelector(\n `.${datePickerMode.className}`\n );\n\n const [previous, switcher, next] = this._context._display.widget\n .getElementsByClassName(Namespace.Css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switch (datePickerMode.className) {\n case Namespace.Css.decadesContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousCentury\n );\n switcher.setAttribute('title', '');\n next.setAttribute(\n 'title',\n this._context._options.localization.nextCentury\n );\n this._decadeDisplay._update();\n break;\n case Namespace.Css.yearsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousDecade\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectDecade\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextDecade\n );\n this._yearDisplay._update();\n break;\n case Namespace.Css.monthsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousYear\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectYear\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextYear\n );\n this._monthDisplay._update();\n break;\n case Namespace.Css.daysContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousMonth\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectMonth\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextMonth\n );\n this._dateDisplay._update();\n break;\n }\n\n picker.style.display = 'grid';\n }\n\n /**\n * Hides the picker if needed.\n * Remove document click event to hide when clicking outside the picker.\n * @fires Events#hide\n */\n hide(): void {\n this.widget.classList.remove(Namespace.Css.show);\n\n if (this._isVisible) {\n this._context._triggerEvent({\n type: Namespace.Events.hide,\n date: this._context._unset\n ? null\n : this._context.dates.lastPicked\n ? this._context.dates.lastPicked.clone\n : void 0,\n } as HideEvent);\n this._isVisible = false;\n }\n\n document.removeEventListener('click', this._documentClickEvent);\n }\n\n /**\n * Toggles the picker's open state. Fires a show/hide event depending.\n */\n toggle() {\n return this._isVisible ? this.hide() : this.show();\n }\n\n /**\n * Removes document and data-action click listener and reset the widget\n * @private\n */\n _dispose() {\n document.removeEventListener('click', this._documentClickEvent);\n if (!this.widget) return;\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.removeEventListener('click', this._actionsClickEvent)\n );\n this.widget.parentNode.removeChild(this.widget);\n this._widget = undefined;\n }\n\n /**\n * Builds the widgets html template.\n * @private\n */\n private _buildWidget(): HTMLElement {\n const template = document.createElement('div');\n template.classList.add(Namespace.Css.widget);\n\n const dateView = document.createElement('div');\n dateView.classList.add(Namespace.Css.dateContainer);\n dateView.append(\n this._headTemplate,\n this._decadeDisplay._picker,\n this._yearDisplay._picker,\n this._monthDisplay._picker,\n this._dateDisplay._picker\n );\n\n const timeView = document.createElement('div');\n timeView.classList.add(Namespace.Css.timeContainer);\n timeView.appendChild(this._timeDisplay._picker);\n timeView.appendChild(this._hourDisplay._picker);\n timeView.appendChild(this._minuteDisplay._picker);\n timeView.appendChild(this._secondDisplay._picker);\n\n const toolbar = document.createElement('div');\n toolbar.classList.add(Namespace.Css.toolbar);\n toolbar.append(...this._toolbar);\n\n if (this._context._options.display.inline) {\n template.classList.add(Namespace.Css.inline);\n }\n\n if (this._context._options.display.calendarWeeks) {\n template.classList.add('calendarWeeks');\n }\n\n if (\n this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n template.classList.add(Namespace.Css.sideBySide);\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n const row = document.createElement('div');\n row.classList.add('td-row');\n dateView.classList.add('td-half');\n timeView.classList.add('td-half');\n\n row.appendChild(dateView);\n row.appendChild(timeView);\n template.appendChild(row);\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n this._widget = template;\n return;\n }\n\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n\n if (this._hasDate) {\n if (this._hasTime) {\n dateView.classList.add(Namespace.Css.collapse);\n if (this._context._options.display.viewMode !== 'clock')\n dateView.classList.add(Namespace.Css.show);\n }\n template.appendChild(dateView);\n }\n\n if (this._hasTime) {\n if (this._hasDate) {\n timeView.classList.add(Namespace.Css.collapse);\n if (this._context._options.display.viewMode === 'clock')\n timeView.classList.add(Namespace.Css.show);\n }\n template.appendChild(timeView);\n }\n\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n\n const arrow = document.createElement('div');\n arrow.classList.add('arrow');\n arrow.setAttribute('data-popper-arrow', '');\n template.appendChild(arrow);\n\n this._widget = template;\n }\n\n /**\n * Returns true if the hours, minutes, or seconds component is turned on\n */\n get _hasTime(): boolean {\n return (\n this._context._options.display.components.clock &&\n (this._context._options.display.components.hours ||\n this._context._options.display.components.minutes ||\n this._context._options.display.components.seconds)\n );\n }\n\n /**\n * Returns true if the year, month, or date component is turned on\n */\n get _hasDate(): boolean {\n return (\n this._context._options.display.components.calendar &&\n (this._context._options.display.components.year ||\n this._context._options.display.components.month ||\n this._context._options.display.components.date)\n );\n }\n\n /**\n * Get the toolbar html based on options like buttons.today\n * @private\n */\n get _toolbar(): HTMLElement[] {\n const toolbar = [];\n\n if (this._context._options.display.buttons.today) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.today);\n div.setAttribute('title', this._context._options.localization.today);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.today)\n );\n toolbar.push(div);\n }\n if (\n !this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n let title, icon;\n if (this._context._options.display.viewMode === 'clock') {\n title = this._context._options.localization.selectDate;\n icon = this._context._options.display.icons.date;\n } else {\n title = this._context._options.localization.selectTime;\n icon = this._context._options.display.icons.time;\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.togglePicker);\n div.setAttribute('title', title);\n\n div.appendChild(this._iconTag(icon));\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.clear) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.clear);\n div.setAttribute('title', this._context._options.localization.clear);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.clear)\n );\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.close) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.close);\n div.setAttribute('title', this._context._options.localization.close);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.close)\n );\n toolbar.push(div);\n }\n\n return toolbar;\n }\n\n /***\n * Builds the base header template with next and previous icons\n * @private\n */\n get _headTemplate(): HTMLElement {\n const calendarHeader = document.createElement('div');\n calendarHeader.classList.add(Namespace.Css.calendarHeader);\n\n const previous = document.createElement('div');\n previous.classList.add(Namespace.Css.previous);\n previous.setAttribute('data-action', ActionTypes.previous);\n previous.appendChild(\n this._iconTag(this._context._options.display.icons.previous)\n );\n\n const switcher = document.createElement('div');\n switcher.classList.add(Namespace.Css.switch);\n switcher.setAttribute('data-action', ActionTypes.pickerSwitch);\n\n const next = document.createElement('div');\n next.classList.add(Namespace.Css.next);\n next.setAttribute('data-action', ActionTypes.next);\n next.appendChild(this._iconTag(this._context._options.display.icons.next));\n\n calendarHeader.append(previous, switcher, next);\n return calendarHeader;\n }\n\n /**\n * Builds an icon tag as either an ``\n * or with icons.type is `sprites` then an svg tag instead\n * @param iconClass\n * @private\n */\n _iconTag(iconClass: string): HTMLElement {\n if (this._context._options.display.icons.type === 'sprites') {\n const svg = document.createElement('svg');\n svg.innerHTML = ``;\n return svg;\n }\n const icon = document.createElement('i');\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\n return icon;\n }\n\n /**\n * A document click event to hide the widget if click is outside\n * @private\n * @param e MouseEvent\n */\n private _documentClickEvent = (e: MouseEvent) => {\n if (\n this._isVisible &&\n !e.composedPath().includes(this.widget) && // click inside the widget\n !e.composedPath()?.includes(this._context._element) && // click on the element\n (!this._context._options.display.keepOpen ||\n !this._context._options.debug ||\n !(window as any).debug)\n ) {\n this.hide();\n }\n };\n\n /**\n * Click event for any action like selecting a date\n * @param e MouseEvent\n * @private\n */\n private _actionsClickEvent = (e: MouseEvent) => {\n this._context._action.do(e);\n };\n\n /**\n * Causes the widget to get rebuilt on next show. If the picker is already open\n * then hide and reshow it.\n * @private\n */\n _rebuild() {\n const wasVisible = this._isVisible;\n if (wasVisible) this.hide();\n this._dispose();\n if (wasVisible) {\n this.show();\n }\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Dates from './dates';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provide to chek portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (\n this._context._options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this._context._options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n ) {\n return false;\n }\n\n if (\n this._context._options.restrictions.minDate &&\n targetDate.isBefore(\n this._context._options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.maxDate &&\n targetDate.isAfter(\n this._context._options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (\n this._context._options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.disabledTimeIntervals.length > 0\n ) {\n for (\n let i = 0;\n i < this._context._options.restrictions.disabledTimeIntervals.length;\n i++\n ) {\n if (\n targetDate.isBetween(\n this._context._options.restrictions.disabledTimeIntervals[i].from,\n this._context._options.restrictions.disabledTimeIntervals[i].to\n )\n )\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledDates ||\n this._context._options.restrictions.disabledDates.length === 0\n )\n return false;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.disabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledDates ||\n this._context._options.restrictions.enabledDates.length === 0\n )\n return true;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.enabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledHours ||\n this._context._options.restrictions.disabledHours.length === 0\n )\n return false;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.disabledHours.find(\n (x) => x === formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledHours ||\n this._context._options.restrictions.enabledHours.length === 0\n )\n return true;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.enabledHours.find(\n (x) => x === formattedDate\n );\n }\n}\n","import { DateTime } from './datetime';\nimport DateTimeFormatOptions = Intl.DateTimeFormatOptions;\nimport Namespace from './namespace';\nimport { DefaultOptions } from './conts';\n\nexport default interface Options {\n restrictions: {\n minDate: DateTime;\n maxDate: DateTime;\n enabledDates: DateTime[];\n disabledDates: DateTime[];\n enabledHours: number[];\n disabledHours: number[];\n disabledTimeIntervals: { from: DateTime; to: DateTime }[];\n daysOfWeekDisabled: number[];\n };\n display: {\n toolbarPlacement: 'top' | 'bottom';\n components: {\n calendar: boolean;\n date: boolean;\n month: boolean;\n year: boolean;\n decades: boolean;\n clock: boolean;\n hours: boolean;\n minutes: boolean;\n seconds: boolean;\n useTwentyfourHour: boolean;\n };\n buttons: { today: boolean; close: boolean; clear: boolean };\n calendarWeeks: boolean;\n icons: {\n date: string;\n next: string;\n previous: string;\n today: string;\n clear: string;\n time: string;\n up: string;\n type: 'icons' | 'sprites';\n down: string;\n close: string;\n };\n viewMode: 'clock' | 'calendar' | 'months' | 'years' | 'decades';\n sideBySide: boolean;\n inputFormat: DateTimeFormatOptions;\n inline: boolean;\n };\n stepping: number;\n useCurrent: boolean;\n defaultDate: DateTime;\n localization: {\n nextMonth: string;\n pickHour: string;\n incrementSecond: string;\n nextDecade: string;\n selectDecade: string;\n dayViewHeaderFormat: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';\n decrementHour: string;\n selectDate: string;\n incrementHour: string;\n previousCentury: string;\n decrementSecond: string;\n today: string;\n previousMonth: string;\n selectYear: string;\n pickSecond: string;\n nextCentury: string;\n close: string;\n incrementMinute: string;\n selectTime: string;\n clear: string;\n togglePeriod: string;\n selectMonth: string;\n decrementMinute: string;\n pickMinute: string;\n nextYear: string;\n previousYear: string;\n previousDecade: string;\n locale: string;\n };\n keepInvalid: boolean;\n debug: boolean;\n allowInputToggle: boolean;\n viewDate: DateTime;\n multipleDates: boolean;\n multipleDatesSeparator: string;\n promptTimeOnDateChange: boolean;\n promptTimeOnDateChangeTransitionDelay: number;\n}\n\nexport class OptionConverter {\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newOptions = {} as Options;\n let path = '';\n\n const processKey = (key, value, providedType, defaultType) => {\n switch (key) {\n case 'viewDate': {\n const dateTime = this._dateConversion(value, 'viewDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.ErrorMessages.typeMismatch(\n 'viewDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'minDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.minDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.ErrorMessages.typeMismatch(\n 'restrictions.minDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'maxDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.maxDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.ErrorMessages.typeMismatch(\n 'restrictions.maxDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'disabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.disabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.ErrorMessages.numbersOutOfRage(\n 'restrictions.disabledHours',\n 0,\n 23\n );\n return value;\n case 'enabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.enabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.ErrorMessages.numbersOutOfRage(\n 'restrictions.enabledHours',\n 0,\n 23\n );\n return value;\n case 'daysOfWeekDisabled':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.daysOfWeekDisabled',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 6).length > 0)\n Namespace.ErrorMessages.numbersOutOfRage(\n 'restrictions.daysOfWeekDisabled',\n 0,\n 6\n );\n return value;\n case 'enabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.enabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.disabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledTimeIntervals':\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.ErrorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[];\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n let d = valueObject[i][vk];\n const dateTime = this._dateConversion(d, subOptionName);\n if (!dateTime) {\n Namespace.ErrorMessages.typeMismatch(\n subOptionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n case 'toolbarPlacement':\n case 'type':\n case 'viewMode':\n case 'dayViewHeaderFormat':\n const optionValues = {\n toolbarPlacement: ['top', 'bottom', 'default'],\n type: ['icons', 'sprites'],\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\n dayViewHeaderFormat: [\n 'numeric',\n '2-digit',\n 'long',\n 'short',\n 'narrow',\n ],\n };\n const keyOptions = optionValues[key];\n if (!keyOptions.includes(value))\n Namespace.ErrorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n\n return value;\n case 'inputFormat':\n return value;\n default:\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.ErrorMessages.typeMismatch(\n path.substring(1),\n providedType,\n defaultType\n );\n }\n }\n };\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param mergeOption Default option to compare types against\n * @param copyTo Destination object. This was add to prevent reference copies\n */\n const spread = (provided, mergeOption, copyTo) => {\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(mergeOption).includes(x)\n );\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter._flattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.ErrorMessages.unexpectedOptions(errors);\n }\n Object.keys(mergeOption).forEach((key) => {\n const defaultOptionValue = mergeOption[key];\n let providedType = typeof provided[key];\n let defaultType = typeof defaultOptionValue;\n let value = provided[key];\n if (!provided.hasOwnProperty(key)) {\n if (\n defaultType === 'undefined' ||\n (value?.length === 0 && Array.isArray(defaultOptionValue))\n ) {\n copyTo[key] = defaultOptionValue;\n return;\n }\n provided[key] = defaultOptionValue;\n value = provided[key];\n }\n path += `.${key}`;\n copyTo[key] = processKey(key, value, providedType, defaultType);\n\n if (typeof defaultOptionValue !== 'object' || key === 'inputFormat') {\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n if (!Array.isArray(provided[key])) {\n spread(provided[key], defaultOptionValue, copyTo[key]);\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n }\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n };\n spread(providedOptions, mergeTo, newOptions);\n\n return newOptions;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = element.dataset;\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n let dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const rabbitHole = (\n split: string[],\n index: number,\n optionSubgroup: {},\n value: any\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = rabbitHole(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = rabbitHole(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @private\n */\n static _dateTypeCheck(d: any): DateTime | null {\n if (d.constructor.name === 'DateTime') return d;\n if (d.constructor.name === 'Date') {\n return DateTime.convert(d);\n }\n if (typeof d === typeof '') {\n const dateTime = new DateTime(d);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckDateArray(optionName: string, value, providedType: string) {\n if (!Array.isArray(value)) {\n Namespace.ErrorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n let d = value[i];\n const dateTime = this._dateConversion(d, optionName);\n if (!dateTime) {\n Namespace.ErrorMessages.typeMismatch(\n optionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n value[i] = dateTime;\n }\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\n Namespace.ErrorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n return;\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n */\n static _dateConversion(d: any, optionName: string) {\n if (typeof d === typeof '') {\n Namespace.ErrorMessages.dateString();\n }\n\n const converted = this._dateTypeCheck(d);\n\n if (!converted) {\n Namespace.ErrorMessages.failedToParseDate(optionName, d);\n }\n return converted;\n }\n\n private static _flattenDefaultOptions(): string[] {\n const deepKeys = (t, pre = []) =>\n Array.isArray(t)\n ? []\n : Object(t) === t\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\n : pre.join('.');\n\n return deepKeys(DefaultOptions);\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflcits(config: Options) {\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.ErrorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.ErrorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n }\n}\n","import Display from './display/index';\nimport Validation from './validation';\nimport Dates from './dates';\nimport Actions, { ActionTypes } from './actions';\nimport { DatePickerModes, DefaultOptions } from './conts';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options, { OptionConverter } from './options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n FailEvent,\n} from './event-types';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n dates: Dates;\n\n _options: Options;\n _currentViewMode = 0;\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\n _element: HTMLElement;\n _input: HTMLInputElement;\n _unset: boolean;\n _minViewModeNumber = 0;\n _display: Display;\n _validation: Validation;\n _action: Actions;\n private _isDisabled = false;\n private _notifyChangeEventContext = 0;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: any;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n if (!element) {\n Namespace.ErrorMessages.mustProvideElement;\n }\n this._element = element;\n this._options = this._initializeOptions(options, DefaultOptions, true);\n this._viewDate.setLocale(this._options.localization.locale);\n this._unset = true;\n\n this._display = new Display(this);\n this._validation = new Validation(this);\n this.dates = new Dates(this);\n this._action = new Actions(this);\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this._options.display.inline) this._display.show();\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._options = this._initializeOptions(options, DefaultOptions);\n else this._options = this._initializeOptions(options, this._options);\n this._display._rebuild();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this._display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this._display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this._input?.setAttribute('disabled', 'disabled');\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this._input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => {} | ((event: any) => {})[]\n ): { unsubscribe: void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray = [];\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.ErrorMessages.subscribeMismatch;\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this._display.hide();\n // this will clear the document click event listener\n this._display._dispose();\n this._input?.removeEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.removeEventListener('click', this._toggleClickEvent);\n }\n this._toggle.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n _triggerEvent(event: BaseEvent) {\n // checking hasOwnProperty because the BasicEvent also falls through here otherwise\n if ((event as ChangeEvent) && event.hasOwnProperty('date')) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n // this was to prevent a max call stack error\n // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb\n // todo see if this is still needed or if there's a cleaner way\n this._notifyChangeEventContext++;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate) ||\n this._notifyChangeEventContext > 1\n ) {\n this._notifyChangeEventContext = 0;\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n }\n\n this._element.dispatchEvent(\n new CustomEvent(event.type, { detail: event as any })\n );\n\n if ((window as any).jQuery) {\n const $ = (window as any).jQuery;\n $(this._element).trigger(event);\n }\n\n const publish = () => {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n };\n\n publish();\n\n this._notifyChangeEventContext = 0;\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @param {Unit} unit\n * @private\n */\n _viewUpdate(unit: Unit) {\n this._triggerEvent({\n type: Namespace.Events.update,\n change: unit,\n viewDate: this._viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): Options {\n config = OptionConverter._mergeOptions(config, mergeTo);\n if (includeDataset)\n config = OptionConverter._dataToOptions(this._element, config);\n\n OptionConverter._validateConflcits(config);\n\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\n\n if (!this._viewDate.isSame(config.viewDate)) {\n this._viewDate = config.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (config.display.components.year) {\n this._minViewModeNumber = 2;\n }\n if (config.display.components.month) {\n this._minViewModeNumber = 1;\n }\n if (config.display.components.date) {\n this._minViewModeNumber = 0;\n }\n\n this._currentViewMode = Math.max(\n this._minViewModeNumber,\n this._currentViewMode\n );\n\n // Update view mode if needed\n if (\n DatePickerModes[this._currentViewMode].name !== config.display.viewMode\n ) {\n this._currentViewMode = Math.max(\n DatePickerModes.findIndex((x) => x.name === config.display.viewMode),\n this._minViewModeNumber\n );\n }\n\n // defaults the input format based on the components enabled\n if (config.display.inputFormat === undefined) {\n const components = config.display.components;\n config.display.inputFormat = {\n year: components.calendar && components.year ? 'numeric' : undefined,\n month: components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute: components.clock && components.minutes ? '2-digit' : undefined,\n second: components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n };\n }\n\n if (this._display?.isVisible) {\n this._display._update('all');\n }\n\n return config;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this._element.tagName == 'INPUT') {\n this._input = this._element as HTMLInputElement;\n } else {\n let query = this._element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this._input = this._element.querySelector('input');\n } else {\n this._input = this._element.querySelector(query);\n }\n }\n\n this._input?.addEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.addEventListener('click', this._toggleClickEvent);\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this._options.display.inline) return;\n let query = this._element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined ? this._element : this._element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this._options.promptTimeOnDateChange ||\n this._options.display.inline ||\n this._options.display.sideBySide ||\n // time is disabled\n !this._display._hasTime ||\n // clock component is already showing\n this._display.widget\n ?.getElementsByClassName(Namespace.Css.show)[0]\n .classList.contains(Namespace.Css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this._options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this._display.widget) {\n this._action.do(\n {\n currentTarget: this._display.widget.querySelector(\n `.${Namespace.Css.switch} div`\n ),\n },\n ActionTypes.togglePicker\n );\n }\n }, this._options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _inputChangeEvent = () => {\n let parsedDate = OptionConverter._dateTypeCheck(this._input.value);\n\n if (parsedDate) {\n this.dates._setValue(parsedDate);\n } else {\n this._triggerEvent({\n type: Namespace.Events.error,\n reason: Namespace.ErrorMessages.failedToParseInput,\n date: parsedDate,\n } as FailEvent);\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n this.toggle();\n };\n}\n\nexport { TempusDominus, Namespace, DefaultOptions, DateTime };\n"],"names":["SecondDisplay","createPopper"],"mappings":";;;;;;IAAA,IAAY,IAOX;IAPD,WAAY,IAAI;QACd,2BAAmB,CAAA;QACnB,2BAAmB,CAAA;QACnB,uBAAe,CAAA;QACf,qBAAa,CAAA;QACb,uBAAe,CAAA;QACf,qBAAa,CAAA;IACf,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;IAOD;;;;UAIa,QAAS,SAAQ,IAAI;QAAlC;;;;;YAIE,WAAM,GAAG,SAAS,CAAC;SAyZpB;;;;;QAnZC,SAAS,CAAC,KAAa;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,OAAO,IAAI,CAAC;SACb;;;;;;QAOD,OAAO,OAAO,CAAC,IAAU;YACvB,IAAI,CAAC,IAAI;gBAAE,MAAM,oBAAoB,CAAC;YACtC,OAAO,IAAI,QAAQ,CACjB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,OAAO,EAAE,EACd,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAA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AA,CAAC,CAAC,IAAI,0CAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA,CAAC,EACxC;gBACA,OAAO;aACR;YAED,YAAY,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YAC7C,IAAI,CAAC,yBAAyB,GAAG,UAAU,CAAC;gBAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CACb;wBACE,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAC/C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,MAAM,CAC/B;qBACF,EACD,WAAW,CAAC,YAAY,CACzB,CAAC;iBACH;aACF,EAAE,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;SACzD;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/errors.ts","../../src/js/namespace.ts","../../src/js/conts.ts","../../src/js/display/collapse.ts","../../src/js/actions.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/dates.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/index.ts","../../src/js/validation.ts","../../src/js/options.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\ninterface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n /**\n * Used with Intl.DateTimeFormat\n */\n locale = 'default';\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n */\n setLocale(value: string): this {\n this.locale = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n */\n static convert(date: Date): DateTime {\n if (!date) throw `A date is required`;\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n );\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocale(this.locale);\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n */\n startOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(0 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n */\n endOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(6 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.year);\n this.setDate(0);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n this[unit] += value;\n return this;\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An object. Uses browser defaults otherwise.\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(template: DateTimeFormatOptions, locale = this.locale): string {\n return new Intl.DateTimeFormat(locale, template).format(this);\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n return (\n ((leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit)) &&\n (rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit))) ||\n ((leftInclusivity\n ? this.isBefore(left, unit)\n : !this.isAfter(left, unit)) &&\n (rightInclusivity\n ? this.isAfter(right, unit)\n : !this.isBefore(right, unit)))\n );\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.locale,\n template: any = { dateStyle: 'full', timeStyle: 'long' }\n ) {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit hours\n */\n get minutesFormatted(): string {\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hours\n */\n get hoursFormatted(): string {\n return this.hours < 10 ? `0${this.hours}` : `${this.hours}`;\n }\n\n /**\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\n */\n get twelveHoursFormatted(): string {\n let hour = this.hours;\n if (hour > 12) hour = hour - 12;\n if (hour === 0) hour = 12;\n return hour < 10 ? `0${hour}` : `${hour}`;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.locale): string {\n /*\n for some reason this stopped returning \"AM/PM\" and returned \"in the morning\"\n const dayPeriod = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n dayPeriod: 'narrow',\n } as any)\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;*/\n return this.hours <= 12 ? 'AM' : 'PM';\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\n }\n\n // https://github.com/you-dont-need/You-Dont-Need-Momentjs#week-of-year\n /**\n * Gets the week of the year\n */\n get week(): number {\n const MILLISECONDS_IN_WEEK = 604800000;\n const firstDayOfWeek = 1; // monday as the first day (0 = sunday)\n const startOfYear = new Date(this.year, 0, 1);\n startOfYear.setDate(\n startOfYear.getDate() + (firstDayOfWeek - (startOfYear.getDay() % 7))\n );\n return (\n Math.round(\n (this.valueOf() - startOfYear.valueOf()) / MILLISECONDS_IN_WEEK\n ) + 1\n );\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n}\n","import Namespace from './namespace';\n\nexport class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalide string or an invalid Date object.\n * @param optionName\n * @param date\n */\n failedToParseDate(optionName: string, date: any) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for option ${optionName}.`\n );\n error.code = 5;\n throw error;\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\n );\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-alpha1',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options from './options';\n\nconst DefaultOptions: Options = {\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: [],\n },\n display: {\n icons: {\n type: 'icons',\n time: 'fas fa-clock',\n date: 'fas fa-calendar',\n up: 'fas fa-arrow-up',\n down: 'fas fa-arrow-down',\n previous: 'fas fa-chevron-left',\n next: 'fas fa-chevron-right',\n today: 'fas fa-calendar-check',\n clear: 'fas fa-trash',\n close: 'fas fa-times',\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false,\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: false,\n },\n inputFormat: undefined,\n inline: false,\n },\n stepping: 1,\n useCurrent: true,\n defaultDate: undefined,\n localization: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n previousYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n previousDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n previousCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n togglePeriod: 'Toggle Period',\n selectTime: 'Select Time',\n selectDate: 'Select Date',\n dayViewHeaderFormat: 'long',\n locale: 'default',\n },\n keepInvalid: false,\n debug: false,\n allowInputToggle: false,\n viewDate: new DateTime(),\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n};\n\nconst DatePickerModes: {\n name: string;\n className: string;\n unit: Unit;\n step: number;\n}[] = [\n {\n name: 'calendar',\n className: Namespace.css.daysContainer,\n unit: Unit.month,\n step: 1,\n },\n {\n name: 'months',\n className: Namespace.css.monthsContainer,\n unit: Unit.year,\n step: 1,\n },\n {\n name: 'years',\n className: Namespace.css.yearsContainer,\n unit: Unit.year,\n step: 10,\n },\n {\n name: 'decades',\n className: Namespace.css.decadesContainer,\n unit: Unit.year,\n step: 100,\n },\n];\n\nexport { DefaultOptions, DatePickerModes, Namespace };\n","import Namespace from '../namespace';\n\n/**\n * Provides a collapse functionality to the view changes\n */\nexport default class Collapse {\n private timeOut;\n\n /**\n * Flips the show/hide state of `target`\n * @param target html element to affect.\n */\n toggle(target: HTMLElement) {\n if (target.classList.contains(Namespace.css.show)) {\n this.hide(target);\n } else {\n this.show(target);\n }\n }\n\n /**\n * If `target` is not already showing, then show after the animation.\n * @param target\n */\n show(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n target.classList.contains(Namespace.css.show)\n )\n return;\n\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\n target.style.height = '';\n this.timeOut = null;\n };\n\n target.style.height = '0';\n target.classList.remove(Namespace.css.collapse);\n target.classList.add(Namespace.css.collapsing);\n\n this.timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n target.style.height = `${target.scrollHeight}px`;\n }\n\n /**\n * If `target` is not already hidden, then hide after the animation.\n * @param target HTML Element\n */\n hide(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n !target.classList.contains(Namespace.css.show)\n )\n return;\n\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse);\n this.timeOut = null;\n };\n\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\n\n const reflow = (element) => element.offsetHeight;\n\n reflow(target);\n\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\n target.classList.add(Namespace.css.collapsing);\n target.style.height = '';\n\n this.timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n }\n\n /**\n * Gets the transition duration from the `element` by getting css properties\n * `transition-duration` and `transition-delay`\n * @param element HTML Element\n */\n private getTransitionDurationFromElement = (element: HTMLElement) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } =\n window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) +\n Number.parseFloat(transitionDelay)) *\n 1000\n );\n };\n}\n","import { DatePickerModes } from './conts.js';\nimport { DateTime, Unit } from './datetime';\nimport { TempusDominus } from './tempus-dominus';\nimport Collapse from './display/collapse';\nimport Namespace from './namespace';\n\n/**\n *\n */\nexport default class Actions {\n private _context: TempusDominus;\n private collapse: Collapse;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this.collapse = new Collapse();\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e.currentTarget;\n if (currentTarget.classList.contains(Namespace.css.disabled)) return false;\n action = action || currentTarget.dataset.action;\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`\n * @param unit\n * @param value Value to change by\n */\n const manipulateAndSet = (unit: Unit, value = 1) => {\n const newDate = lastPicked.manipulate(value, unit);\n if (this._context._validation.isValid(newDate, unit)) {\n /*if (this.context.dates.lastPickedIndex < 0) {\n this.date(newDate);\n }*/\n this._context.dates._setValue(\n newDate,\n this._context.dates.lastPickedIndex\n );\n }\n };\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n const { unit, step } = DatePickerModes[this._context._currentViewMode];\n if (action === ActionTypes.next)\n this._context._viewDate.manipulate(step, unit);\n else this._context._viewDate.manipulate(step * -1, unit);\n this._context._viewUpdate(unit);\n\n this._context._display._showMode();\n break;\n case ActionTypes.pickerSwitch:\n this._context._display._showMode(1);\n this._context._viewUpdate(\n DatePickerModes[this._context._currentViewMode].unit\n );\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.getAttribute('data-value');\n switch (action) {\n case ActionTypes.selectMonth:\n this._context._viewDate.month = value;\n this._context._viewUpdate(Unit.month);\n break;\n case ActionTypes.selectYear:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n case ActionTypes.selectDecade:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n }\n\n if (\n this._context._currentViewMode === this._context._minViewModeNumber\n ) {\n this._context.dates._setValue(\n this._context._viewDate,\n this._context.dates.lastPickedIndex\n );\n if (!this._context._options.display.inline) {\n this._context._display.hide();\n }\n } else {\n this._context._display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this._context._viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.innerText;\n let index = 0;\n if (this._context._options.multipleDates) {\n index = this._context.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this._context.dates._setValue(null, index); //deselect multi-date\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex + 1\n );\n }\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex\n );\n }\n\n if (\n !this._context._display._hasTime &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline &&\n !this._context._options.multipleDates\n ) {\n this._context._display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.getAttribute('data-value');\n lastPicked.hours = hour;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.minutes &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.seconds &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.innerText;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n break;\n case ActionTypes.incrementHours:\n manipulateAndSet(Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping);\n break;\n case ActionTypes.incrementSeconds:\n manipulateAndSet(Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n manipulateAndSet(Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping * -1);\n break;\n case ActionTypes.decrementSeconds:\n manipulateAndSet(Unit.seconds, -1);\n break;\n case ActionTypes.togglePeriod:\n manipulateAndSet(\n Unit.hours,\n this._context.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n this._context._display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) =>\n this.collapse.toggle(htmlElement)\n );\n\n if (\n currentTarget.getAttribute('title') ===\n this._context._options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectTime\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.time\n ).outerHTML;\n\n this._context._display._updateCalendarHeader();\n } else {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectDate\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.date\n ).outerHTML;\n this.do(e, ActionTypes.showClock);\n this._context._display._update('clock');\n }\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this._context._display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this._context._display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this._context._display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this._context._display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this._context._display._update(Unit.seconds);\n break;\n }\n\n ((\n this._context._display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this._context.dates._setValue(null);\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this._context._display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n this._context._viewDate = today;\n if (this._context._validation.isValid(today, Unit.date))\n this._context.dates._setValue(\n today,\n this._context.dates.lastPickedIndex\n );\n break;\n }\n }\n}\n\nexport enum ActionTypes {\n next = 'next',\n previous = 'previous',\n pickerSwitch = 'pickerSwitch',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n togglePeriod = 'togglePeriod',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this._context._viewDate.format({\n month: this._context._options.localization.dayViewHeaderFormat,\n })\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay')\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement, index) => {\n if (\n this._context._options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.innerText = `${innerDate.date}`;\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this._context._viewDate.clone\n .startOf('weekDay')\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this._context._options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this._context._viewDate.format({ year: 'numeric' })\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport { ChangeEvent, FailEvent } from './event-types';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return this._dates;\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex];\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!unit) return this._dates.indexOf(targetDate);\n\n const format = Dates.getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this._context._unset = true;\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n _setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this._context._unset ? null : this._dates[index];\n if (!oldDate && !this._context._unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n const updateInput = () => {\n if (!this._context._input) return;\n\n let newValue =\n target?.format(this._context._options.display.inputFormat) || '';\n if (this._context._options.multipleDates) {\n newValue = this._dates\n .map((d) => d.format(this._context._options.display.inputFormat))\n .join(this._context._options.multipleDatesSeparator);\n }\n if (this._context._input.value != newValue)\n this._context._input.value = newValue;\n };\n\n // case of calling setValue(null)\n if (!target) {\n if (\n !this._context._options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this._context._unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n updateInput();\n this._context._display._update('all');\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this._context._options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this._context._options.stepping) *\n this._context._options.stepping;\n target.seconds = 0;\n }\n\n if (this._context._validation.isValid(target)) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._unset = false;\n this._context._display._update('all');\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n return;\n }\n\n if (this._context._options.keepInvalid) {\n this._dates[index] = target;\n this._context._viewDate = target.clone;\n\n updateInput();\n\n this._context._triggerEvent({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: false,\n } as ChangeEvent);\n }\n this._context._triggerEvent({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n\n /**\n * Returns a format object based on the granularity of `unit`\n * @param unit\n */\n static getFormatByUnit(unit: Unit): object {\n switch (unit) {\n case 'date':\n return { dateStyle: 'short' };\n case 'month':\n return {\n month: 'numeric',\n year: 'numeric',\n };\n case 'year':\n return { year: 'numeric' };\n }\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\nimport Dates from '../../dates';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _context: TempusDominus;\n private _startYear: DateTime;\n private _endYear: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year);\n this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year);\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.yearsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(Namespace.css.yearsContainer,`${this._startYear.year}-${this._endYear.year}`);\n\n this._context._validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this._context._validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.year);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = `${innerDate.year}`;\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _context: TempusDominus;\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update() {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this._context._viewDate.year\n );\n this._startDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this._context._viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.decadesContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.decadesContainer,\n `${this._startDecade.year}-${this._endDecade.year}`\n );\n\n this._context._validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this._context._validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n const pickedYears = this._context.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.css.disabled);\n containerClone.classList.add(Namespace.css.disabled);\n containerClone.setAttribute('data-value', ``);\n return;\n } else {\n containerClone.innerText = `${this._startDecade.year - 10}`;\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n return;\n }\n }\n\n let classes = [];\n classes.push(Namespace.css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this._context._unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.css.active);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year + 6}`\n );\n containerClone.innerText = `${this._startDecade.year}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _context: TempusDominus;\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid());\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(): void {\n const timesDiv = this._context._display.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0];\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n let columns = 0;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this._context._options.display.components.hours) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this._context._options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this._context._options.display.components.minutes) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this._context._options.display.components.seconds) {\n columns++;\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n columns++;\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.togglePeriod}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this._context._validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.classList.add(`clock-columns-${columns}`);\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(): HTMLElement[] {\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = this._context._display._iconTag(\n this._context._options.display.icons.up\n ),\n downIcon = this._context._display._iconTag(\n this._context._options.display.icons.down\n );\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this._context._options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.minutes) {\n if (this._context._options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.seconds) {\n if (this._context._options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this._context._options.localization.togglePeriod\n );\n button.setAttribute('data-action', ActionTypes.togglePeriod);\n button.setAttribute('tabindex', '-1');\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this._context._options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this._context._validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this._context._options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.hours);\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this._context._validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.minutes}`);\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.second);\n\n if (!this._context._validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import DateDisplay from './calendar/date-display';\nimport MonthDisplay from './calendar/month-display';\nimport YearDisplay from './calendar/year-display';\nimport DecadeDisplay from './calendar/decade-display';\nimport TimeDisplay from './time/time-display';\nimport HourDisplay from './time/hour-display';\nimport MinuteDisplay from './time/minute-display';\nimport SecondDisplay from './time/second-display';\nimport { DateTime, Unit } from '../datetime';\nimport { DatePickerModes } from '../conts';\nimport { TempusDominus } from '../tempus-dominus';\nimport { ActionTypes } from '../actions';\nimport { createPopper } from '@popperjs/core';\nimport Namespace from '../namespace';\nimport { HideEvent } from '../event-types';\n\n/**\n * Main class for all things display related.\n */\nexport default class Display {\n private _context: TempusDominus;\n private _dateDisplay: DateDisplay;\n private _monthDisplay: MonthDisplay;\n private _yearDisplay: YearDisplay;\n private _decadeDisplay: DecadeDisplay;\n private _timeDisplay: TimeDisplay;\n private _widget: HTMLElement;\n private _hourDisplay: HourDisplay;\n private _minuteDisplay: MinuteDisplay;\n private _secondDisplay: SecondDisplay;\n private _popperInstance: any;\n private _isVisible = false;\n\n constructor(context: TempusDominus) {\n this._context = context;\n this._dateDisplay = new DateDisplay(context);\n this._monthDisplay = new MonthDisplay(context);\n this._yearDisplay = new YearDisplay(context);\n this._decadeDisplay = new DecadeDisplay(context);\n this._timeDisplay = new TimeDisplay(context);\n this._hourDisplay = new HourDisplay(context);\n this._minuteDisplay = new MinuteDisplay(context);\n this._secondDisplay = new SecondDisplay(context);\n\n this._widget = undefined;\n }\n\n /**\n * Returns the widget body or undefined\n * @private\n */\n get widget(): HTMLElement | undefined {\n return this._widget;\n }\n\n /**\n * Returns this visible state of the picker (shown)\n */\n get isVisible() {\n return this._isVisible;\n }\n\n /**\n * Updates the table for a particular unit. Used when an option as changed or\n * whenever the class list might need to be refreshed.\n * @param unit\n * @private\n */\n _update(unit: Unit | 'clock' | 'calendar' | 'all'): void {\n if (!this.widget) return;\n //todo do I want some kind of error catching or other guards here?\n switch (unit) {\n case Unit.seconds:\n this._secondDisplay._update();\n break;\n case Unit.minutes:\n this._minuteDisplay._update();\n break;\n case Unit.hours:\n this._hourDisplay._update();\n break;\n case Unit.date:\n this._dateDisplay._update();\n break;\n case Unit.month:\n this._monthDisplay._update();\n break;\n case Unit.year:\n this._yearDisplay._update();\n break;\n case 'clock':\n this._timeDisplay._update();\n this._update(Unit.hours);\n this._update(Unit.minutes);\n this._update(Unit.seconds);\n break;\n case 'calendar':\n this._update(Unit.date);\n this._update(Unit.year);\n this._update(Unit.month);\n this._decadeDisplay._update();\n this._updateCalendarHeader();\n break;\n case 'all':\n if (this._hasTime) {\n this._update('clock');\n }\n if (this._hasDate) {\n this._update('calendar');\n }\n }\n }\n\n /**\n * Shows the picker and creates a Popper instance if needed.\n * Add document click event to hide when clicking outside the picker.\n * @fires Events#show\n */\n show(): void {\n if (this.widget == undefined) {\n if (\n this._context._options.useCurrent &&\n !this._context._options.defaultDate\n ) {\n //todo in the td4 branch a pr changed this to allow granularity\n const date = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n if (!this._context._options.keepInvalid) {\n let tries = 0;\n let direction = 1;\n if (this._context._options.restrictions.maxDate?.isBefore(date)) {\n direction = -1;\n }\n while (!this._context._validation.isValid(date)) {\n date.manipulate(direction, Unit.date);\n if (tries > 31) break;\n tries++;\n }\n }\n this._context.dates._setValue(date);\n }\n\n if (this._context._options.defaultDate) {\n this._context.dates._setValue(this._context._options.defaultDate);\n }\n\n this._buildWidget();\n if (this._hasDate) {\n this._showMode();\n }\n\n if (!this._context._options.display.inline) {\n document.body.appendChild(this.widget);\n\n this._popperInstance = createPopper(\n this._context._element,\n this.widget,\n {\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [2, 8],\n },\n },\n { name: 'eventListeners', enabled: true },\n ],\n placement: 'auto',\n }\n );\n } else {\n this._context._element.appendChild(this.widget);\n }\n\n if (this._context._options.display.viewMode == 'clock') {\n this._context._action.do(\n {\n currentTarget: this.widget.querySelector(\n `.${Namespace.css.timeContainer}`\n ),\n },\n ActionTypes.showClock\n );\n }\n\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.addEventListener('click', this._actionsClickEvent)\n );\n\n // show the clock when using sideBySide\n if (this._context._options.display.sideBySide) {\n this._timeDisplay._update();\n (\n this.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0] as HTMLElement\n ).style.display = 'grid';\n }\n }\n\n this.widget.classList.add(Namespace.css.show);\n if (!this._context._options.display.inline) {\n this._popperInstance.update();\n document.addEventListener('click', this._documentClickEvent);\n }\n this._context._triggerEvent({ type: Namespace.events.show });\n this._isVisible = true;\n }\n\n /**\n * Changes the calendar view mode. E.g. month <-> year\n * @param direction -/+ number to move currentViewMode\n * @private\n */\n _showMode(direction?: number): void {\n if (!this.widget) {\n return;\n }\n if (direction) {\n const max = Math.max(\n this._context._minViewModeNumber,\n Math.min(3, this._context._currentViewMode + direction)\n );\n if (this._context._currentViewMode == max) return;\n this._context._currentViewMode = max;\n }\n\n this.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div`\n )\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\n\n const datePickerMode = DatePickerModes[this._context._currentViewMode];\n let picker: HTMLElement = this.widget.querySelector(\n `.${datePickerMode.className}`\n );\n\n switch (datePickerMode.className) {\n case Namespace.css.decadesContainer:\n this._decadeDisplay._update();\n break;\n case Namespace.css.yearsContainer:\n this._yearDisplay._update();\n break;\n case Namespace.css.monthsContainer:\n this._monthDisplay._update();\n break;\n case Namespace.css.daysContainer:\n this._dateDisplay._update();\n break;\n }\n\n picker.style.display = 'grid';\n this._updateCalendarHeader();\n }\n\n _updateCalendarHeader() {\n const showing = [\n ...this.widget.querySelector(\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\n ).classList,\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\n\n const [previous, switcher, next] = this._context._display.widget\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switch (showing) {\n case Namespace.css.decadesContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousCentury\n );\n switcher.setAttribute('title', '');\n next.setAttribute(\n 'title',\n this._context._options.localization.nextCentury\n );\n break;\n case Namespace.css.yearsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousDecade\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectDecade\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextDecade\n );\n break;\n case Namespace.css.monthsContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousYear\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectYear\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextYear\n );\n break;\n case Namespace.css.daysContainer:\n previous.setAttribute(\n 'title',\n this._context._options.localization.previousMonth\n );\n switcher.setAttribute(\n 'title',\n this._context._options.localization.selectMonth\n );\n next.setAttribute(\n 'title',\n this._context._options.localization.nextMonth\n );\n switcher.innerText = this._context._viewDate.format({\n month: this._context._options.localization.dayViewHeaderFormat,\n });\n break;\n }\n switcher.innerText = switcher.getAttribute(showing);\n }\n\n /**\n * Hides the picker if needed.\n * Remove document click event to hide when clicking outside the picker.\n * @fires Events#hide\n */\n hide(): void {\n this.widget.classList.remove(Namespace.css.show);\n\n if (this._isVisible) {\n this._context._triggerEvent({\n type: Namespace.events.hide,\n date: this._context._unset\n ? null\n : this._context.dates.lastPicked\n ? this._context.dates.lastPicked.clone\n : void 0,\n } as HideEvent);\n this._isVisible = false;\n }\n\n document.removeEventListener('click', this._documentClickEvent);\n }\n\n /**\n * Toggles the picker's open state. Fires a show/hide event depending.\n */\n toggle() {\n return this._isVisible ? this.hide() : this.show();\n }\n\n /**\n * Removes document and data-action click listener and reset the widget\n * @private\n */\n _dispose() {\n document.removeEventListener('click', this._documentClickEvent);\n if (!this.widget) return;\n this.widget\n .querySelectorAll('[data-action]')\n .forEach((element) =>\n element.removeEventListener('click', this._actionsClickEvent)\n );\n this.widget.parentNode.removeChild(this.widget);\n this._widget = undefined;\n }\n\n /**\n * Builds the widgets html template.\n * @private\n */\n private _buildWidget(): HTMLElement {\n const template = document.createElement('div');\n template.classList.add(Namespace.css.widget);\n\n const dateView = document.createElement('div');\n dateView.classList.add(Namespace.css.dateContainer);\n dateView.append(\n this._headTemplate,\n this._decadeDisplay._picker,\n this._yearDisplay._picker,\n this._monthDisplay._picker,\n this._dateDisplay._picker\n );\n\n const timeView = document.createElement('div');\n timeView.classList.add(Namespace.css.timeContainer);\n timeView.appendChild(this._timeDisplay._picker);\n timeView.appendChild(this._hourDisplay._picker);\n timeView.appendChild(this._minuteDisplay._picker);\n timeView.appendChild(this._secondDisplay._picker);\n\n const toolbar = document.createElement('div');\n toolbar.classList.add(Namespace.css.toolbar);\n toolbar.append(...this._toolbar);\n\n if (this._context._options.display.inline) {\n template.classList.add(Namespace.css.inline);\n }\n\n if (this._context._options.display.calendarWeeks) {\n template.classList.add('calendarWeeks');\n }\n\n if (\n this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n template.classList.add(Namespace.css.sideBySide);\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n const row = document.createElement('div');\n row.classList.add('td-row');\n dateView.classList.add('td-half');\n timeView.classList.add('td-half');\n\n row.appendChild(dateView);\n row.appendChild(timeView);\n template.appendChild(row);\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n this._widget = template;\n return;\n }\n\n if (this._context._options.display.toolbarPlacement === 'top') {\n template.appendChild(toolbar);\n }\n\n if (this._hasDate) {\n if (this._hasTime) {\n dateView.classList.add(Namespace.css.collapse);\n if (this._context._options.display.viewMode !== 'clock')\n dateView.classList.add(Namespace.css.show);\n }\n template.appendChild(dateView);\n }\n\n if (this._hasTime) {\n if (this._hasDate) {\n timeView.classList.add(Namespace.css.collapse);\n if (this._context._options.display.viewMode === 'clock')\n timeView.classList.add(Namespace.css.show);\n }\n template.appendChild(timeView);\n }\n\n if (this._context._options.display.toolbarPlacement === 'bottom') {\n template.appendChild(toolbar);\n }\n\n const arrow = document.createElement('div');\n arrow.classList.add('arrow');\n arrow.setAttribute('data-popper-arrow', '');\n template.appendChild(arrow);\n\n this._widget = template;\n }\n\n /**\n * Returns true if the hours, minutes, or seconds component is turned on\n */\n get _hasTime(): boolean {\n return (\n this._context._options.display.components.clock &&\n (this._context._options.display.components.hours ||\n this._context._options.display.components.minutes ||\n this._context._options.display.components.seconds)\n );\n }\n\n /**\n * Returns true if the year, month, or date component is turned on\n */\n get _hasDate(): boolean {\n return (\n this._context._options.display.components.calendar &&\n (this._context._options.display.components.year ||\n this._context._options.display.components.month ||\n this._context._options.display.components.date)\n );\n }\n\n /**\n * Get the toolbar html based on options like buttons.today\n * @private\n */\n get _toolbar(): HTMLElement[] {\n const toolbar = [];\n\n if (this._context._options.display.buttons.today) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.today);\n div.setAttribute('title', this._context._options.localization.today);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.today)\n );\n toolbar.push(div);\n }\n if (\n !this._context._options.display.sideBySide &&\n this._hasDate &&\n this._hasTime\n ) {\n let title, icon;\n if (this._context._options.display.viewMode === 'clock') {\n title = this._context._options.localization.selectDate;\n icon = this._context._options.display.icons.date;\n } else {\n title = this._context._options.localization.selectTime;\n icon = this._context._options.display.icons.time;\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.togglePicker);\n div.setAttribute('title', title);\n\n div.appendChild(this._iconTag(icon));\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.clear) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.clear);\n div.setAttribute('title', this._context._options.localization.clear);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.clear)\n );\n toolbar.push(div);\n }\n if (this._context._options.display.buttons.close) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.close);\n div.setAttribute('title', this._context._options.localization.close);\n\n div.appendChild(\n this._iconTag(this._context._options.display.icons.close)\n );\n toolbar.push(div);\n }\n\n return toolbar;\n }\n\n /***\n * Builds the base header template with next and previous icons\n * @private\n */\n get _headTemplate(): HTMLElement {\n const calendarHeader = document.createElement('div');\n calendarHeader.classList.add(Namespace.css.calendarHeader);\n\n const previous = document.createElement('div');\n previous.classList.add(Namespace.css.previous);\n previous.setAttribute('data-action', ActionTypes.previous);\n previous.appendChild(\n this._iconTag(this._context._options.display.icons.previous)\n );\n\n const switcher = document.createElement('div');\n switcher.classList.add(Namespace.css.switch);\n switcher.setAttribute('data-action', ActionTypes.pickerSwitch);\n\n const next = document.createElement('div');\n next.classList.add(Namespace.css.next);\n next.setAttribute('data-action', ActionTypes.next);\n next.appendChild(this._iconTag(this._context._options.display.icons.next));\n\n calendarHeader.append(previous, switcher, next);\n return calendarHeader;\n }\n\n /**\n * Builds an icon tag as either an ``\n * or with icons.type is `sprites` then an svg tag instead\n * @param iconClass\n * @private\n */\n _iconTag(iconClass: string): HTMLElement {\n if (this._context._options.display.icons.type === 'sprites') {\n const svg = document.createElement('svg');\n svg.innerHTML = ``;\n return svg;\n }\n const icon = document.createElement('i');\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\n return icon;\n }\n\n /**\n * A document click event to hide the widget if click is outside\n * @private\n * @param e MouseEvent\n */\n private _documentClickEvent = (e: MouseEvent) => {\n if (\n this._isVisible &&\n !e.composedPath().includes(this.widget) && // click inside the widget\n !e.composedPath()?.includes(this._context._element) && // click on the element\n (!this._context._options.display.keepOpen ||\n !this._context._options.debug ||\n !(window as any).debug)\n ) {\n this.hide();\n }\n };\n\n /**\n * Click event for any action like selecting a date\n * @param e MouseEvent\n * @private\n */\n private _actionsClickEvent = (e: MouseEvent) => {\n this._context._action.do(e);\n };\n\n /**\n * Causes the widget to get rebuilt on next show. If the picker is already open\n * then hide and reshow it.\n * @private\n */\n _rebuild() {\n const wasVisible = this._isVisible;\n if (wasVisible) this.hide();\n this._dispose();\n if (wasVisible) {\n this.show();\n }\n }\n}\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Dates from './dates';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provide to chek portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (\n this._context._options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this._context._options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n ) {\n return false;\n }\n\n if (\n this._context._options.restrictions.minDate &&\n targetDate.isBefore(\n this._context._options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.maxDate &&\n targetDate.isAfter(\n this._context._options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (\n this._context._options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.disabledTimeIntervals.length > 0\n ) {\n for (\n let i = 0;\n i < this._context._options.restrictions.disabledTimeIntervals.length;\n i++\n ) {\n if (\n targetDate.isBetween(\n this._context._options.restrictions.disabledTimeIntervals[i].from,\n this._context._options.restrictions.disabledTimeIntervals[i].to\n )\n )\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledDates ||\n this._context._options.restrictions.disabledDates.length === 0\n )\n return false;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.disabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledDates ||\n this._context._options.restrictions.enabledDates.length === 0\n )\n return true;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.enabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledHours ||\n this._context._options.restrictions.disabledHours.length === 0\n )\n return false;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.disabledHours.find(\n (x) => x === formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledHours ||\n this._context._options.restrictions.enabledHours.length === 0\n )\n return true;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.enabledHours.find(\n (x) => x === formattedDate\n );\n }\n}\n","import { DateTime } from './datetime';\nimport DateTimeFormatOptions = Intl.DateTimeFormatOptions;\nimport Namespace from './namespace';\nimport { DefaultOptions } from './conts';\n\nexport default interface Options {\n restrictions: {\n minDate: DateTime;\n maxDate: DateTime;\n enabledDates: DateTime[];\n disabledDates: DateTime[];\n enabledHours: number[];\n disabledHours: number[];\n disabledTimeIntervals: { from: DateTime; to: DateTime }[];\n daysOfWeekDisabled: number[];\n };\n display: {\n toolbarPlacement: 'top' | 'bottom';\n components: {\n calendar: boolean;\n date: boolean;\n month: boolean;\n year: boolean;\n decades: boolean;\n clock: boolean;\n hours: boolean;\n minutes: boolean;\n seconds: boolean;\n useTwentyfourHour: boolean;\n };\n buttons: { today: boolean; close: boolean; clear: boolean };\n calendarWeeks: boolean;\n icons: {\n date: string;\n next: string;\n previous: string;\n today: string;\n clear: string;\n time: string;\n up: string;\n type: 'icons' | 'sprites';\n down: string;\n close: string;\n };\n viewMode: 'clock' | 'calendar' | 'months' | 'years' | 'decades';\n sideBySide: boolean;\n inputFormat: DateTimeFormatOptions;\n inline: boolean;\n keepOpen: boolean;\n };\n stepping: number;\n useCurrent: boolean;\n defaultDate: DateTime;\n localization: {\n nextMonth: string;\n pickHour: string;\n incrementSecond: string;\n nextDecade: string;\n selectDecade: string;\n dayViewHeaderFormat: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';\n decrementHour: string;\n selectDate: string;\n incrementHour: string;\n previousCentury: string;\n decrementSecond: string;\n today: string;\n previousMonth: string;\n selectYear: string;\n pickSecond: string;\n nextCentury: string;\n close: string;\n incrementMinute: string;\n selectTime: string;\n clear: string;\n togglePeriod: string;\n selectMonth: string;\n decrementMinute: string;\n pickMinute: string;\n nextYear: string;\n previousYear: string;\n previousDecade: string;\n locale: string;\n };\n keepInvalid: boolean;\n debug: boolean;\n allowInputToggle: boolean;\n viewDate: DateTime;\n multipleDates: boolean;\n multipleDatesSeparator: string;\n promptTimeOnDateChange: boolean;\n promptTimeOnDateChangeTransitionDelay: number;\n}\n\nexport class OptionConverter {\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newOptions = {} as Options;\n let path = '';\n\n const processKey = (key, value, providedType, defaultType) => {\n switch (key) {\n case 'viewDate': {\n const dateTime = this._dateConversion(value, 'viewDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'viewDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'minDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.minDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.minDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'maxDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this._dateConversion(value, 'restrictions.maxDate');\n if (dateTime !== undefined) {\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.maxDate',\n providedType,\n 'DateTime or Date'\n );\n }\n case 'disabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.disabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.disabledHours',\n 0,\n 23\n );\n return value;\n case 'enabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.enabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.enabledHours',\n 0,\n 23\n );\n return value;\n case 'daysOfWeekDisabled':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.daysOfWeekDisabled',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 6).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.daysOfWeekDisabled',\n 0,\n 6\n );\n return value;\n case 'enabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.enabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.disabledDates',\n value,\n providedType\n );\n return value;\n case 'disabledTimeIntervals':\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[];\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n let d = valueObject[i][vk];\n const dateTime = this._dateConversion(d, subOptionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n subOptionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n case 'toolbarPlacement':\n case 'type':\n case 'viewMode':\n case 'dayViewHeaderFormat':\n const optionValues = {\n toolbarPlacement: ['top', 'bottom', 'default'],\n type: ['icons', 'sprites'],\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\n dayViewHeaderFormat: [\n 'numeric',\n '2-digit',\n 'long',\n 'short',\n 'narrow',\n ],\n };\n const keyOptions = optionValues[key];\n if (!keyOptions.includes(value))\n Namespace.errorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n\n return value;\n case 'inputFormat':\n return value;\n default:\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n providedType,\n defaultType\n );\n }\n }\n };\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param mergeOption Default option to compare types against\n * @param copyTo Destination object. This was add to prevent reference copies\n */\n const spread = (provided, mergeOption, copyTo) => {\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(mergeOption).includes(x)\n );\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter._flattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.errorMessages.unexpectedOptions(errors);\n }\n Object.keys(mergeOption).forEach((key) => {\n const defaultOptionValue = mergeOption[key];\n let providedType = typeof provided[key];\n let defaultType = typeof defaultOptionValue;\n let value = provided[key];\n if (!provided.hasOwnProperty(key)) {\n if (\n defaultType === 'undefined' ||\n (value?.length === 0 && Array.isArray(defaultOptionValue))\n ) {\n copyTo[key] = defaultOptionValue;\n return;\n }\n provided[key] = defaultOptionValue;\n value = provided[key];\n }\n path += `.${key}`;\n copyTo[key] = processKey(key, value, providedType, defaultType);\n\n if (typeof defaultOptionValue !== 'object' || key === 'inputFormat') {\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n if (!Array.isArray(provided[key])) {\n spread(provided[key], defaultOptionValue, copyTo[key]);\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n }\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n };\n spread(providedOptions, mergeTo, newOptions);\n\n return newOptions;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = element.dataset;\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n let dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const rabbitHole = (\n split: string[],\n index: number,\n optionSubgroup: {},\n value: any\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = rabbitHole(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = rabbitHole(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @private\n */\n static _dateTypeCheck(d: any): DateTime | null {\n if (d.constructor.name === 'DateTime') return d;\n if (d.constructor.name === 'Date') {\n return DateTime.convert(d);\n }\n if (typeof d === typeof '') {\n const dateTime = new DateTime(d);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckDateArray(optionName: string, value, providedType: string) {\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n let d = value[i];\n const dateTime = this._dateConversion(d, optionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n value[i] = dateTime;\n }\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n return;\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n */\n static _dateConversion(d: any, optionName: string) {\n if (typeof d === typeof '') {\n Namespace.errorMessages.dateString();\n }\n\n const converted = this._dateTypeCheck(d);\n\n if (!converted) {\n Namespace.errorMessages.failedToParseDate(optionName, d);\n }\n return converted;\n }\n\n private static _flattenDefaultOptions(): string[] {\n const deepKeys = (t, pre = []) =>\n Array.isArray(t)\n ? []\n : Object(t) === t\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\n : pre.join('.');\n\n return deepKeys(DefaultOptions);\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflcits(config: Options) {\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n }\n}\n","import Display from './display/index';\nimport Validation from './validation';\nimport Dates from './dates';\nimport Actions, { ActionTypes } from './actions';\nimport { DatePickerModes, DefaultOptions } from './conts';\nimport { DateTime, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options, { OptionConverter } from './options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n FailEvent,\n} from './event-types';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n dates: Dates;\n\n _options: Options;\n _currentViewMode = 0;\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\n _element: HTMLElement;\n _input: HTMLInputElement;\n _unset: boolean;\n _minViewModeNumber = 0;\n _display: Display;\n _validation: Validation;\n _action: Actions;\n private _isDisabled = false;\n private _notifyChangeEventContext = 0;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: any;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n if (!element) {\n Namespace.errorMessages.mustProvideElement;\n }\n this._element = element;\n this._options = this._initializeOptions(options, DefaultOptions, true);\n this._viewDate.setLocale(this._options.localization.locale);\n this._unset = true;\n\n this._display = new Display(this);\n this._validation = new Validation(this);\n this.dates = new Dates(this);\n this._action = new Actions(this);\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this._options.display.inline) this._display.show();\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._options = this._initializeOptions(options, DefaultOptions);\n else this._options = this._initializeOptions(options, this._options);\n this._display._rebuild();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this._display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this._display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this._input?.setAttribute('disabled', 'disabled');\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this._input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => {} | ((event: any) => {})[]\n ): { unsubscribe: void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray = [];\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.errorMessages.subscribeMismatch;\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this._display.hide();\n // this will clear the document click event listener\n this._display._dispose();\n this._input?.removeEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.removeEventListener('click', this._toggleClickEvent);\n }\n this._toggle.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n _triggerEvent(event: BaseEvent) {\n // checking hasOwnProperty because the BasicEvent also falls through here otherwise\n if ((event as ChangeEvent) && event.hasOwnProperty('date')) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n // this was to prevent a max call stack error\n // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb\n // todo see if this is still needed or if there's a cleaner way\n this._notifyChangeEventContext++;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate) ||\n this._notifyChangeEventContext > 1\n ) {\n this._notifyChangeEventContext = 0;\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n }\n\n this._element.dispatchEvent(\n new CustomEvent(event.type, { detail: event as any })\n );\n\n if ((window as any).jQuery) {\n const $ = (window as any).jQuery;\n $(this._element).trigger(event);\n }\n\n const publish = () => {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n };\n\n publish();\n\n this._notifyChangeEventContext = 0;\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @param {Unit} unit\n * @private\n */\n _viewUpdate(unit: Unit) {\n this._triggerEvent({\n type: Namespace.events.update,\n change: unit,\n viewDate: this._viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): Options {\n config = OptionConverter._mergeOptions(config, mergeTo);\n if (includeDataset)\n config = OptionConverter._dataToOptions(this._element, config);\n\n OptionConverter._validateConflcits(config);\n\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\n\n if (!this._viewDate.isSame(config.viewDate)) {\n this._viewDate = config.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (config.display.components.year) {\n this._minViewModeNumber = 2;\n }\n if (config.display.components.month) {\n this._minViewModeNumber = 1;\n }\n if (config.display.components.date) {\n this._minViewModeNumber = 0;\n }\n\n this._currentViewMode = Math.max(\n this._minViewModeNumber,\n this._currentViewMode\n );\n\n // Update view mode if needed\n if (\n DatePickerModes[this._currentViewMode].name !== config.display.viewMode\n ) {\n this._currentViewMode = Math.max(\n DatePickerModes.findIndex((x) => x.name === config.display.viewMode),\n this._minViewModeNumber\n );\n }\n\n // defaults the input format based on the components enabled\n if (config.display.inputFormat === undefined) {\n const components = config.display.components;\n config.display.inputFormat = {\n year: components.calendar && components.year ? 'numeric' : undefined,\n month: components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute: components.clock && components.minutes ? '2-digit' : undefined,\n second: components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n };\n }\n\n if (this._display?.isVisible) {\n this._display._update('all');\n }\n\n return config;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this._element.tagName == 'INPUT') {\n this._input = this._element as HTMLInputElement;\n } else {\n let query = this._element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this._input = this._element.querySelector('input');\n } else {\n this._input = this._element.querySelector(query);\n }\n }\n\n this._input?.addEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.addEventListener('click', this._toggleClickEvent);\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this._options.display.inline) return;\n let query = this._element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined ? this._element : this._element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this._options.promptTimeOnDateChange ||\n this._options.display.inline ||\n this._options.display.sideBySide ||\n // time is disabled\n !this._display._hasTime ||\n // clock component is already showing\n this._display.widget\n ?.getElementsByClassName(Namespace.css.show)[0]\n .classList.contains(Namespace.css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this._options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this._display.widget) {\n this._action.do(\n {\n currentTarget: this._display.widget.querySelector(\n `.${Namespace.css.switch} div`\n ),\n },\n ActionTypes.togglePicker\n );\n }\n }, this._options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _inputChangeEvent = () => {\n let parsedDate = OptionConverter._dateTypeCheck(this._input.value);\n\n if (parsedDate) {\n this.dates._setValue(parsedDate);\n } else {\n this._triggerEvent({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToParseInput,\n date: parsedDate,\n } as FailEvent);\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n this.toggle();\n };\n}\n\nexport { TempusDominus, Namespace, DefaultOptions, DateTime };\n"],"names":["SecondDisplay","createPopper"],"mappings":";;;;;;IAAA,IAAY,IAOX;IAPD,WAAY,IAAI;QACd,2BAAmB,CAAA;QACnB,2BAAmB,CAAA;QACnB,uBAAe,CAAA;QACf,qBAAa,CAAA;QACb,uBAAe,CAAA;QACf,qBAAa,CAAA;IACf,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;IAOD;;;;UAIa,QAAS,SAAQ,IAAI;QAAlC;;;;;YAIE,WAAM,GAAG,SAAS,CAAC;SAyZpB;;;;;QAnZC,SAAS,CAAC,KAAa;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,OAAO,IAAI,CAA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I,IAAI,CAAC,QAAQ,CAAC,UAAU;iBACtC,CAAC,CAAC,OAAO,KAAI,MAAA,CAAC,CAAC,IAAI,0CAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA,CAAC,EACxC;gBACA,OAAO;aACR;YAED,YAAY,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YAC7C,IAAI,CAAC,yBAAyB,GAAG,UAAU,CAAC;gBAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CACb;wBACE,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAC/C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,MAAM,CAC/B;qBACF,EACD,WAAW,CAAC,YAAY,CACzB,CAAC;iBACH;aACF,EAAE,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;SACzD;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/6/migration.html b/docs/6/migration.html new file mode 100644 index 000000000..8bdd5c7d5 --- /dev/null +++ b/docs/6/migration.html @@ -0,0 +1,288 @@ + + + + + + + + Migration - Tempus Dominus + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    Migration

    +
    +
    +
    + I'm planning on creating a tool to help developers migrate from older version to v6. +
    +
    + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/6/namespace/css.html b/docs/6/namespace/css.html index 78d44449e..aa194d10a 100644 --- a/docs/6/namespace/css.html +++ b/docs/6/namespace/css.html @@ -5,7 +5,7 @@ - Css Classes - Tempus Dominus + CSS Classes - Tempus Dominus @@ -15,15 +15,17 @@ - - + - - + @@ -38,8 +40,9 @@ - - + @@ -158,262 +161,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Css Classes

    -
    +
    +
    +

    CSS Classes

    -
    +
    +

    The picker uses the following css classes to style the picker.

    @@ -422,245 +236,188 @@

    widget calendarHeader

    +

    + The element for the calendar view header, next and previous actions. +

    +

    switch

    The element for the action to change the calendar view. E.g. month -> year.

    -
    -

    sideBySide

    Applied to the widget element when the side by side option is in use.

    -
    -

    previous

    The element for the action to change the calendar view, e.g. August -> July

    -
    -

    next

    The element for the action to change the calendar view, e.g. August -> September

    -
    -

    disabled

    - Applied to any action that would violate any restriction options. ALso applied to an input field if the disabled function is called. + Applied to any action that would violate any restriction options. ALso applied to an input field if the disabled + function is called.

    -
    -

    old

    Applied to any date that is less than requested view, e.g. the last day of the previous month.

    -
    -

    new

    Applied to any date that is greater than of requested view, e.g. the last day of the previous month.

    -
    -

    active

    Applied to any date that is currently selected.

    -
    -

    dateContainer

    The outer most element for the calendar view.

    -
    -

    decadesContainer

    The outer most element for the decades view.

    -
    -

    decade

    Applied to elements within the decades container, e.g. 2020, 2030

    -
    -

    yearsContainer

    The outer most element for the years view.

    -
    -

    year

    Applied to elements within the years container, e.g. 2021, 2021

    -
    -

    monthsContainer

    The outer most element for the month view.

    -
    -
    -

    month

    +

    month +

    Applied to elements within the month container, e.g. January, February

    -
    -

    daysContainer

    The outer most element for the calendar view.

    -
    -

    day

    Applied to elements within the day container, e.g. 1, 2..31

    -
    -

    calendarWeeks

    - If display.calendarWeeks is enabled, a column displaying the week of year is shown. This class is applied to each cell in that column. + If display.calendarWeeks is enabled, a column displaying the week of year is shown. This class is applied to each + cell in that column.

    -
    -

    dayOfTheWeek

    Applied to the first row of the calendar view, e.g. Sunday, Monday

    -
    -
    -

    today

    +

    today +

    Applied to the current date on the calendar view.

    -
    -
    -

    weekend

    +

    weekend +

    Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday

    -
    -

    timeContainer

    The outer most element for all time related elements.

    -
    -

    separator

    Applied the separator columns between time elements, e.g. hour *:* minute *:* second

    -
    -

    clockContainer

    The outer most element for the clock view.

    -
    -

    hourContainer

    The outer most element for the hours selection view.

    -
    -

    minuteContainer

    The outer most element for the minutes selection view.

    -
    -

    secondContainer

    The outer most element for the seconds selection view.

    -
    -

    hour

    Applied to each element in the hours selection view.

    -
    -

    minute

    Applied to each element in the minutes selection view.

    -
    -

    second

    Applied to each element in the seconds selection view.

    -
    -

    show

    Applied the element of the current view mode, e.g. calendar or clock.

    -
    -

    collapsing

    Applied to the currently showing view mode during a transition between calendar and clock views

    -
    -

    collapse

    Applied to the currently hidden view mode.

    -
    -

    inline

    Applied to the widget when the option display.inline is enabled.

    +
    diff --git a/docs/6/namespace/errors.html b/docs/6/namespace/errors.html index 7854f20fd..8568d138e 100644 --- a/docs/6/namespace/errors.html +++ b/docs/6/namespace/errors.html @@ -16,15 +16,13 @@ - + - + @@ -39,8 +37,7 @@ - + @@ -158,262 +155,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Errors

    -
    +
    +
    +

    Errors

    -
    +
    +

    The date picker will throw errors for a number of different reason. Most errors are related to an invalid setup.

    @@ -430,71 +238,53 @@

    unexpectedOption (code: 1)unexpectedOptions (code: 1)

    An error indicating that one more keys in the options object is invalid.

    - -

    unexpectedOptionValue (code: 2)

    An error when an option is provide an unsupported value. For example a value of 'cheese' for toolbarPlacement which only supports 'top', 'bottom', 'default'.

    -
    -

    typeMismatch (code: 3)

    An error when an option value is the wrong type. For example a string value was provided to multipleDates which only supports true or false.

    -
    -

    numbersOutOfRage (code: 4)

    An error when an option value is outside of the expected range. For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.

    -
    -

    failedToParseDate (code: 5)

    An error when a value for a date options couldn't be parsed. Either the option was an invalide string or an invalid Date object.

    -
    -

    mustProvideElement (code: 6)

    An error when an element to attach to was not provided in the constructor.

    -
    -

    subscribeMismatch (code: 7)

    An error if providing an array for the events to subscribe method doesn't have the same number of callbacks. E.g., subscribe([1,2], [1])

    -
    -

    conflictingConfiguration (code: 8)

    The configuration has conflicting rules e.g. minDate is after maxDate

    -
    -

    dateString

    Logs a warning if a date option value is provided as a string, instead of @@ -502,22 +292,24 @@

    dateString

    -

    Error Messages

    -
    -

    failedToSetInvalidDate

    -

    - Used with an Error Event type if the user selects a date that fails restriction - validation. -

    -
    - -
    -

    failedToParseInput

    -

    - Used with an Error Event type when a user changes the value of the input field - directly, and does not provide a valid date. -

    +

    Error Messages

    +
    +
    +

    failedToSetInvalidDate

    +

    + Used with an Error Event type if the user selects a date that fails + restriction + validation. +

    + +

    failedToParseInput

    +

    + Used with an Error Event type when a user changes the value of the input field + directly, and does not provide a valid date. +

    +
    +
    diff --git a/docs/6/namespace/events.html b/docs/6/namespace/events.html index 37fdb162a..ffdea609a 100644 --- a/docs/6/namespace/events.html +++ b/docs/6/namespace/events.html @@ -16,15 +16,13 @@ - + - + @@ -39,8 +37,7 @@ - + @@ -158,262 +155,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Events

    -
    +
    +
    +

    Events

    -
    +
    +

    These events may provide additional details. For native javascript you can diff --git a/docs/6/namespace/index.html b/docs/6/namespace/index.html index b48767b63..276c6de49 100644 --- a/docs/6/namespace/index.html +++ b/docs/6/namespace/index.html @@ -16,14 +16,16 @@ - - @@ -39,7 +41,8 @@ - @@ -158,262 +161,73 @@

    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Namespace

    -
    +
    +
    +

    Namespace

    -
    +
    +

    Tempus Dominus uses and exposes a Namespace class for consistancy and easy reference. @@ -432,14 +246,13 @@

    version

    dataKey

    Returns td. This is used as a suffix for events e.g. change.td.

    - -

    Events

    +

    events

    A class with the pickers event keys. See the full events page for more details.

    -

    Css

    +

    css

    A class with the pickers css classes. See the full css page for more details.

    -

    ErrorMessages

    +

    errorMessages

    A class with the pickers errors and error messages. See the full css page for more details.

    diff --git a/docs/6/options.html b/docs/6/options.html index 6fc2f5668..cbe81c31e 100644 --- a/docs/6/options.html +++ b/docs/6/options.html @@ -158,262 +158,73 @@
    + +
  • +
  • + + Migration + +
  • + +
    -
    -
    -

    Options

    -
    +
    +
    +

    Options

    -
    +
    +

    Options can be provided during the inital setup through the constructor new tempusDominus.TempusDominus(..., options);. Take a look at the examples for more information. diff --git a/docs/css/styles.min.css b/docs/css/styles.min.css index 890516149..f2d61bab4 100644 --- a/docs/css/styles.min.css +++ b/docs/css/styles.min.css @@ -10756,7 +10756,7 @@ textarea.form-control-lg { */ .bd-navbar { padding: 0.75rem 0; - background-color: #7952b3; + background-color: var(--bs-primary); } .bd-navbar .navbar-toggler { diff --git a/docs/js/bundle.min.js b/docs/js/bundle.min.js index 6697c88dd..5919104cc 100644 --- a/docs/js/bundle.min.js +++ b/docs/js/bundle.min.js @@ -1,7 +1,7 @@ -function logger(e,t,...arguments){const i=document.createElement("div");switch(i.classList.add("alert"),t){case"log":i.classList.add("alert-primary");break;case"debug":i.classList.add("alert-secondary");break;case"info":i.classList.add("alert-info");break;case"warn":i.classList.add("alert-warning");break;case"error":i.classList.add("alert-danger")}const n=document.createElement("pre");n.innerHTML=arguments.join(" "),i.appendChild(n),e.appendChild(i)}document.addEventListener("DOMContentLoaded",(()=>{Array.from(document.getElementsByClassName("show-code")).forEach((e=>{e.addEventListener("click",(()=>{const t=e.closest("section").getElementsByClassName("code-blocks")[0];t.classList.toggle("d-block"),t.classList.toggle("d-none")}))}));const e=["change.td","update.td","error.td","show.td","hide.td","click.td"];document.querySelectorAll(".log-event").forEach((t=>{e.forEach((e=>{t.addEventListener(e,(i=>{logger(t.closest("section").getElementsByClassName("logger")[0],"log",`${t.getAttribute("id")} -> ${e}:`,JSON.stringify(i.detail,null,2))}))}))}))})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function s(e){return e instanceof i(e).Element||e instanceof Element}function o(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function r(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function a(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(l(e)).left+n(e).scrollLeft}function h(e){return i(e).getComputedStyle(e)}function d(e){var t=h(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function u(e,s,r){void 0===r&&(r=!1);var h,u,f=l(s),p=t(e),m=o(s),g={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(m||!m&&!r)&&(("body"!==a(s)||d(f))&&(g=(h=s)!==i(h)&&o(h)?{scrollLeft:(u=h).scrollLeft,scrollTop:u.scrollTop}:n(h)),o(s)?((_=t(s)).x+=s.clientLeft,_.y+=s.clientTop):f&&(_.x=c(f))),{x:p.left+g.scrollLeft-_.x,y:p.top+g.scrollTop-_.y,width:p.width,height:p.height}}function f(e){var i=t(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(i.width-n)<=1&&(n=i.width),Math.abs(i.height-s)<=1&&(s=i.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function p(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||l(e)}function m(e){return["html","body","#document"].indexOf(a(e))>=0?e.ownerDocument.body:o(e)&&d(e)?e:m(p(e))}function g(e,t){var n;void 0===t&&(t=[]);var s=m(e),o=s===(null==(n=e.ownerDocument)?void 0:n.body),r=i(s),a=o?[r].concat(r.visualViewport||[],d(s)?s:[]):s,l=t.concat(a);return o?l:l.concat(g(p(a)))}function _(e){return["table","td","th"].indexOf(a(e))>=0}function b(e){return o(e)&&"fixed"!==h(e).position?e.offsetParent:null}function v(e){for(var t=i(e),n=b(e);n&&_(n)&&"static"===h(n).position;)n=b(n);return n&&("html"===a(n)||"body"===a(n)&&"static"===h(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&o(e)&&"fixed"===h(e).position)return null;for(var i=p(e);o(i)&&["html","body"].indexOf(a(i))<0;){var n=h(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}var y="top",w="bottom",E="right",A="left",T="auto",O=[y,w,E,A],L="start",C="end",k="viewport",x="popper",D=O.reduce((function(e,t){return e.concat([t+"-"+L,t+"-"+C])}),[]),S=[].concat(O,[T]).reduce((function(e,t){return e.concat([t,t+"-"+L,t+"-"+C])}),[]),I=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function N(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||s(e)})),n}function j(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n=0&&o(e)?v(e):e;return s(i)?t.filter((function(e){return s(e)&&q(e,i)&&"body"!==a(e)})):[]}(e):[].concat(t),r=[].concat(n,[i]),l=r[0],c=r.reduce((function(t,i){var n=z(e,i);return t.top=B(n.top,t.top),t.right=R(n.right,t.right),t.bottom=R(n.bottom,t.bottom),t.left=B(n.left,t.left),t}),z(e,l));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function U(e){return e.split("-")[1]}function V(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e){var t,i=e.reference,n=e.element,s=e.placement,o=s?H(s):null,r=s?U(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case y:t={x:a,y:i.y-n.height};break;case w:t={x:a,y:i.y+i.height};break;case E:t={x:i.x+i.width,y:l};break;case A:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=o?V(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case L:t[c]=t[c]-(i[h]/2-n[h]/2);break;case C:t[c]=t[c]+(i[h]/2-n[h]/2)}}return t}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Y(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}function Q(e,i){void 0===i&&(i={});var n=i,o=n.placement,r=void 0===o?e.placement:o,a=n.boundary,c=void 0===a?"clippingParents":a,h=n.rootBoundary,d=void 0===h?k:h,u=n.elementContext,f=void 0===u?x:u,p=n.altBoundary,m=void 0!==p&&p,g=n.padding,_=void 0===g?0:g,b=X("number"!=typeof _?_:Y(_,O)),v=f===x?"reference":x,A=e.elements.reference,T=e.rects.popper,L=e.elements[m?v:f],C=F(s(L)?L:L.contextElement||l(e.elements.popper),c,d),D=t(A),S=K({reference:D,element:T,strategy:"absolute",placement:r}),I=W(Object.assign({},T,S)),N=f===x?I:D,j={top:C.top-N.top+b.top,bottom:N.bottom-C.bottom+b.bottom,left:C.left-N.left+b.left,right:N.right-C.right+b.right},P=e.modifiersData.offset;if(f===x&&P){var M=P[r];Object.keys(j).forEach((function(e){var t=[E,w].indexOf(e)>=0?1:-1,i=[y,w].indexOf(e)>=0?"y":"x";j[e]+=M[i]*t}))}return j}var G="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",J={placement:"bottom",modifiers:[],strategy:"absolute"};function Z(){for(var e=arguments.length,t=new Array(e),i=0;i100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==l.reset){var o=l.orderedModifiers[s],r=o.fn,a=o.options,c=void 0===a?{}:a,h=o.name;"function"==typeof r&&(l=r({state:l,options:c,name:h,instance:p})||l)}else l.reset=!1,s=-1}}else console.error(G)}},update:(o=function(){return new Promise((function(e){p.forceUpdate(),e(l)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){m(),d=!0}};if(!Z(e,t))return console.error(G),p;function m(){c.forEach((function(e){return e()})),c=[]}return p.setOptions(i).then((function(e){!d&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p}}var te={passive:!0};var ie={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,s=e.options,o=s.scroll,r=void 0===o||o,a=s.resize,l=void 0===a||a,c=i(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach((function(e){e.addEventListener("scroll",n.update,te)})),l&&c.addEventListener("resize",n.update,te),function(){r&&h.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),l&&c.removeEventListener("resize",n.update,te)}},data:{}};var ne={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=K({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},se={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe(e){var t,n=e.popper,s=e.popperRect,o=e.placement,r=e.offsets,a=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,f=!0===u?function(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:$($(t*n)/n)||0,y:$($(i*n)/n)||0}}(r):"function"==typeof u?u(r):r,p=f.x,m=void 0===p?0:p,g=f.y,_=void 0===g?0:g,b=r.hasOwnProperty("x"),T=r.hasOwnProperty("y"),O=A,L=y,C=window;if(d){var k=v(n),x="clientHeight",D="clientWidth";k===i(n)&&"static"!==h(k=l(n)).position&&(x="scrollHeight",D="scrollWidth"),k=k,o===y&&(L=w,_-=k[x]-s.height,_*=c?1:-1),o===A&&(O=E,m-=k[D]-s.width,m*=c?1:-1)}var S,I=Object.assign({position:a},d&&se);return c?Object.assign({},I,((S={})[L]=T?"0":"",S[O]=b?"0":"",S.transform=(C.devicePixelRatio||1)<2?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",S)):Object.assign({},I,((t={})[L]=T?_+"px":"",t[O]=b?m+"px":"",t.transform="",t))}var re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c=h(t.elements.popper).transitionProperty||"";r&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var d={placement:H(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,oe(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,oe(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ae={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];o(s)&&a(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],s=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});o(n)&&a(n)&&(Object.assign(n.style,r),Object.keys(s).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};var le={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.offset,o=void 0===s?[0,0]:s,r=S.reduce((function(e,i){return e[i]=function(e,t,i){var n=H(e),s=[A,y].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[A,E].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,t.rects,o),e}),{}),a=r[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}},ce={left:"right",right:"left",bottom:"top",top:"bottom"};function he(e){return e.replace(/left|right|bottom|top/g,(function(e){return ce[e]}))}var de={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return de[e]}))}function fe(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?S:l,h=U(n),d=h?a?D:D.filter((function(e){return U(e)===h})):O,u=d.filter((function(e){return c.indexOf(e)>=0}));0===u.length&&(u=d,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var f=u.reduce((function(t,i){return t[i]=Q(e,{placement:i,boundary:s,rootBoundary:o,padding:r})[H(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var pe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=t.options.placement,_=H(g),b=l||(_===g||!p?[he(g)]:function(e){if(H(e)===T)return[];var t=he(e);return[ue(e),t,ue(t)]}(g)),v=[g].concat(b).reduce((function(e,i){return e.concat(H(i)===T?fe(t,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),O=t.rects.reference,C=t.rects.popper,k=new Map,x=!0,D=v[0],S=0;S=0,M=P?"width":"height",B=Q(t,{placement:I,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),R=P?j?E:A:j?w:y;O[M]>C[M]&&(R=he(R));var $=he(R),q=[];if(o&&q.push(B[N]<=0),a&&q.push(B[R]<=0,B[$]<=0),q.every((function(e){return e}))){D=I,x=!1;break}k.set(I,q)}if(x)for(var W=function(e){var t=v.find((function(t){var i=k.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return D=t,"break"},z=p?3:1;z>0;z--){if("break"===W(z))break}t.placement!==D&&(t.modifiersData[n]._skip=!0,t.placement=D,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function me(e,t,i){return B(e,R(t,i))}var ge={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,p=void 0===u||u,m=i.tetherOffset,g=void 0===m?0:m,_=Q(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),b=H(t.placement),T=U(t.placement),O=!T,C=V(b),k="x"===C?"y":"x",x=t.modifiersData.popperOffsets,D=t.rects.reference,S=t.rects.popper,I="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,N={x:0,y:0};if(x){if(o||a){var j="y"===C?y:A,P="y"===C?w:E,M="y"===C?"height":"width",$=x[C],q=x[C]+_[j],W=x[C]-_[P],z=p?-S[M]/2:0,F=T===L?D[M]:S[M],K=T===L?-S[M]:-D[M],X=t.elements.arrow,Y=p&&X?f(X):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=G[j],Z=G[P],ee=me(0,D[M],Y[M]),te=O?D[M]/2-z-ee-J-I:F-ee-J-I,ie=O?-D[M]/2+z+ee+Z+I:K+ee+Z+I,ne=t.elements.arrow&&v(t.elements.arrow),se=ne?"y"===C?ne.clientTop||0:ne.clientLeft||0:0,oe=t.modifiersData.offset?t.modifiersData.offset[t.placement][C]:0,re=x[C]+te-oe-se,ae=x[C]+ie-oe;if(o){var le=me(p?R(q,re):q,$,p?B(W,ae):W);x[C]=le,N[C]=le-$}if(a){var ce="x"===C?y:A,he="x"===C?w:E,de=x[k],ue=de+_[ce],fe=de-_[he],pe=me(p?R(ue,re):ue,de,p?B(fe,ae):fe);x[k]=pe,N[k]=pe-de}}t.modifiersData[n]=N}},requiresIfExists:["offset"]};var _e={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,s=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=H(i.placement),l=V(a),c=[A,E].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Y(e,O))}(s.padding,i),d=f(o),u="y"===l?y:A,p="y"===l?w:E,m=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],_=v(o),b=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,T=m/2-g/2,L=h[u],C=b-d[c]-h[p],k=b/2-d[c]/2+T,x=me(L,k,C),D=l;i.modifiersData[n]=((t={})[D]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&(o(n)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),q(t.elements.popper,n)?t.elements.arrow=n:console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function be(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ve(e){return[y,E,w,A].some((function(t){return e[t]>=0}))}var ye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=Q(t,{elementContext:"reference"}),a=Q(t,{altBoundary:!0}),l=be(r,n),c=be(a,s,o),h=ve(l),d=ve(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},we=ee({defaultModifiers:[ie,ne,re,ae]}),Ee=[ie,ne,re,ae,le,pe,ge,_e,ye],Ae=ee({defaultModifiers:Ee});e.applyStyles=ae,e.arrow=_e,e.computeStyles=re,e.createPopper=Ae,e.createPopperLite=we,e.defaultModifiers=Ee,e.detectOverflow=Q,e.eventListeners=ie,e.flip=pe,e.hide=ye,e.offset=le,e.popperGenerator=ee,e.popperOffsets=ne,e.preventOverflow=ge,Object.defineProperty(e,"__esModule",{value:!0})})), +function logger(e,t,...arguments){const i=document.createElement("div");switch(i.classList.add("alert"),t){case"log":i.classList.add("alert-primary");break;case"debug":i.classList.add("alert-secondary");break;case"info":i.classList.add("alert-info");break;case"warn":i.classList.add("alert-warning");break;case"error":i.classList.add("alert-danger")}const n=document.createElement("pre");n.innerHTML=arguments.join(" "),i.appendChild(n),e.appendChild(i)}document.addEventListener("DOMContentLoaded",(()=>{Array.from(document.getElementsByClassName("show-code")).forEach((e=>{e.addEventListener("click",(()=>{const t=e.closest("section").getElementsByClassName("code-blocks")[0];t.classList.toggle("d-block"),t.classList.toggle("d-none")}))}));const e=["change.td","update.td","error.td","show.td","hide.td","click.td"];document.querySelectorAll(".log-event").forEach((t=>{e.forEach((e=>{t.addEventListener(e,(i=>{logger(t.closest("section").getElementsByClassName("logger")[0],"log",`${t.getAttribute("id")} -> ${e}:`,JSON.stringify(i.detail,null,2))}))}))}));const t=document.getElementById("mainToc");if(t){const e=[...t.getElementsByTagName("a")].find((e=>e.href===window.location.href));e?.closest("div").parentElement.children[0].click(),e?.classList.add("active")}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function s(e){return e instanceof i(e).Element||e instanceof Element}function o(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function r(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function a(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((s(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(l(e)).left+n(e).scrollLeft}function h(e){return i(e).getComputedStyle(e)}function d(e){var t=h(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function u(e,s,r){void 0===r&&(r=!1);var h,u,f=l(s),p=t(e),m=o(s),g={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(m||!m&&!r)&&(("body"!==a(s)||d(f))&&(g=(h=s)!==i(h)&&o(h)?{scrollLeft:(u=h).scrollLeft,scrollTop:u.scrollTop}:n(h)),o(s)?((_=t(s)).x+=s.clientLeft,_.y+=s.clientTop):f&&(_.x=c(f))),{x:p.left+g.scrollLeft-_.x,y:p.top+g.scrollTop-_.y,width:p.width,height:p.height}}function f(e){var i=t(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(i.width-n)<=1&&(n=i.width),Math.abs(i.height-s)<=1&&(s=i.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function p(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||l(e)}function m(e){return["html","body","#document"].indexOf(a(e))>=0?e.ownerDocument.body:o(e)&&d(e)?e:m(p(e))}function g(e,t){var n;void 0===t&&(t=[]);var s=m(e),o=s===(null==(n=e.ownerDocument)?void 0:n.body),r=i(s),a=o?[r].concat(r.visualViewport||[],d(s)?s:[]):s,l=t.concat(a);return o?l:l.concat(g(p(a)))}function _(e){return["table","td","th"].indexOf(a(e))>=0}function b(e){return o(e)&&"fixed"!==h(e).position?e.offsetParent:null}function v(e){for(var t=i(e),n=b(e);n&&_(n)&&"static"===h(n).position;)n=b(n);return n&&("html"===a(n)||"body"===a(n)&&"static"===h(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&o(e)&&"fixed"===h(e).position)return null;for(var i=p(e);o(i)&&["html","body"].indexOf(a(i))<0;){var n=h(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}var y="top",w="bottom",E="right",T="left",A="auto",O=[y,w,E,T],L="start",k="end",C="viewport",x="popper",D=O.reduce((function(e,t){return e.concat([t+"-"+L,t+"-"+k])}),[]),S=[].concat(O,[A]).reduce((function(e,t){return e.concat([t,t+"-"+L,t+"-"+k])}),[]),I=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function N(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||s(e)})),n}function j(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n=0&&o(e)?v(e):e;return s(i)?t.filter((function(e){return s(e)&&q(e,i)&&"body"!==a(e)})):[]}(e):[].concat(t),r=[].concat(n,[i]),l=r[0],c=r.reduce((function(t,i){var n=z(e,i);return t.top=B(n.top,t.top),t.right=R(n.right,t.right),t.bottom=R(n.bottom,t.bottom),t.left=B(n.left,t.left),t}),z(e,l));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function U(e){return e.split("-")[1]}function V(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e){var t,i=e.reference,n=e.element,s=e.placement,o=s?H(s):null,r=s?U(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case y:t={x:a,y:i.y-n.height};break;case w:t={x:a,y:i.y+i.height};break;case E:t={x:i.x+i.width,y:l};break;case T:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=o?V(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case L:t[c]=t[c]-(i[h]/2-n[h]/2);break;case k:t[c]=t[c]+(i[h]/2-n[h]/2)}}return t}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Y(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}function Q(e,i){void 0===i&&(i={});var n=i,o=n.placement,r=void 0===o?e.placement:o,a=n.boundary,c=void 0===a?"clippingParents":a,h=n.rootBoundary,d=void 0===h?C:h,u=n.elementContext,f=void 0===u?x:u,p=n.altBoundary,m=void 0!==p&&p,g=n.padding,_=void 0===g?0:g,b=X("number"!=typeof _?_:Y(_,O)),v=f===x?"reference":x,T=e.elements.reference,A=e.rects.popper,L=e.elements[m?v:f],k=F(s(L)?L:L.contextElement||l(e.elements.popper),c,d),D=t(T),S=K({reference:D,element:A,strategy:"absolute",placement:r}),I=W(Object.assign({},A,S)),N=f===x?I:D,j={top:k.top-N.top+b.top,bottom:N.bottom-k.bottom+b.bottom,left:k.left-N.left+b.left,right:N.right-k.right+b.right},P=e.modifiersData.offset;if(f===x&&P){var M=P[r];Object.keys(j).forEach((function(e){var t=[E,w].indexOf(e)>=0?1:-1,i=[y,w].indexOf(e)>=0?"y":"x";j[e]+=M[i]*t}))}return j}var G="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",J={placement:"bottom",modifiers:[],strategy:"absolute"};function Z(){for(var e=arguments.length,t=new Array(e),i=0;i100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==l.reset){var o=l.orderedModifiers[s],r=o.fn,a=o.options,c=void 0===a?{}:a,h=o.name;"function"==typeof r&&(l=r({state:l,options:c,name:h,instance:p})||l)}else l.reset=!1,s=-1}}else console.error(G)}},update:(o=function(){return new Promise((function(e){p.forceUpdate(),e(l)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){m(),d=!0}};if(!Z(e,t))return console.error(G),p;function m(){c.forEach((function(e){return e()})),c=[]}return p.setOptions(i).then((function(e){!d&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p}}var te={passive:!0};var ie={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,s=e.options,o=s.scroll,r=void 0===o||o,a=s.resize,l=void 0===a||a,c=i(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach((function(e){e.addEventListener("scroll",n.update,te)})),l&&c.addEventListener("resize",n.update,te),function(){r&&h.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),l&&c.removeEventListener("resize",n.update,te)}},data:{}};var ne={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=K({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},se={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe(e){var t,n=e.popper,s=e.popperRect,o=e.placement,r=e.offsets,a=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,f=!0===u?function(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:$($(t*n)/n)||0,y:$($(i*n)/n)||0}}(r):"function"==typeof u?u(r):r,p=f.x,m=void 0===p?0:p,g=f.y,_=void 0===g?0:g,b=r.hasOwnProperty("x"),A=r.hasOwnProperty("y"),O=T,L=y,k=window;if(d){var C=v(n),x="clientHeight",D="clientWidth";C===i(n)&&"static"!==h(C=l(n)).position&&(x="scrollHeight",D="scrollWidth"),C=C,o===y&&(L=w,_-=C[x]-s.height,_*=c?1:-1),o===T&&(O=E,m-=C[D]-s.width,m*=c?1:-1)}var S,I=Object.assign({position:a},d&&se);return c?Object.assign({},I,((S={})[L]=A?"0":"",S[O]=b?"0":"",S.transform=(k.devicePixelRatio||1)<2?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",S)):Object.assign({},I,((t={})[L]=A?_+"px":"",t[O]=b?m+"px":"",t.transform="",t))}var re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c=h(t.elements.popper).transitionProperty||"";r&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var d={placement:H(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,oe(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,oe(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ae={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];o(s)&&a(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],s=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});o(n)&&a(n)&&(Object.assign(n.style,r),Object.keys(s).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};var le={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.offset,o=void 0===s?[0,0]:s,r=S.reduce((function(e,i){return e[i]=function(e,t,i){var n=H(e),s=[T,y].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[T,E].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,t.rects,o),e}),{}),a=r[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}},ce={left:"right",right:"left",bottom:"top",top:"bottom"};function he(e){return e.replace(/left|right|bottom|top/g,(function(e){return ce[e]}))}var de={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return de[e]}))}function fe(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?S:l,h=U(n),d=h?a?D:D.filter((function(e){return U(e)===h})):O,u=d.filter((function(e){return c.indexOf(e)>=0}));0===u.length&&(u=d,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var f=u.reduce((function(t,i){return t[i]=Q(e,{placement:i,boundary:s,rootBoundary:o,padding:r})[H(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var pe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=t.options.placement,_=H(g),b=l||(_===g||!p?[he(g)]:function(e){if(H(e)===A)return[];var t=he(e);return[ue(e),t,ue(t)]}(g)),v=[g].concat(b).reduce((function(e,i){return e.concat(H(i)===A?fe(t,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),O=t.rects.reference,k=t.rects.popper,C=new Map,x=!0,D=v[0],S=0;S=0,M=P?"width":"height",B=Q(t,{placement:I,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),R=P?j?E:T:j?w:y;O[M]>k[M]&&(R=he(R));var $=he(R),q=[];if(o&&q.push(B[N]<=0),a&&q.push(B[R]<=0,B[$]<=0),q.every((function(e){return e}))){D=I,x=!1;break}C.set(I,q)}if(x)for(var W=function(e){var t=v.find((function(t){var i=C.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return D=t,"break"},z=p?3:1;z>0;z--){if("break"===W(z))break}t.placement!==D&&(t.modifiersData[n]._skip=!0,t.placement=D,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function me(e,t,i){return B(e,R(t,i))}var ge={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,p=void 0===u||u,m=i.tetherOffset,g=void 0===m?0:m,_=Q(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),b=H(t.placement),A=U(t.placement),O=!A,k=V(b),C="x"===k?"y":"x",x=t.modifiersData.popperOffsets,D=t.rects.reference,S=t.rects.popper,I="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,N={x:0,y:0};if(x){if(o||a){var j="y"===k?y:T,P="y"===k?w:E,M="y"===k?"height":"width",$=x[k],q=x[k]+_[j],W=x[k]-_[P],z=p?-S[M]/2:0,F=A===L?D[M]:S[M],K=A===L?-S[M]:-D[M],X=t.elements.arrow,Y=p&&X?f(X):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=G[j],Z=G[P],ee=me(0,D[M],Y[M]),te=O?D[M]/2-z-ee-J-I:F-ee-J-I,ie=O?-D[M]/2+z+ee+Z+I:K+ee+Z+I,ne=t.elements.arrow&&v(t.elements.arrow),se=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,oe=t.modifiersData.offset?t.modifiersData.offset[t.placement][k]:0,re=x[k]+te-oe-se,ae=x[k]+ie-oe;if(o){var le=me(p?R(q,re):q,$,p?B(W,ae):W);x[k]=le,N[k]=le-$}if(a){var ce="x"===k?y:T,he="x"===k?w:E,de=x[C],ue=de+_[ce],fe=de-_[he],pe=me(p?R(ue,re):ue,de,p?B(fe,ae):fe);x[C]=pe,N[C]=pe-de}}t.modifiersData[n]=N}},requiresIfExists:["offset"]};var _e={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,s=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=H(i.placement),l=V(a),c=[T,E].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Y(e,O))}(s.padding,i),d=f(o),u="y"===l?y:T,p="y"===l?w:E,m=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],_=v(o),b=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,A=m/2-g/2,L=h[u],k=b-d[c]-h[p],C=b/2-d[c]/2+A,x=me(L,C,k),D=l;i.modifiersData[n]=((t={})[D]=x,t.centerOffset=x-C,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&(o(n)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),q(t.elements.popper,n)?t.elements.arrow=n:console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function be(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ve(e){return[y,E,w,T].some((function(t){return e[t]>=0}))}var ye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=Q(t,{elementContext:"reference"}),a=Q(t,{altBoundary:!0}),l=be(r,n),c=be(a,s,o),h=ve(l),d=ve(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},we=ee({defaultModifiers:[ie,ne,re,ae]}),Ee=[ie,ne,re,ae,le,pe,ge,_e,ye],Te=ee({defaultModifiers:Ee});e.applyStyles=ae,e.arrow=_e,e.computeStyles=re,e.createPopper=Te,e.createPopperLite=we,e.defaultModifiers=Ee,e.detectOverflow=Q,e.eventListeners=ie,e.flip=pe,e.hide=ye,e.offset=le,e.popperGenerator=ee,e.popperOffsets=ne,e.preventOverflow=ge,Object.defineProperty(e,"__esModule",{value:!0})})), /*! * Bootstrap v5.0.2 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap=t(e.Popper)}(this,(function(e){"use strict";function t(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var i=t(e);const n={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let n=e.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&i.push(n),n=n.parentNode;return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]}},s="transitionend",o=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},r=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t},a=e=>{const t=r(e);return t&&document.querySelector(t)?t:null},l=e=>{const t=r(e);return t?document.querySelector(t):null},c=e=>{e.dispatchEvent(new Event(s))},h=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),d=e=>h(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?n.findOne(e):null,u=(e,t,i)=>{Object.keys(i).forEach((n=>{const s=i[n],o=t[n],r=o&&h(o)?"element":null==(a=o)?`${a}`:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(s).test(r))throw new TypeError(`${e.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}))},f=e=>!(!h(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),p=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),m=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?m(e.parentNode):null},g=()=>{},_=e=>e.offsetHeight,b=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},v=[],y=()=>"rtl"===document.documentElement.dir,w=e=>{var t;t=()=>{const t=b();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(v.length||document.addEventListener("DOMContentLoaded",(()=>{v.forEach((e=>e()))})),v.push(t)):t()},E=e=>{"function"==typeof e&&e()},A=(e,t,i=!0)=>{if(!i)return void E(e);const n=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),s=Number.parseFloat(i);return n||s?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let o=!1;const r=({target:i})=>{i===t&&(o=!0,t.removeEventListener(s,r),E(e))};t.addEventListener(s,r),setTimeout((()=>{o||c(t)}),n)},T=(e,t,i,n)=>{let s=e.indexOf(t);if(-1===s)return e[!i&&n?e.length-1:0];const o=e.length;return s+=i?1:-1,n&&(s=(s+o)%o),e[Math.max(0,Math.min(s,o-1))]},O=/[^.]*(?=\..*)\.|.*/,L=/\..*/,C=/::\d+$/,k={};let x=1;const D={mouseenter:"mouseover",mouseleave:"mouseout"},S=/^(mouseenter|mouseleave)/i,I=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(e,t){return t&&`${t}::${x++}`||e.uidEvent||x++}function j(e){const t=N(e);return e.uidEvent=t,k[t]=k[t]||{},k[t]}function P(e,t,i=null){const n=Object.keys(e);for(let s=0,o=n.length;sfunction(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};n?n=e(n):i=e(i)}const[o,r,a]=M(t,i,n),l=j(e),c=l[a]||(l[a]={}),h=P(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=N(r,t.replace(O,"")),u=o?function(e,t,i){return function n(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&$.off(e,s.type,t,i),i.apply(r,[s]);return null}}(e,i,n):function(e,t){return function i(n){return n.delegateTarget=e,i.oneOff&&$.off(e,n.type,t),t.apply(e,[n])}}(e,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=d,c[d]=u,e.addEventListener(a,u,o)}function B(e,t,i,n,s){const o=P(t[i],n,s);o&&(e.removeEventListener(i,o,Boolean(s)),delete t[i][o.uidEvent])}function R(e){return e=e.replace(L,""),D[e]||e}const $={on(e,t,i,n){H(e,t,i,n,!1)},one(e,t,i,n){H(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,o,r]=M(t,i,n),a=r!==t,l=j(e),c=t.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void B(e,l,r,o,s?i:null)}c&&Object.keys(l).forEach((i=>{!function(e,t,i,n){const s=t[i]||{};Object.keys(s).forEach((o=>{if(o.includes(n)){const n=s[o];B(e,t,i,n.originalHandler,n.delegationSelector)}}))}(e,l,i,t.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((i=>{const n=i.replace(C,"");if(!a||t.includes(n)){const t=h[i];B(e,l,r,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=b(),s=R(t),o=t!==s,r=I.has(s);let a,l=!0,c=!0,h=!1,d=null;return o&&n&&(a=n.Event(t,i),n(e).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(s,l,!0)):d=new CustomEvent(t,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((e=>{Object.defineProperty(d,e,{get:()=>i[e]})})),h&&d.preventDefault(),c&&e.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},q=new Map;var W={set(e,t,i){q.has(e)||q.set(e,new Map);const n=q.get(e);n.has(t)||0===n.size?n.set(t,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(e,t)=>q.has(e)&&q.get(e).get(t)||null,remove(e,t){if(!q.has(e))return;const i=q.get(e);i.delete(t),0===i.size&&q.delete(e)}};class z{constructor(e){(e=d(e))&&(this._element=e,W.set(this._element,this.constructor.DATA_KEY,this))}dispose(){W.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,i=!0){A(e,t,i)}static getInstance(e){return W.get(e,this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.0.2"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}class F extends z{static get NAME(){return"alert"}close(e){const t=e?this._getRootElement(e):this._element,i=this._triggerCloseEvent(t);null===i||i.defaultPrevented||this._removeElement(t)}_getRootElement(e){return l(e)||e.closest(".alert")}_triggerCloseEvent(e){return $.trigger(e,"close.bs.alert")}_removeElement(e){e.classList.remove("show");const t=e.classList.contains("fade");this._queueCallback((()=>this._destroyElement(e)),e,t)}_destroyElement(e){e.remove(),$.trigger(e,"closed.bs.alert")}static jQueryInterface(e){return this.each((function(){const t=F.getOrCreateInstance(this);"close"===e&&t[e](this)}))}static handleDismiss(e){return function(t){t&&t.preventDefault(),e.close(this)}}}$.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',F.handleDismiss(new F)),w(F);const U='[data-bs-toggle="button"]';class V extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=V.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}function K(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function X(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}$.on(document,"click.bs.button.data-api",U,(e=>{e.preventDefault();const t=e.target.closest(U);V.getOrCreateInstance(t).toggle()})),w(V);const Y={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${X(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${X(t)}`)},getDataAttributes(e){if(!e)return{};const t={};return Object.keys(e.dataset).filter((e=>e.startsWith("bs"))).forEach((i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=K(e.dataset[i])})),t},getDataAttribute:(e,t)=>K(e.getAttribute(`data-bs-${X(t)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},position:e=>({top:e.offsetTop,left:e.offsetLeft})},Q="carousel",G={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},J={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Z="next",ee="prev",te="left",ie="right",ne={ArrowLeft:ie,ArrowRight:te},se="slid.bs.carousel",oe="active",re=".active.carousel-item",ae="touch";class le extends z{constructor(e,t){super(e),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._indicatorsElement=n.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return G}static get NAME(){return Q}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&f(this._element)&&this.next()}prev(){this._slide(ee)}pause(e){e||(this._isPaused=!0),n.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=n.findOne(re,this._element);const t=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding)return void $.one(this._element,se,(()=>this.to(e)));if(t===e)return this.pause(),void this.cycle();const i=e>t?Z:ee;this._slide(i,this._items[e])}_getConfig(e){return e={...G,...Y.getDataAttributes(this._element),..."object"==typeof e?e:{}},u(Q,e,J),e}_handleSwipe(){const e=Math.abs(this.touchDeltaX);if(e<=40)return;const t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?ie:te)}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",(e=>this.pause(e))),$.on(this._element,"mouseleave.bs.carousel",(e=>this.cycle(e)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const e=e=>{!this._pointerEvent||"pen"!==e.pointerType&&e.pointerType!==ae?this._pointerEvent||(this.touchStartX=e.touches[0].clientX):this.touchStartX=e.clientX},t=e=>{this.touchDeltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this.touchStartX},i=e=>{!this._pointerEvent||"pen"!==e.pointerType&&e.pointerType!==ae||(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((e=>this.cycle(e)),500+this._config.interval))};n.find(".carousel-item img",this._element).forEach((e=>{$.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()))})),this._pointerEvent?($.on(this._element,"pointerdown.bs.carousel",(t=>e(t))),$.on(this._element,"pointerup.bs.carousel",(e=>i(e))),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.carousel",(t=>e(t))),$.on(this._element,"touchmove.bs.carousel",(e=>t(e))),$.on(this._element,"touchend.bs.carousel",(e=>i(e))))}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ne[e.key];t&&(e.preventDefault(),this._slide(t))}_getItemIndex(e){return this._items=e&&e.parentNode?n.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(e,t){const i=e===Z;return T(this._items,t,i,this._config.wrap)}_triggerSlideEvent(e,t){const i=this._getItemIndex(e),s=this._getItemIndex(n.findOne(re,this._element));return $.trigger(this._element,"slide.bs.carousel",{relatedTarget:e,direction:t,from:s,to:i})}_setActiveIndicatorElement(e){if(this._indicatorsElement){const t=n.findOne(".active",this._indicatorsElement);t.classList.remove(oe),t.removeAttribute("aria-current");const i=n.find("[data-bs-target]",this._indicatorsElement);for(let t=0;t{$.trigger(this._element,se,{relatedTarget:r,direction:u,from:o,to:a})};if(this._element.classList.contains("slide")){r.classList.add(d),_(r),s.classList.add(h),r.classList.add(h);const e=()=>{r.classList.remove(h,d),r.classList.add(oe),s.classList.remove(oe,d,h),this._isSliding=!1,setTimeout(f,0)};this._queueCallback(e,s,!0)}else s.classList.remove(oe),r.classList.add(oe),this._isSliding=!1,f();l&&this.cycle()}_directionToOrder(e){return[ie,te].includes(e)?y()?e===te?ee:Z:e===te?Z:ee:e}_orderToDirection(e){return[Z,ee].includes(e)?y()?e===ee?te:ie:e===ee?ie:te:e}static carouselInterface(e,t){const i=le.getOrCreateInstance(e,t);let{_config:n}=i;"object"==typeof t&&(n={...n,...t});const s="string"==typeof t?t:n.slide;if("number"==typeof t)i.to(t);else if("string"==typeof s){if(void 0===i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(e){return this.each((function(){le.carouselInterface(this,e)}))}static dataApiClickHandler(e){const t=l(this);if(!t||!t.classList.contains("carousel"))return;const i={...Y.getDataAttributes(t),...Y.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(i.interval=!1),le.carouselInterface(t,i),n&&le.getInstance(t).to(n),e.preventDefault()}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",le.dataApiClickHandler),$.on(window,"load.bs.carousel.data-api",(()=>{const e=n.find('[data-bs-ride="carousel"]');for(let t=0,i=e.length;te===this._element));null!==s&&o.length&&(this._selector=s,this._triggerArray.push(t))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get Default(){return de}static get NAME(){return ce}toggle(){this._element.classList.contains(fe)?this.hide():this.show()}show(){if(this._isTransitioning||this._element.classList.contains(fe))return;let e,t;this._parent&&(e=n.find(".show, .collapsing",this._parent).filter((e=>"string"==typeof this._config.parent?e.getAttribute("data-bs-parent")===this._config.parent:e.classList.contains(pe))),0===e.length&&(e=null));const i=n.findOne(this._selector);if(e){const n=e.find((e=>i!==e));if(t=n?ve.getInstance(n):null,t&&t._isTransitioning)return}if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e&&e.forEach((e=>{i!==e&&ve.collapseInterface(e,"hide"),t||W.set(e,he,null)}));const s=this._getDimension();this._element.classList.remove(pe),this._element.classList.add(me),this._element.style[s]=0,this._triggerArray.length&&this._triggerArray.forEach((e=>{e.classList.remove(ge),e.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);const o=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback((()=>{this._element.classList.remove(me),this._element.classList.add(pe,fe),this._element.style[s]="",this.setTransitioning(!1),$.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[s]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._element.classList.contains(fe))return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,_(this._element),this._element.classList.add(me),this._element.classList.remove(pe,fe);const t=this._triggerArray.length;if(t>0)for(let e=0;e{this.setTransitioning(!1),this._element.classList.remove(me),this._element.classList.add(pe),$.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}setTransitioning(e){this._isTransitioning=e}_getConfig(e){return(e={...de,...e}).toggle=Boolean(e.toggle),u(ce,e,ue),e}_getDimension(){return this._element.classList.contains(_e)?_e:"height"}_getParent(){let{parent:e}=this._config;e=d(e);const t=`${be}[data-bs-parent="${e}"]`;return n.find(t,e).forEach((e=>{const t=l(e);this._addAriaAndCollapsedClass(t,[e])})),e}_addAriaAndCollapsedClass(e,t){if(!e||!t.length)return;const i=e.classList.contains(fe);t.forEach((e=>{i?e.classList.remove(ge):e.classList.add(ge),e.setAttribute("aria-expanded",i)}))}static collapseInterface(e,t){let i=ve.getInstance(e);const n={...de,...Y.getDataAttributes(e),..."object"==typeof t&&t?t:{}};if(!i&&n.toggle&&"string"==typeof t&&/show|hide/.test(t)&&(n.toggle=!1),i||(i=new ve(e,n)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each((function(){ve.collapseInterface(this,e)}))}}$.on(document,"click.bs.collapse.data-api",be,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=Y.getDataAttributes(this),i=a(this);n.find(i).forEach((e=>{const i=ve.getInstance(e);let n;i?(null===i._parent&&"string"==typeof t.parent&&(i._config.parent=t.parent,i._parent=i._getParent()),n="toggle"):n=t,ve.collapseInterface(e,n)}))})),w(ve);const ye="dropdown",we="Escape",Ee="Space",Ae="ArrowUp",Te="ArrowDown",Oe=new RegExp("ArrowUp|ArrowDown|Escape"),Le="click.bs.dropdown.data-api",Ce="keydown.bs.dropdown.data-api",ke="show",xe='[data-bs-toggle="dropdown"]',De=".dropdown-menu",Se=y()?"top-end":"top-start",Ie=y()?"top-start":"top-end",Ne=y()?"bottom-end":"bottom-start",je=y()?"bottom-start":"bottom-end",Pe=y()?"left-start":"right-start",Me=y()?"right-start":"left-start",He={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},Be={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Re extends z{constructor(e,t){super(e),this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get Default(){return He}static get DefaultType(){return Be}static get NAME(){return ye}toggle(){if(p(this._element))return;this._element.classList.contains(ke)?this.hide():this.show()}show(){if(p(this._element)||this._menu.classList.contains(ke))return;const e=Re.getParentFromElement(this._element),t={relatedTarget:this._element};if(!$.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._inNavbar)Y.setDataAttribute(this._menu,"popper","none");else{if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=e:h(this._config.reference)?t=d(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const n=this._getPopperConfig(),s=n.modifiers.find((e=>"applyStyles"===e.name&&!1===e.enabled));this._popper=i.createPopper(t,this._menu,n),s&&Y.setDataAttribute(this._menu,"popper","static")}"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach((e=>$.on(e,"mouseover",g))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle(ke),this._element.classList.toggle(ke),$.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(p(this._element)||!this._menu.classList.contains(ke))return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_addEventListeners(){$.on(this._element,"click.bs.dropdown",(e=>{e.preventDefault(),this.toggle()}))}_completeHide(e){$.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>$.off(e,"mouseover",g))),this._popper&&this._popper.destroy(),this._menu.classList.remove(ke),this._element.classList.remove(ke),this._element.setAttribute("aria-expanded","false"),Y.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",e))}_getConfig(e){if(e={...this.constructor.Default,...Y.getDataAttributes(this._element),...e},u(ye,e,this.constructor.DefaultType),"object"==typeof e.reference&&!h(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${ye.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_getMenuElement(){return n.next(this._element,De)[0]}_getPlacement(){const e=this._element.parentNode;if(e.classList.contains("dropend"))return Pe;if(e.classList.contains("dropstart"))return Me;const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Ie:Se:t?je:Ne}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_selectMenuItem({key:e,target:t}){const i=n.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(f);i.length&&T(i,t,e===Te,!i.includes(t)).focus()}static dropdownInterface(e,t){const i=Re.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each((function(){Re.dropdownInterface(this,e)}))}static clearMenus(e){if(e&&(2===e.button||"keyup"===e.type&&"Tab"!==e.key))return;const t=n.find(xe);for(let i=0,n=t.length;ithis.matches(xe)?this:n.prev(this,xe)[0];return e.key===we?(i().focus(),void Re.clearMenus()):e.key===Ae||e.key===Te?(t||i().click(),void Re.getInstance(i())._selectMenuItem(e)):void(t&&e.key!==Ee||Re.clearMenus())}}$.on(document,Ce,xe,Re.dataApiKeydownHandler),$.on(document,Ce,De,Re.dataApiKeydownHandler),$.on(document,Le,Re.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",Re.clearMenus),$.on(document,Le,xe,(function(e){e.preventDefault(),Re.dropdownInterface(this)})),w(Re);const $e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",qe=".sticky-top";class We{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(t=>t+e)),this._setElementAttributes($e,"paddingRight",(t=>t+e)),this._setElementAttributes(qe,"marginRight",(t=>t-e))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e)[t];e.style[t]=`${i(Number.parseFloat(s))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes($e,"paddingRight"),this._resetElementAttributes(qe,"marginRight")}_saveInitialAttribute(e,t){const i=e.style[t];i&&Y.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const i=Y.getDataAttribute(e,t);void 0===i?e.style.removeProperty(t):(Y.removeDataAttribute(e,t),e.style[t]=i)}))}_applyManipulationCallback(e,t){h(e)?t(e):n.find(e,this._element).forEach(t)}isOverflowing(){return this.getWidth()>0}}const ze={isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Fe={isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Ue="backdrop",Ve="show",Ke="mousedown.bs.backdrop";class Xe{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){this._config.isVisible?(this._append(),this._config.isAnimated&&_(this._getElement()),this._getElement().classList.add(Ve),this._emulateAnimation((()=>{E(e)}))):E(e)}hide(e){this._config.isVisible?(this._getElement().classList.remove(Ve),this._emulateAnimation((()=>{this.dispose(),E(e)}))):E(e)}_getElement(){if(!this._element){const e=document.createElement("div");e.className="modal-backdrop",this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_getConfig(e){return(e={...ze,..."object"==typeof e?e:{}}).rootElement=d(e.rootElement),u(Ue,e,Fe),e}_append(){this._isAppended||(this._config.rootElement.appendChild(this._getElement()),$.on(this._getElement(),Ke,(()=>{E(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&($.off(this._element,Ke),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){A(e,this._getElement(),this._config.isAnimated)}}const Ye="modal",Qe=".bs.modal",Ge="Escape",Je={backdrop:!0,keyboard:!0,focus:!0},Ze={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},et="hidden.bs.modal",tt="show.bs.modal",it="focusin.bs.modal",nt="resize.bs.modal",st="click.dismiss.bs.modal",ot="keydown.dismiss.bs.modal",rt="mousedown.dismiss.bs.modal",at="modal-open",lt="show",ct="modal-static";class ht extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._dialog=n.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new We}static get Default(){return Je}static get NAME(){return Ye}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;$.trigger(this._element,tt,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(at),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),$.on(this._element,st,'[data-bs-dismiss="modal"]',(e=>this.hide(e))),$.on(this._dialog,rt,(()=>{$.one(this._element,"mouseup.dismiss.bs.modal",(e=>{e.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(e))))}hide(e){if(e&&["A","AREA"].includes(e.target.tagName)&&e.preventDefault(),!this._isShown||this._isTransitioning)return;if($.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$.off(document,it),this._element.classList.remove(lt),$.off(this._element,st),$.off(this._dialog,rt),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((e=>$.off(e,Qe))),this._backdrop.dispose(),super.dispose(),$.off(document,it)}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Xe({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_getConfig(e){return e={...Je,...Y.getDataAttributes(this._element),..."object"==typeof e?e:{}},u(Ye,e,Ze),e}_showElement(e){const t=this._isAnimated(),i=n.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),t&&_(this._element),this._element.classList.add(lt),this._config.focus&&this._enforceFocus();this._queueCallback((()=>{this._config.focus&&this._element.focus(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,t)}_enforceFocus(){$.off(document,it),$.on(document,it,(e=>{document===e.target||this._element===e.target||this._element.contains(e.target)||this._element.focus()}))}_setEscapeEvent(){this._isShown?$.on(this._element,ot,(e=>{this._config.keyboard&&e.key===Ge?(e.preventDefault(),this.hide()):this._config.keyboard||e.key!==Ge||this._triggerBackdropTransition()})):$.off(this._element,ot)}_setResizeEvent(){this._isShown?$.on(window,nt,(()=>this._adjustDialog())):$.off(window,nt)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(at),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,et)}))}_showBackdrop(e){$.on(this._element,st,(e=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:e.target===e.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(e)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:e,scrollHeight:t,style:i}=this._element,n=t>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||e.contains(ct)||(n||(i.overflowY="hidden"),e.add(ct),this._queueCallback((()=>{e.remove(ct),n||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;(!i&&e&&!y()||i&&!e&&y())&&(this._element.style.paddingLeft=`${t}px`),(i&&!e&&!y()||!i&&e&&y())&&(this._element.style.paddingRight=`${t}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const i=ht.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=l(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),$.one(t,tt,(e=>{e.defaultPrevented||$.one(t,et,(()=>{f(this)&&this.focus()}))}));ht.getOrCreateInstance(t).toggle(this)})),w(ht);const dt="offcanvas",ut={backdrop:!0,keyboard:!0,scroll:!1},ft={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},pt="show",mt=".offcanvas.show",gt="hidden.bs.offcanvas",_t="focusin.bs.offcanvas";class bt extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get NAME(){return dt}static get Default(){return ut}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if($.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||((new We).hide(),this._enforceFocusOnElement(this._element)),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(pt);this._queueCallback((()=>{$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;$.off(document,_t),this._element.blur(),this._isShown=!1,this._element.classList.remove(pt),this._backdrop.hide();this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new We).reset(),$.trigger(this._element,gt)}),this._element,!0)}dispose(){this._backdrop.dispose(),super.dispose(),$.off(document,_t)}_getConfig(e){return e={...ut,...Y.getDataAttributes(this._element),..."object"==typeof e?e:{}},u(dt,e,ft),e}_initializeBackDrop(){return new Xe({isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_enforceFocusOnElement(e){$.off(document,_t),$.on(document,_t,(t=>{document===t.target||e===t.target||e.contains(t.target)||e.focus()})),e.focus()}_addEventListeners(){$.on(this._element,"click.dismiss.bs.offcanvas",'[data-bs-dismiss="offcanvas"]',(()=>this.hide())),$.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{this._config.keyboard&&"Escape"===e.key&&this.hide()}))}static jQueryInterface(e){return this.each((function(){const t=bt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=l(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),p(this))return;$.one(t,gt,(()=>{f(this)&&this.focus()}));const i=n.findOne(mt);i&&i!==t&&bt.getInstance(i).hide();bt.getOrCreateInstance(t).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",(()=>n.find(mt).forEach((e=>bt.getOrCreateInstance(e).show())))),w(bt);const vt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),yt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,wt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Et=(e,t)=>{const i=e.nodeName.toLowerCase();if(t.includes(i))return!vt.has(i)||Boolean(yt.test(e.nodeValue)||wt.test(e.nodeValue));const n=t.filter((e=>e instanceof RegExp));for(let e=0,t=n.length;e{Et(e,a)||i.removeAttribute(e.nodeName)}))}return n.body.innerHTML}const Ot="tooltip",Lt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Ct=new Set(["sanitize","allowList","sanitizeFn"]),kt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},xt={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},Dt={animation:!0,template:'

    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:At,popperConfig:null},St={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},It="fade",Nt="show",jt="show",Pt="out",Mt="hover",Ht="focus";class Bt extends z{constructor(e,t){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(t),this.tip=null,this._setListeners()}static get Default(){return Dt}static get NAME(){return Ot}static get Event(){return St}static get DefaultType(){return kt}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(this._isEnabled)if(e){const t=this._initializeOnDelegatedTarget(e);t._activeTrigger.click=!t._activeTrigger.click,t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(this.getTipElement().classList.contains(Nt))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.remove(),this._popper&&this._popper.destroy(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const e=$.trigger(this._element,this.constructor.Event.SHOW),t=m(this._element),n=null===t?this._element.ownerDocument.documentElement.contains(this._element):t.contains(this._element);if(e.defaultPrevented||!n)return;const s=this.getTipElement(),r=o(this.constructor.NAME);s.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this.setContent(),this._config.animation&&s.classList.add(It);const a="function"==typeof this._config.placement?this._config.placement.call(this,s,this._element):this._config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);const{container:c}=this._config;W.set(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(c.appendChild(s),$.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=i.createPopper(this._element,s,this._getPopperConfig(l)),s.classList.add(Nt);const h="function"==typeof this._config.customClass?this._config.customClass():this._config.customClass;h&&s.classList.add(...h.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>{$.on(e,"mouseover",g)}));const d=this.tip.classList.contains(It);this._queueCallback((()=>{const e=this._hoverState;this._hoverState=null,$.trigger(this._element,this.constructor.Event.SHOWN),e===Pt&&this._leave(null,this)}),this.tip,d)}hide(){if(!this._popper)return;const e=this.getTipElement();if($.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(Nt),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>$.off(e,"mouseover",g))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const t=this.tip.classList.contains(It);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==jt&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))}),this.tip,t),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const e=document.createElement("div");return e.innerHTML=this._config.template,this.tip=e.children[0],this.tip}setContent(){const e=this.getTipElement();this.setElementContent(n.findOne(".tooltip-inner",e),this.getTitle()),e.classList.remove(It,Nt)}setElementContent(e,t){if(null!==e)return h(t)?(t=d(t),void(this._config.html?t.parentNode!==e&&(e.innerHTML="",e.appendChild(t)):e.textContent=t.textContent)):void(this._config.html?(this._config.sanitize&&(t=Tt(t,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=t):e.textContent=t)}getTitle(){let e=this._element.getAttribute("data-bs-original-title");return e||(e="function"==typeof this._config.title?this._config.title.call(this._element):this._config.title),e}updateAttachment(e){return"right"===e?"end":"left"===e?"start":e}_initializeOnDelegatedTarget(e,t){const i=this.constructor.DATA_KEY;return(t=t||W.get(e.delegateTarget,i))||(t=new this.constructor(e.delegateTarget,this._getDelegateConfig()),W.set(e.delegateTarget,i,t)),t}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:e=>this._handlePopperPlacementChange(e)}],onFirstUpdate:e=>{e.options.placement!==e.placement&&this._handlePopperPlacementChange(e)}};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_addAttachmentClass(e){this.getTipElement().classList.add(`bs-tooltip-${this.updateAttachment(e)}`)}_getAttachment(e){return xt[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((e=>{if("click"===e)$.on(this._element,this.constructor.Event.CLICK,this._config.selector,(e=>this.toggle(e)));else if("manual"!==e){const t=e===Mt?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=e===Mt?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;$.on(this._element,t,this._config.selector,(e=>this._enter(e))),$.on(this._element,i,this._config.selector,(e=>this._leave(e)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const e=this._element.getAttribute("title"),t=typeof this._element.getAttribute("data-bs-original-title");(e||"string"!==t)&&(this._element.setAttribute("data-bs-original-title",e||""),!e||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusin"===e.type?Ht:Mt]=!0),t.getTipElement().classList.contains(Nt)||t._hoverState===jt?t._hoverState=jt:(clearTimeout(t._timeout),t._hoverState=jt,t._config.delay&&t._config.delay.show?t._timeout=setTimeout((()=>{t._hoverState===jt&&t.show()}),t._config.delay.show):t.show())}_leave(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusout"===e.type?Ht:Mt]=t._element.contains(e.relatedTarget)),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=Pt,t._config.delay&&t._config.delay.hide?t._timeout=setTimeout((()=>{t._hoverState===Pt&&t.hide()}),t._config.delay.hide):t.hide())}_isWithActiveTrigger(){for(const e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){const t=Y.getDataAttributes(this._element);return Object.keys(t).forEach((e=>{Ct.has(e)&&delete t[e]})),(e={...this.constructor.Default,...t,..."object"==typeof e&&e?e:{}}).container=!1===e.container?document.body:d(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),u(Ot,e,this.constructor.DefaultType),e.sanitize&&(e.template=Tt(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){const e={};if(this._config)for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e}_cleanTipClass(){const e=this.getTipElement(),t=e.getAttribute("class").match(Lt);null!==t&&t.length>0&&t.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}_handlePopperPlacementChange(e){const{state:t}=e;t&&(this.tip=t.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement)))}static jQueryInterface(e){return this.each((function(){const t=Bt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}w(Bt);const Rt=new RegExp("(^|\\s)bs-popover\\S+","g"),$t={...Bt.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},qt={...Bt.DefaultType,content:"(string|element|function)"},Wt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},zt=".popover-header",Ft=".popover-body";class Ut extends Bt{static get Default(){return $t}static get NAME(){return"popover"}static get Event(){return Wt}static get DefaultType(){return qt}isWithContent(){return this.getTitle()||this._getContent()}getTipElement(){return this.tip||(this.tip=super.getTipElement(),this.getTitle()||n.findOne(zt,this.tip).remove(),this._getContent()||n.findOne(Ft,this.tip).remove()),this.tip}setContent(){const e=this.getTipElement();this.setElementContent(n.findOne(zt,e),this.getTitle());let t=this._getContent();"function"==typeof t&&(t=t.call(this._element)),this.setElementContent(n.findOne(Ft,e),t),e.classList.remove("fade","show")}_addAttachmentClass(e){this.getTipElement().classList.add(`bs-popover-${this.updateAttachment(e)}`)}_getContent(){return this._element.getAttribute("data-bs-content")||this._config.content}_cleanTipClass(){const e=this.getTipElement(),t=e.getAttribute("class").match(Rt);null!==t&&t.length>0&&t.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}static jQueryInterface(e){return this.each((function(){const t=Ut.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}w(Ut);const Vt="scrollspy",Kt=".bs.scrollspy",Xt={offset:10,method:"auto",target:""},Yt={offset:"number",method:"string",target:"(string|element)"},Qt="dropdown-item",Gt="active",Jt=".nav-link",Zt="position";class ei extends z{constructor(e,t){super(e),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(t),this._selector=`${this._config.target} .nav-link, ${this._config.target} .list-group-item, ${this._config.target} .dropdown-item`,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,$.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return Xt}static get NAME(){return Vt}refresh(){const e=this._scrollElement===this._scrollElement.window?"offset":Zt,t="auto"===this._config.method?e:this._config.method,i=t===Zt?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();n.find(this._selector).map((e=>{const s=a(e),o=s?n.findOne(s):null;if(o){const e=o.getBoundingClientRect();if(e.width||e.height)return[Y[t](o).top+i,s]}return null})).filter((e=>e)).sort(((e,t)=>e[0]-t[0])).forEach((e=>{this._offsets.push(e[0]),this._targets.push(e[1])}))}dispose(){$.off(this._scrollElement,Kt),super.dispose()}_getConfig(e){if("string"!=typeof(e={...Xt,...Y.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}}).target&&h(e.target)){let{id:t}=e.target;t||(t=o(Vt),e.target.id=t),e.target=`#${t}`}return u(Vt,e,Yt),e}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){const e=this._targets[this._targets.length-1];this._activeTarget!==e&&this._activate(e)}else{if(this._activeTarget&&e0)return this._activeTarget=null,void this._clear();for(let t=this._offsets.length;t--;){this._activeTarget!==this._targets[t]&&e>=this._offsets[t]&&(void 0===this._offsets[t+1]||e`${t}[data-bs-target="${e}"],${t}[href="${e}"]`)),i=n.findOne(t.join(","));i.classList.contains(Qt)?(n.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Gt),i.classList.add(Gt)):(i.classList.add(Gt),n.parents(i,".nav, .list-group").forEach((e=>{n.prev(e,".nav-link, .list-group-item").forEach((e=>e.classList.add(Gt))),n.prev(e,".nav-item").forEach((e=>{n.children(e,Jt).forEach((e=>e.classList.add(Gt)))}))}))),$.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:e})}_clear(){n.find(this._selector).filter((e=>e.classList.contains(Gt))).forEach((e=>e.classList.remove(Gt)))}static jQueryInterface(e){return this.each((function(){const t=ei.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{n.find('[data-bs-spy="scroll"]').forEach((e=>new ei(e)))})),w(ei);const ti="active",ii="fade",ni="show",si=".active",oi=":scope > li > .active";class ri extends z{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(ti))return;let e;const t=l(this._element),i=this._element.closest(".nav, .list-group");if(i){const t="UL"===i.nodeName||"OL"===i.nodeName?oi:si;e=n.find(t,i),e=e[e.length-1]}const s=e?$.trigger(e,"hide.bs.tab",{relatedTarget:this._element}):null;if($.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,i);const o=()=>{$.trigger(e,"hidden.bs.tab",{relatedTarget:this._element}),$.trigger(this._element,"shown.bs.tab",{relatedTarget:e})};t?this._activate(t,t.parentNode,o):o()}_activate(e,t,i){const s=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?n.children(t,si):n.find(oi,t))[0],o=i&&s&&s.classList.contains(ii),r=()=>this._transitionComplete(e,s,i);s&&o?(s.classList.remove(ni),this._queueCallback(r,e,!0)):r()}_transitionComplete(e,t,i){if(t){t.classList.remove(ti);const e=n.findOne(":scope > .dropdown-menu .active",t.parentNode);e&&e.classList.remove(ti),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}e.classList.add(ti),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),_(e),e.classList.contains(ii)&&e.classList.add(ni);let s=e.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&s.classList.contains("dropdown-menu")){const t=e.closest(".dropdown");t&&n.find(".dropdown-toggle",t).forEach((e=>e.classList.add(ti))),e.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(e){return this.each((function(){const t=ri.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}$.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),p(this))return;ri.getOrCreateInstance(this).show()})),w(ri);const ai="toast",li="hide",ci="show",hi="showing",di={animation:"boolean",autohide:"boolean",delay:"number"},ui={animation:!0,autohide:!0,delay:5e3};class fi extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return di}static get Default(){return ui}static get NAME(){return ai}show(){if($.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(li),_(this._element),this._element.classList.add(hi),this._queueCallback((()=>{this._element.classList.remove(hi),this._element.classList.add(ci),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ci))return;if($.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.remove(ci),this._queueCallback((()=>{this._element.classList.add(li),$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ci)&&this._element.classList.remove(ci),super.dispose()}_getConfig(e){return e={...ui,...Y.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}},u(ai,e,this.constructor.DefaultType),e}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',(()=>this.hide())),$.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),$.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),$.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),$.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=fi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return w(fi),{Alert:F,Button:V,Carousel:le,Collapse:ve,Dropdown:Re,Modal:ht,Offcanvas:bt,Popover:Ut,ScrollSpy:ei,Tab:ri,Toast:fi,Tooltip:Bt}})); \ No newline at end of file +function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap=t(e.Popper)}(this,(function(e){"use strict";function t(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var i=t(e);const n={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let n=e.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&i.push(n),n=n.parentNode;return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]}},s="transitionend",o=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},r=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t},a=e=>{const t=r(e);return t&&document.querySelector(t)?t:null},l=e=>{const t=r(e);return t?document.querySelector(t):null},c=e=>{e.dispatchEvent(new Event(s))},h=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),d=e=>h(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?n.findOne(e):null,u=(e,t,i)=>{Object.keys(i).forEach((n=>{const s=i[n],o=t[n],r=o&&h(o)?"element":null==(a=o)?`${a}`:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(s).test(r))throw new TypeError(`${e.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}))},f=e=>!(!h(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),p=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),m=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?m(e.parentNode):null},g=()=>{},_=e=>e.offsetHeight,b=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},v=[],y=()=>"rtl"===document.documentElement.dir,w=e=>{var t;t=()=>{const t=b();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(v.length||document.addEventListener("DOMContentLoaded",(()=>{v.forEach((e=>e()))})),v.push(t)):t()},E=e=>{"function"==typeof e&&e()},T=(e,t,i=!0)=>{if(!i)return void E(e);const n=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),s=Number.parseFloat(i);return n||s?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let o=!1;const r=({target:i})=>{i===t&&(o=!0,t.removeEventListener(s,r),E(e))};t.addEventListener(s,r),setTimeout((()=>{o||c(t)}),n)},A=(e,t,i,n)=>{let s=e.indexOf(t);if(-1===s)return e[!i&&n?e.length-1:0];const o=e.length;return s+=i?1:-1,n&&(s=(s+o)%o),e[Math.max(0,Math.min(s,o-1))]},O=/[^.]*(?=\..*)\.|.*/,L=/\..*/,k=/::\d+$/,C={};let x=1;const D={mouseenter:"mouseover",mouseleave:"mouseout"},S=/^(mouseenter|mouseleave)/i,I=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(e,t){return t&&`${t}::${x++}`||e.uidEvent||x++}function j(e){const t=N(e);return e.uidEvent=t,C[t]=C[t]||{},C[t]}function P(e,t,i=null){const n=Object.keys(e);for(let s=0,o=n.length;sfunction(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};n?n=e(n):i=e(i)}const[o,r,a]=M(t,i,n),l=j(e),c=l[a]||(l[a]={}),h=P(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=N(r,t.replace(O,"")),u=o?function(e,t,i){return function n(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&$.off(e,s.type,t,i),i.apply(r,[s]);return null}}(e,i,n):function(e,t){return function i(n){return n.delegateTarget=e,i.oneOff&&$.off(e,n.type,t),t.apply(e,[n])}}(e,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=d,c[d]=u,e.addEventListener(a,u,o)}function B(e,t,i,n,s){const o=P(t[i],n,s);o&&(e.removeEventListener(i,o,Boolean(s)),delete t[i][o.uidEvent])}function R(e){return e=e.replace(L,""),D[e]||e}const $={on(e,t,i,n){H(e,t,i,n,!1)},one(e,t,i,n){H(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,o,r]=M(t,i,n),a=r!==t,l=j(e),c=t.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void B(e,l,r,o,s?i:null)}c&&Object.keys(l).forEach((i=>{!function(e,t,i,n){const s=t[i]||{};Object.keys(s).forEach((o=>{if(o.includes(n)){const n=s[o];B(e,t,i,n.originalHandler,n.delegationSelector)}}))}(e,l,i,t.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((i=>{const n=i.replace(k,"");if(!a||t.includes(n)){const t=h[i];B(e,l,r,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=b(),s=R(t),o=t!==s,r=I.has(s);let a,l=!0,c=!0,h=!1,d=null;return o&&n&&(a=n.Event(t,i),n(e).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(s,l,!0)):d=new CustomEvent(t,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((e=>{Object.defineProperty(d,e,{get:()=>i[e]})})),h&&d.preventDefault(),c&&e.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},q=new Map;var W={set(e,t,i){q.has(e)||q.set(e,new Map);const n=q.get(e);n.has(t)||0===n.size?n.set(t,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(e,t)=>q.has(e)&&q.get(e).get(t)||null,remove(e,t){if(!q.has(e))return;const i=q.get(e);i.delete(t),0===i.size&&q.delete(e)}};class z{constructor(e){(e=d(e))&&(this._element=e,W.set(this._element,this.constructor.DATA_KEY,this))}dispose(){W.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,i=!0){T(e,t,i)}static getInstance(e){return W.get(e,this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.0.2"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}class F extends z{static get NAME(){return"alert"}close(e){const t=e?this._getRootElement(e):this._element,i=this._triggerCloseEvent(t);null===i||i.defaultPrevented||this._removeElement(t)}_getRootElement(e){return l(e)||e.closest(".alert")}_triggerCloseEvent(e){return $.trigger(e,"close.bs.alert")}_removeElement(e){e.classList.remove("show");const t=e.classList.contains("fade");this._queueCallback((()=>this._destroyElement(e)),e,t)}_destroyElement(e){e.remove(),$.trigger(e,"closed.bs.alert")}static jQueryInterface(e){return this.each((function(){const t=F.getOrCreateInstance(this);"close"===e&&t[e](this)}))}static handleDismiss(e){return function(t){t&&t.preventDefault(),e.close(this)}}}$.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',F.handleDismiss(new F)),w(F);const U='[data-bs-toggle="button"]';class V extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=V.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}function K(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function X(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}$.on(document,"click.bs.button.data-api",U,(e=>{e.preventDefault();const t=e.target.closest(U);V.getOrCreateInstance(t).toggle()})),w(V);const Y={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${X(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${X(t)}`)},getDataAttributes(e){if(!e)return{};const t={};return Object.keys(e.dataset).filter((e=>e.startsWith("bs"))).forEach((i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=K(e.dataset[i])})),t},getDataAttribute:(e,t)=>K(e.getAttribute(`data-bs-${X(t)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},position:e=>({top:e.offsetTop,left:e.offsetLeft})},Q="carousel",G={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},J={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Z="next",ee="prev",te="left",ie="right",ne={ArrowLeft:ie,ArrowRight:te},se="slid.bs.carousel",oe="active",re=".active.carousel-item",ae="touch";class le extends z{constructor(e,t){super(e),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._indicatorsElement=n.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return G}static get NAME(){return Q}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&f(this._element)&&this.next()}prev(){this._slide(ee)}pause(e){e||(this._isPaused=!0),n.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=n.findOne(re,this._element);const t=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding)return void $.one(this._element,se,(()=>this.to(e)));if(t===e)return this.pause(),void this.cycle();const i=e>t?Z:ee;this._slide(i,this._items[e])}_getConfig(e){return e={...G,...Y.getDataAttributes(this._element),..."object"==typeof e?e:{}},u(Q,e,J),e}_handleSwipe(){const e=Math.abs(this.touchDeltaX);if(e<=40)return;const t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?ie:te)}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",(e=>this.pause(e))),$.on(this._element,"mouseleave.bs.carousel",(e=>this.cycle(e)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const e=e=>{!this._pointerEvent||"pen"!==e.pointerType&&e.pointerType!==ae?this._pointerEvent||(this.touchStartX=e.touches[0].clientX):this.touchStartX=e.clientX},t=e=>{this.touchDeltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this.touchStartX},i=e=>{!this._pointerEvent||"pen"!==e.pointerType&&e.pointerType!==ae||(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((e=>this.cycle(e)),500+this._config.interval))};n.find(".carousel-item img",this._element).forEach((e=>{$.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()))})),this._pointerEvent?($.on(this._element,"pointerdown.bs.carousel",(t=>e(t))),$.on(this._element,"pointerup.bs.carousel",(e=>i(e))),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.carousel",(t=>e(t))),$.on(this._element,"touchmove.bs.carousel",(e=>t(e))),$.on(this._element,"touchend.bs.carousel",(e=>i(e))))}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ne[e.key];t&&(e.preventDefault(),this._slide(t))}_getItemIndex(e){return this._items=e&&e.parentNode?n.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(e,t){const i=e===Z;return A(this._items,t,i,this._config.wrap)}_triggerSlideEvent(e,t){const i=this._getItemIndex(e),s=this._getItemIndex(n.findOne(re,this._element));return $.trigger(this._element,"slide.bs.carousel",{relatedTarget:e,direction:t,from:s,to:i})}_setActiveIndicatorElement(e){if(this._indicatorsElement){const t=n.findOne(".active",this._indicatorsElement);t.classList.remove(oe),t.removeAttribute("aria-current");const i=n.find("[data-bs-target]",this._indicatorsElement);for(let t=0;t{$.trigger(this._element,se,{relatedTarget:r,direction:u,from:o,to:a})};if(this._element.classList.contains("slide")){r.classList.add(d),_(r),s.classList.add(h),r.classList.add(h);const e=()=>{r.classList.remove(h,d),r.classList.add(oe),s.classList.remove(oe,d,h),this._isSliding=!1,setTimeout(f,0)};this._queueCallback(e,s,!0)}else s.classList.remove(oe),r.classList.add(oe),this._isSliding=!1,f();l&&this.cycle()}_directionToOrder(e){return[ie,te].includes(e)?y()?e===te?ee:Z:e===te?Z:ee:e}_orderToDirection(e){return[Z,ee].includes(e)?y()?e===ee?te:ie:e===ee?ie:te:e}static carouselInterface(e,t){const i=le.getOrCreateInstance(e,t);let{_config:n}=i;"object"==typeof t&&(n={...n,...t});const s="string"==typeof t?t:n.slide;if("number"==typeof t)i.to(t);else if("string"==typeof s){if(void 0===i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(e){return this.each((function(){le.carouselInterface(this,e)}))}static dataApiClickHandler(e){const t=l(this);if(!t||!t.classList.contains("carousel"))return;const i={...Y.getDataAttributes(t),...Y.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(i.interval=!1),le.carouselInterface(t,i),n&&le.getInstance(t).to(n),e.preventDefault()}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",le.dataApiClickHandler),$.on(window,"load.bs.carousel.data-api",(()=>{const e=n.find('[data-bs-ride="carousel"]');for(let t=0,i=e.length;te===this._element));null!==s&&o.length&&(this._selector=s,this._triggerArray.push(t))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get Default(){return de}static get NAME(){return ce}toggle(){this._element.classList.contains(fe)?this.hide():this.show()}show(){if(this._isTransitioning||this._element.classList.contains(fe))return;let e,t;this._parent&&(e=n.find(".show, .collapsing",this._parent).filter((e=>"string"==typeof this._config.parent?e.getAttribute("data-bs-parent")===this._config.parent:e.classList.contains(pe))),0===e.length&&(e=null));const i=n.findOne(this._selector);if(e){const n=e.find((e=>i!==e));if(t=n?ve.getInstance(n):null,t&&t._isTransitioning)return}if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e&&e.forEach((e=>{i!==e&&ve.collapseInterface(e,"hide"),t||W.set(e,he,null)}));const s=this._getDimension();this._element.classList.remove(pe),this._element.classList.add(me),this._element.style[s]=0,this._triggerArray.length&&this._triggerArray.forEach((e=>{e.classList.remove(ge),e.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);const o=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback((()=>{this._element.classList.remove(me),this._element.classList.add(pe,fe),this._element.style[s]="",this.setTransitioning(!1),$.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[s]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._element.classList.contains(fe))return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,_(this._element),this._element.classList.add(me),this._element.classList.remove(pe,fe);const t=this._triggerArray.length;if(t>0)for(let e=0;e{this.setTransitioning(!1),this._element.classList.remove(me),this._element.classList.add(pe),$.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}setTransitioning(e){this._isTransitioning=e}_getConfig(e){return(e={...de,...e}).toggle=Boolean(e.toggle),u(ce,e,ue),e}_getDimension(){return this._element.classList.contains(_e)?_e:"height"}_getParent(){let{parent:e}=this._config;e=d(e);const t=`${be}[data-bs-parent="${e}"]`;return n.find(t,e).forEach((e=>{const t=l(e);this._addAriaAndCollapsedClass(t,[e])})),e}_addAriaAndCollapsedClass(e,t){if(!e||!t.length)return;const i=e.classList.contains(fe);t.forEach((e=>{i?e.classList.remove(ge):e.classList.add(ge),e.setAttribute("aria-expanded",i)}))}static collapseInterface(e,t){let i=ve.getInstance(e);const n={...de,...Y.getDataAttributes(e),..."object"==typeof t&&t?t:{}};if(!i&&n.toggle&&"string"==typeof t&&/show|hide/.test(t)&&(n.toggle=!1),i||(i=new ve(e,n)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each((function(){ve.collapseInterface(this,e)}))}}$.on(document,"click.bs.collapse.data-api",be,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=Y.getDataAttributes(this),i=a(this);n.find(i).forEach((e=>{const i=ve.getInstance(e);let n;i?(null===i._parent&&"string"==typeof t.parent&&(i._config.parent=t.parent,i._parent=i._getParent()),n="toggle"):n=t,ve.collapseInterface(e,n)}))})),w(ve);const ye="dropdown",we="Escape",Ee="Space",Te="ArrowUp",Ae="ArrowDown",Oe=new RegExp("ArrowUp|ArrowDown|Escape"),Le="click.bs.dropdown.data-api",ke="keydown.bs.dropdown.data-api",Ce="show",xe='[data-bs-toggle="dropdown"]',De=".dropdown-menu",Se=y()?"top-end":"top-start",Ie=y()?"top-start":"top-end",Ne=y()?"bottom-end":"bottom-start",je=y()?"bottom-start":"bottom-end",Pe=y()?"left-start":"right-start",Me=y()?"right-start":"left-start",He={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},Be={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Re extends z{constructor(e,t){super(e),this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get Default(){return He}static get DefaultType(){return Be}static get NAME(){return ye}toggle(){if(p(this._element))return;this._element.classList.contains(Ce)?this.hide():this.show()}show(){if(p(this._element)||this._menu.classList.contains(Ce))return;const e=Re.getParentFromElement(this._element),t={relatedTarget:this._element};if(!$.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._inNavbar)Y.setDataAttribute(this._menu,"popper","none");else{if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=e:h(this._config.reference)?t=d(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const n=this._getPopperConfig(),s=n.modifiers.find((e=>"applyStyles"===e.name&&!1===e.enabled));this._popper=i.createPopper(t,this._menu,n),s&&Y.setDataAttribute(this._menu,"popper","static")}"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach((e=>$.on(e,"mouseover",g))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle(Ce),this._element.classList.toggle(Ce),$.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(p(this._element)||!this._menu.classList.contains(Ce))return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_addEventListeners(){$.on(this._element,"click.bs.dropdown",(e=>{e.preventDefault(),this.toggle()}))}_completeHide(e){$.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>$.off(e,"mouseover",g))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Ce),this._element.classList.remove(Ce),this._element.setAttribute("aria-expanded","false"),Y.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",e))}_getConfig(e){if(e={...this.constructor.Default,...Y.getDataAttributes(this._element),...e},u(ye,e,this.constructor.DefaultType),"object"==typeof e.reference&&!h(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${ye.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_getMenuElement(){return n.next(this._element,De)[0]}_getPlacement(){const e=this._element.parentNode;if(e.classList.contains("dropend"))return Pe;if(e.classList.contains("dropstart"))return Me;const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Ie:Se:t?je:Ne}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_selectMenuItem({key:e,target:t}){const i=n.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(f);i.length&&A(i,t,e===Ae,!i.includes(t)).focus()}static dropdownInterface(e,t){const i=Re.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each((function(){Re.dropdownInterface(this,e)}))}static clearMenus(e){if(e&&(2===e.button||"keyup"===e.type&&"Tab"!==e.key))return;const t=n.find(xe);for(let i=0,n=t.length;ithis.matches(xe)?this:n.prev(this,xe)[0];return e.key===we?(i().focus(),void Re.clearMenus()):e.key===Te||e.key===Ae?(t||i().click(),void Re.getInstance(i())._selectMenuItem(e)):void(t&&e.key!==Ee||Re.clearMenus())}}$.on(document,ke,xe,Re.dataApiKeydownHandler),$.on(document,ke,De,Re.dataApiKeydownHandler),$.on(document,Le,Re.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",Re.clearMenus),$.on(document,Le,xe,(function(e){e.preventDefault(),Re.dropdownInterface(this)})),w(Re);const $e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",qe=".sticky-top";class We{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(t=>t+e)),this._setElementAttributes($e,"paddingRight",(t=>t+e)),this._setElementAttributes(qe,"marginRight",(t=>t-e))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e)[t];e.style[t]=`${i(Number.parseFloat(s))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes($e,"paddingRight"),this._resetElementAttributes(qe,"marginRight")}_saveInitialAttribute(e,t){const i=e.style[t];i&&Y.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const i=Y.getDataAttribute(e,t);void 0===i?e.style.removeProperty(t):(Y.removeDataAttribute(e,t),e.style[t]=i)}))}_applyManipulationCallback(e,t){h(e)?t(e):n.find(e,this._element).forEach(t)}isOverflowing(){return this.getWidth()>0}}const ze={isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Fe={isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Ue="backdrop",Ve="show",Ke="mousedown.bs.backdrop";class Xe{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){this._config.isVisible?(this._append(),this._config.isAnimated&&_(this._getElement()),this._getElement().classList.add(Ve),this._emulateAnimation((()=>{E(e)}))):E(e)}hide(e){this._config.isVisible?(this._getElement().classList.remove(Ve),this._emulateAnimation((()=>{this.dispose(),E(e)}))):E(e)}_getElement(){if(!this._element){const e=document.createElement("div");e.className="modal-backdrop",this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_getConfig(e){return(e={...ze,..."object"==typeof e?e:{}}).rootElement=d(e.rootElement),u(Ue,e,Fe),e}_append(){this._isAppended||(this._config.rootElement.appendChild(this._getElement()),$.on(this._getElement(),Ke,(()=>{E(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&($.off(this._element,Ke),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){T(e,this._getElement(),this._config.isAnimated)}}const Ye="modal",Qe=".bs.modal",Ge="Escape",Je={backdrop:!0,keyboard:!0,focus:!0},Ze={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},et="hidden.bs.modal",tt="show.bs.modal",it="focusin.bs.modal",nt="resize.bs.modal",st="click.dismiss.bs.modal",ot="keydown.dismiss.bs.modal",rt="mousedown.dismiss.bs.modal",at="modal-open",lt="show",ct="modal-static";class ht extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._dialog=n.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new We}static get Default(){return Je}static get NAME(){return Ye}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;$.trigger(this._element,tt,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(at),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),$.on(this._element,st,'[data-bs-dismiss="modal"]',(e=>this.hide(e))),$.on(this._dialog,rt,(()=>{$.one(this._element,"mouseup.dismiss.bs.modal",(e=>{e.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(e))))}hide(e){if(e&&["A","AREA"].includes(e.target.tagName)&&e.preventDefault(),!this._isShown||this._isTransitioning)return;if($.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$.off(document,it),this._element.classList.remove(lt),$.off(this._element,st),$.off(this._dialog,rt),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((e=>$.off(e,Qe))),this._backdrop.dispose(),super.dispose(),$.off(document,it)}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Xe({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_getConfig(e){return e={...Je,...Y.getDataAttributes(this._element),..."object"==typeof e?e:{}},u(Ye,e,Ze),e}_showElement(e){const t=this._isAnimated(),i=n.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),t&&_(this._element),this._element.classList.add(lt),this._config.focus&&this._enforceFocus();this._queueCallback((()=>{this._config.focus&&this._element.focus(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,t)}_enforceFocus(){$.off(document,it),$.on(document,it,(e=>{document===e.target||this._element===e.target||this._element.contains(e.target)||this._element.focus()}))}_setEscapeEvent(){this._isShown?$.on(this._element,ot,(e=>{this._config.keyboard&&e.key===Ge?(e.preventDefault(),this.hide()):this._config.keyboard||e.key!==Ge||this._triggerBackdropTransition()})):$.off(this._element,ot)}_setResizeEvent(){this._isShown?$.on(window,nt,(()=>this._adjustDialog())):$.off(window,nt)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(at),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,et)}))}_showBackdrop(e){$.on(this._element,st,(e=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:e.target===e.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(e)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:e,scrollHeight:t,style:i}=this._element,n=t>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||e.contains(ct)||(n||(i.overflowY="hidden"),e.add(ct),this._queueCallback((()=>{e.remove(ct),n||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;(!i&&e&&!y()||i&&!e&&y())&&(this._element.style.paddingLeft=`${t}px`),(i&&!e&&!y()||!i&&e&&y())&&(this._element.style.paddingRight=`${t}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const i=ht.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=l(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),$.one(t,tt,(e=>{e.defaultPrevented||$.one(t,et,(()=>{f(this)&&this.focus()}))}));ht.getOrCreateInstance(t).toggle(this)})),w(ht);const dt="offcanvas",ut={backdrop:!0,keyboard:!0,scroll:!1},ft={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},pt="show",mt=".offcanvas.show",gt="hidden.bs.offcanvas",_t="focusin.bs.offcanvas";class bt extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get NAME(){return dt}static get Default(){return ut}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if($.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||((new We).hide(),this._enforceFocusOnElement(this._element)),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(pt);this._queueCallback((()=>{$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;$.off(document,_t),this._element.blur(),this._isShown=!1,this._element.classList.remove(pt),this._backdrop.hide();this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new We).reset(),$.trigger(this._element,gt)}),this._element,!0)}dispose(){this._backdrop.dispose(),super.dispose(),$.off(document,_t)}_getConfig(e){return e={...ut,...Y.getDataAttributes(this._element),..."object"==typeof e?e:{}},u(dt,e,ft),e}_initializeBackDrop(){return new Xe({isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_enforceFocusOnElement(e){$.off(document,_t),$.on(document,_t,(t=>{document===t.target||e===t.target||e.contains(t.target)||e.focus()})),e.focus()}_addEventListeners(){$.on(this._element,"click.dismiss.bs.offcanvas",'[data-bs-dismiss="offcanvas"]',(()=>this.hide())),$.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{this._config.keyboard&&"Escape"===e.key&&this.hide()}))}static jQueryInterface(e){return this.each((function(){const t=bt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=l(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),p(this))return;$.one(t,gt,(()=>{f(this)&&this.focus()}));const i=n.findOne(mt);i&&i!==t&&bt.getInstance(i).hide();bt.getOrCreateInstance(t).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",(()=>n.find(mt).forEach((e=>bt.getOrCreateInstance(e).show())))),w(bt);const vt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),yt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,wt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Et=(e,t)=>{const i=e.nodeName.toLowerCase();if(t.includes(i))return!vt.has(i)||Boolean(yt.test(e.nodeValue)||wt.test(e.nodeValue));const n=t.filter((e=>e instanceof RegExp));for(let e=0,t=n.length;e{Et(e,a)||i.removeAttribute(e.nodeName)}))}return n.body.innerHTML}const Ot="tooltip",Lt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),kt=new Set(["sanitize","allowList","sanitizeFn"]),Ct={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},xt={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},Dt={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Tt,popperConfig:null},St={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},It="fade",Nt="show",jt="show",Pt="out",Mt="hover",Ht="focus";class Bt extends z{constructor(e,t){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(t),this.tip=null,this._setListeners()}static get Default(){return Dt}static get NAME(){return Ot}static get Event(){return St}static get DefaultType(){return Ct}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(this._isEnabled)if(e){const t=this._initializeOnDelegatedTarget(e);t._activeTrigger.click=!t._activeTrigger.click,t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(this.getTipElement().classList.contains(Nt))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.remove(),this._popper&&this._popper.destroy(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const e=$.trigger(this._element,this.constructor.Event.SHOW),t=m(this._element),n=null===t?this._element.ownerDocument.documentElement.contains(this._element):t.contains(this._element);if(e.defaultPrevented||!n)return;const s=this.getTipElement(),r=o(this.constructor.NAME);s.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this.setContent(),this._config.animation&&s.classList.add(It);const a="function"==typeof this._config.placement?this._config.placement.call(this,s,this._element):this._config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);const{container:c}=this._config;W.set(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(c.appendChild(s),$.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=i.createPopper(this._element,s,this._getPopperConfig(l)),s.classList.add(Nt);const h="function"==typeof this._config.customClass?this._config.customClass():this._config.customClass;h&&s.classList.add(...h.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>{$.on(e,"mouseover",g)}));const d=this.tip.classList.contains(It);this._queueCallback((()=>{const e=this._hoverState;this._hoverState=null,$.trigger(this._element,this.constructor.Event.SHOWN),e===Pt&&this._leave(null,this)}),this.tip,d)}hide(){if(!this._popper)return;const e=this.getTipElement();if($.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(Nt),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>$.off(e,"mouseover",g))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const t=this.tip.classList.contains(It);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==jt&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))}),this.tip,t),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const e=document.createElement("div");return e.innerHTML=this._config.template,this.tip=e.children[0],this.tip}setContent(){const e=this.getTipElement();this.setElementContent(n.findOne(".tooltip-inner",e),this.getTitle()),e.classList.remove(It,Nt)}setElementContent(e,t){if(null!==e)return h(t)?(t=d(t),void(this._config.html?t.parentNode!==e&&(e.innerHTML="",e.appendChild(t)):e.textContent=t.textContent)):void(this._config.html?(this._config.sanitize&&(t=At(t,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=t):e.textContent=t)}getTitle(){let e=this._element.getAttribute("data-bs-original-title");return e||(e="function"==typeof this._config.title?this._config.title.call(this._element):this._config.title),e}updateAttachment(e){return"right"===e?"end":"left"===e?"start":e}_initializeOnDelegatedTarget(e,t){const i=this.constructor.DATA_KEY;return(t=t||W.get(e.delegateTarget,i))||(t=new this.constructor(e.delegateTarget,this._getDelegateConfig()),W.set(e.delegateTarget,i,t)),t}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:e=>this._handlePopperPlacementChange(e)}],onFirstUpdate:e=>{e.options.placement!==e.placement&&this._handlePopperPlacementChange(e)}};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_addAttachmentClass(e){this.getTipElement().classList.add(`bs-tooltip-${this.updateAttachment(e)}`)}_getAttachment(e){return xt[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((e=>{if("click"===e)$.on(this._element,this.constructor.Event.CLICK,this._config.selector,(e=>this.toggle(e)));else if("manual"!==e){const t=e===Mt?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=e===Mt?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;$.on(this._element,t,this._config.selector,(e=>this._enter(e))),$.on(this._element,i,this._config.selector,(e=>this._leave(e)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const e=this._element.getAttribute("title"),t=typeof this._element.getAttribute("data-bs-original-title");(e||"string"!==t)&&(this._element.setAttribute("data-bs-original-title",e||""),!e||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusin"===e.type?Ht:Mt]=!0),t.getTipElement().classList.contains(Nt)||t._hoverState===jt?t._hoverState=jt:(clearTimeout(t._timeout),t._hoverState=jt,t._config.delay&&t._config.delay.show?t._timeout=setTimeout((()=>{t._hoverState===jt&&t.show()}),t._config.delay.show):t.show())}_leave(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusout"===e.type?Ht:Mt]=t._element.contains(e.relatedTarget)),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=Pt,t._config.delay&&t._config.delay.hide?t._timeout=setTimeout((()=>{t._hoverState===Pt&&t.hide()}),t._config.delay.hide):t.hide())}_isWithActiveTrigger(){for(const e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){const t=Y.getDataAttributes(this._element);return Object.keys(t).forEach((e=>{kt.has(e)&&delete t[e]})),(e={...this.constructor.Default,...t,..."object"==typeof e&&e?e:{}}).container=!1===e.container?document.body:d(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),u(Ot,e,this.constructor.DefaultType),e.sanitize&&(e.template=At(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){const e={};if(this._config)for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e}_cleanTipClass(){const e=this.getTipElement(),t=e.getAttribute("class").match(Lt);null!==t&&t.length>0&&t.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}_handlePopperPlacementChange(e){const{state:t}=e;t&&(this.tip=t.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement)))}static jQueryInterface(e){return this.each((function(){const t=Bt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}w(Bt);const Rt=new RegExp("(^|\\s)bs-popover\\S+","g"),$t={...Bt.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},qt={...Bt.DefaultType,content:"(string|element|function)"},Wt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},zt=".popover-header",Ft=".popover-body";class Ut extends Bt{static get Default(){return $t}static get NAME(){return"popover"}static get Event(){return Wt}static get DefaultType(){return qt}isWithContent(){return this.getTitle()||this._getContent()}getTipElement(){return this.tip||(this.tip=super.getTipElement(),this.getTitle()||n.findOne(zt,this.tip).remove(),this._getContent()||n.findOne(Ft,this.tip).remove()),this.tip}setContent(){const e=this.getTipElement();this.setElementContent(n.findOne(zt,e),this.getTitle());let t=this._getContent();"function"==typeof t&&(t=t.call(this._element)),this.setElementContent(n.findOne(Ft,e),t),e.classList.remove("fade","show")}_addAttachmentClass(e){this.getTipElement().classList.add(`bs-popover-${this.updateAttachment(e)}`)}_getContent(){return this._element.getAttribute("data-bs-content")||this._config.content}_cleanTipClass(){const e=this.getTipElement(),t=e.getAttribute("class").match(Rt);null!==t&&t.length>0&&t.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}static jQueryInterface(e){return this.each((function(){const t=Ut.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}w(Ut);const Vt="scrollspy",Kt=".bs.scrollspy",Xt={offset:10,method:"auto",target:""},Yt={offset:"number",method:"string",target:"(string|element)"},Qt="dropdown-item",Gt="active",Jt=".nav-link",Zt="position";class ei extends z{constructor(e,t){super(e),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(t),this._selector=`${this._config.target} .nav-link, ${this._config.target} .list-group-item, ${this._config.target} .dropdown-item`,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,$.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return Xt}static get NAME(){return Vt}refresh(){const e=this._scrollElement===this._scrollElement.window?"offset":Zt,t="auto"===this._config.method?e:this._config.method,i=t===Zt?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();n.find(this._selector).map((e=>{const s=a(e),o=s?n.findOne(s):null;if(o){const e=o.getBoundingClientRect();if(e.width||e.height)return[Y[t](o).top+i,s]}return null})).filter((e=>e)).sort(((e,t)=>e[0]-t[0])).forEach((e=>{this._offsets.push(e[0]),this._targets.push(e[1])}))}dispose(){$.off(this._scrollElement,Kt),super.dispose()}_getConfig(e){if("string"!=typeof(e={...Xt,...Y.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}}).target&&h(e.target)){let{id:t}=e.target;t||(t=o(Vt),e.target.id=t),e.target=`#${t}`}return u(Vt,e,Yt),e}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){const e=this._targets[this._targets.length-1];this._activeTarget!==e&&this._activate(e)}else{if(this._activeTarget&&e0)return this._activeTarget=null,void this._clear();for(let t=this._offsets.length;t--;){this._activeTarget!==this._targets[t]&&e>=this._offsets[t]&&(void 0===this._offsets[t+1]||e`${t}[data-bs-target="${e}"],${t}[href="${e}"]`)),i=n.findOne(t.join(","));i.classList.contains(Qt)?(n.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Gt),i.classList.add(Gt)):(i.classList.add(Gt),n.parents(i,".nav, .list-group").forEach((e=>{n.prev(e,".nav-link, .list-group-item").forEach((e=>e.classList.add(Gt))),n.prev(e,".nav-item").forEach((e=>{n.children(e,Jt).forEach((e=>e.classList.add(Gt)))}))}))),$.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:e})}_clear(){n.find(this._selector).filter((e=>e.classList.contains(Gt))).forEach((e=>e.classList.remove(Gt)))}static jQueryInterface(e){return this.each((function(){const t=ei.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{n.find('[data-bs-spy="scroll"]').forEach((e=>new ei(e)))})),w(ei);const ti="active",ii="fade",ni="show",si=".active",oi=":scope > li > .active";class ri extends z{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(ti))return;let e;const t=l(this._element),i=this._element.closest(".nav, .list-group");if(i){const t="UL"===i.nodeName||"OL"===i.nodeName?oi:si;e=n.find(t,i),e=e[e.length-1]}const s=e?$.trigger(e,"hide.bs.tab",{relatedTarget:this._element}):null;if($.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,i);const o=()=>{$.trigger(e,"hidden.bs.tab",{relatedTarget:this._element}),$.trigger(this._element,"shown.bs.tab",{relatedTarget:e})};t?this._activate(t,t.parentNode,o):o()}_activate(e,t,i){const s=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?n.children(t,si):n.find(oi,t))[0],o=i&&s&&s.classList.contains(ii),r=()=>this._transitionComplete(e,s,i);s&&o?(s.classList.remove(ni),this._queueCallback(r,e,!0)):r()}_transitionComplete(e,t,i){if(t){t.classList.remove(ti);const e=n.findOne(":scope > .dropdown-menu .active",t.parentNode);e&&e.classList.remove(ti),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}e.classList.add(ti),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),_(e),e.classList.contains(ii)&&e.classList.add(ni);let s=e.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&s.classList.contains("dropdown-menu")){const t=e.closest(".dropdown");t&&n.find(".dropdown-toggle",t).forEach((e=>e.classList.add(ti))),e.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(e){return this.each((function(){const t=ri.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}$.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),p(this))return;ri.getOrCreateInstance(this).show()})),w(ri);const ai="toast",li="hide",ci="show",hi="showing",di={animation:"boolean",autohide:"boolean",delay:"number"},ui={animation:!0,autohide:!0,delay:5e3};class fi extends z{constructor(e,t){super(e),this._config=this._getConfig(t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return di}static get Default(){return ui}static get NAME(){return ai}show(){if($.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(li),_(this._element),this._element.classList.add(hi),this._queueCallback((()=>{this._element.classList.remove(hi),this._element.classList.add(ci),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ci))return;if($.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.remove(ci),this._queueCallback((()=>{this._element.classList.add(li),$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ci)&&this._element.classList.remove(ci),super.dispose()}_getConfig(e){return e={...ui,...Y.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}},u(ai,e,this.constructor.DefaultType),e}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',(()=>this.hide())),$.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),$.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),$.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),$.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=fi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return w(fi),{Alert:F,Button:V,Carousel:le,Collapse:ve,Dropdown:Re,Modal:ht,Offcanvas:bt,Popover:Ut,ScrollSpy:ei,Tab:ri,Toast:fi,Tooltip:Bt}})); \ No newline at end of file diff --git a/docs/sitemap.xml b/docs/sitemap.xml index a97874cb2..5bbd041d1 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -1,7 +1,7 @@ https://getdatepicker.com -2021-08-29T15:14:56.096Z +2021-08-31T12:38:32.048Z 1.00 @@ -25,10 +25,18 @@ 2021-07-08T04:00:00.000Z 0.80 +https://getdatepicker.com/docs/6/index.html +2021-07-08T04:00:00.000Z +0.80 + https://getdatepicker.com/docs/6/installing.html 2021-07-08T04:00:00.000Z 0.80 +https://getdatepicker.com/docs/6/migration.html +2021-07-08T04:00:00.000Z +0.80 + https://getdatepicker.com/docs/6/namespace\css.html 2021-07-08T04:00:00.000Z 0.80 diff --git a/src/docs/assets/no-styles.html b/src/docs/assets/no-styles.html index 6102a7c23..20deaf058 100644 --- a/src/docs/assets/no-styles.html +++ b/src/docs/assets/no-styles.html @@ -1,92 +1,137 @@ - - - - v6 + + + + + + - + Examples - No Styles - Tempus Dominus - + + + + + + + - + + - - - -
    -
    -
    -
    -
    -
    - -
    - - - -
    -
    -
    - -
    - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    Examples without external styles

    +
    +
    +
    +
    +

    + This page is to demonstrate that the picker can be used free of other styling. +

    +

    + For full examples and to return to the main site click here. +

    +
    +
    +
    +
    +           
    + <div
    +     class='input-group'
    +     id='datetimepicker1'
    +     data-td-target-input='nearest'
    +     data-td-target-toggle='nearest'
    + >
    +   <input
    +     id='datetimepicker1Input'
    +     type='text'
    +     class='form-control'
    +     data-td-target='#datetimepicker1'
    +   />
    +   <span
    +     class='input-group-text'
    +     data-td-target='#datetimepicker1'
    +     data-td-toggle='datetimepicker'
    +   >
    +     <span class='fas fa-calendar'></span>
    +   </span>
    + </div>
    +           
    +         
    +
    +
    +
               
    + new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'));
    +           
    +         
    +
    + +
    +
    +
    + +
    + + + +
    -
    - -
    -
    -
    + +
    - - - + + - [ - 'change', - 'update', - 'error', - 'show', - 'hide', - 'blur', - 'keyup', - 'keydown', - 'focus', - 'click', - ].forEach((e) => { - document.getElementById('popcorn').addEventListener(e, () => { - console.log('event:', e); - }); - }); - - - + + + + + + + \ No newline at end of file diff --git a/src/docs/js/docs.js b/src/docs/js/docs.js index 1aea876cb..a899e558a 100644 --- a/src/docs/js/docs.js +++ b/src/docs/js/docs.js @@ -53,4 +53,14 @@ document.addEventListener('DOMContentLoaded', () => { }); }); }); + + const sideBar = document.getElementById('mainToc'); + + if (sideBar) { + const activeLink = [...sideBar + .getElementsByTagName('a')] + .find(x => x.href === window.location.href); + activeLink?.closest('div').parentElement.children[0].click(); + activeLink?.classList.add('active'); + } }); diff --git a/src/docs/make.js b/src/docs/make.js index deedf4269..5e88c581d 100644 --- a/src/docs/make.js +++ b/src/docs/make.js @@ -632,6 +632,7 @@ if (process.argv.slice(2)[0] === '--watch') { 'src/docs/styles', 'src/docs/templates', 'src/docs/js', + 'src/docs/assets', 'dist/', ], { @@ -651,7 +652,7 @@ if (process.argv.slice(2)[0] === '--watch') { builder.updateDist(); } if (path.startsWith('src\\docs\\assets')) { - this.copyAssets(); + builder.copyAssets(); } if (path.startsWith('src\\docs\\partials')) { //reading the file stats seems to trigger this twice, so if the same file changed in less then a second, ignore diff --git a/src/docs/partials/examples/index.html b/src/docs/partials/examples/index.html index c544a0d99..ef935f515 100644 --- a/src/docs/partials/examples/index.html +++ b/src/docs/partials/examples/index.html @@ -188,17 +188,6 @@

    Simple Setup @@ -955,7 +944,7 @@

    Linked pickers Linked pickers Linked pickers Linked pickers Time Only Time Only Date Only Date Only Linked pickers Linked pickers Linked pickers Linked pickers + Full page coming soon + + + Introduction + 07/08/2021 + 07/08/2021 + Introduction to Eonasdan's date time picker. + + datepicker, javascript, open source, tempus dominus, eonasdan + \ No newline at end of file diff --git a/src/docs/partials/installing.html b/src/docs/partials/installing.html index 24b8c1413..918cf24f6 100644 --- a/src/docs/partials/installing.html +++ b/src/docs/partials/installing.html @@ -2,10 +2,9 @@ Full installation doc comming soon. If you want to test out the alpha, grab the js/css files from the dist folder. - How to use Tempus Dominus datetime picker + Download 07/08/2021 07/08/2021 - How to use Tempus Dominus datetime picker - + How to install Tempus Dominus datetime picker. datepicker, javascript, open source, tempus dominus, eonasdan \ No newline at end of file diff --git a/src/docs/partials/migration.html b/src/docs/partials/migration.html new file mode 100644 index 000000000..3f888b2d1 --- /dev/null +++ b/src/docs/partials/migration.html @@ -0,0 +1,11 @@ + + I'm planning on creating a tool to help developers migrate from older version to v6. + + + Migration + 07/08/2021 + 07/08/2021 + How to use Tempus Dominus datetime picker + + datepicker, javascript, open source, tempus dominus, eonasdan + \ No newline at end of file diff --git a/src/docs/partials/namespace/css.html b/src/docs/partials/namespace/css.html index 8fc46863e..08a54889c 100644 --- a/src/docs/partials/namespace/css.html +++ b/src/docs/partials/namespace/css.html @@ -3,256 +3,226 @@ The picker uses the following css classes to style the picker.

    -

    widget

    +

    widget

    The outer element for the widget.

    -
    -
    -

    switch

    +

    calendarHeader

    +

    + The element for the calendar view header, next and previous actions. +

    + +

    switch

    The element for the action to change the calendar view. E.g. month -> year.

    -
    -
    -

    sideBySide

    +

    sideBySide

    Applied to the widget element when the side by side option is in use.

    -
    -
    -

    previous

    +

    previous

    The element for the action to change the calendar view, e.g. August -> July

    -
    -
    -

    next

    +

    next

    The element for the action to change the calendar view, e.g. August -> September

    -
    -
    -

    disabled

    +

    disabled

    - Applied to any action that would violate any restriction options. ALso applied to an input field if the disabled function is called. + Applied to any action that would violate any restriction options. ALso applied to an input field if the disabled + function is called.

    -
    -
    -

    old

    +

    old

    Applied to any date that is less than requested view, e.g. the last day of the previous month.

    -
    -
    -

    new

    +

    new

    Applied to any date that is greater than of requested view, e.g. the last day of the previous month.

    -
    -
    -

    active

    +

    active

    Applied to any date that is currently selected.

    -
    -
    -

    dateContainer

    +

    dateContainer

    The outer most element for the calendar view.

    -
    -
    -

    decadesContainer

    +

    decadesContainer

    The outer most element for the decades view.

    -
    -
    -

    decade

    +

    decade

    Applied to elements within the decades container, e.g. 2020, 2030

    -
    -
    -

    yearsContainer

    +

    yearsContainer

    The outer most element for the years view.

    -
    -
    -

    year

    +

    year

    Applied to elements within the years container, e.g. 2021, 2021

    -
    -
    -

    monthsContainer

    +

    monthsContainer

    The outer most element for the month view.

    -
    -
    -

    month

    +

    month +

    Applied to elements within the month container, e.g. January, February

    -
    -
    -

    daysContainer

    +

    daysContainer

    The outer most element for the calendar view.

    -
    -
    -

    day

    +

    day

    Applied to elements within the day container, e.g. 1, 2..31

    -
    -
    -

    calendarWeeks

    +

    calendarWeeks

    - If display.calendarWeeks is enabled, a column displaying the week of year is shown. This class is applied to each cell in that column. + If display.calendarWeeks is enabled, a column displaying the week of year is shown. This class is applied to each + cell in that column.

    -
    -
    -

    dayOfTheWeek

    +

    dayOfTheWeek

    Applied to the first row of the calendar view, e.g. Sunday, Monday

    -
    -
    -

    today

    +

    today +

    Applied to the current date on the calendar view.

    -
    -
    -

    weekend

    +

    weekend +

    Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday

    -
    -
    -

    timeContainer

    +

    timeContainer

    The outer most element for all time related elements.

    -
    -
    -

    separator

    +

    separator

    Applied the separator columns between time elements, e.g. hour *:* minute *:* second

    -
    -
    -

    clockContainer

    +

    clockContainer

    The outer most element for the clock view.

    -
    -
    -

    hourContainer

    +

    hourContainer

    The outer most element for the hours selection view.

    -
    -
    -

    minuteContainer

    +

    minuteContainer

    The outer most element for the minutes selection view.

    -
    -
    -

    secondContainer

    +

    secondContainer

    The outer most element for the seconds selection view.

    -
    -
    -

    hour

    +

    hour

    Applied to each element in the hours selection view.

    -
    -
    -

    minute

    +

    minute

    Applied to each element in the minutes selection view.

    -
    -
    -

    second

    +

    second

    Applied to each element in the seconds selection view.

    -
    -
    -

    show

    +

    show

    Applied the element of the current view mode, e.g. calendar or clock.

    -
    -
    -

    collapsing

    +

    collapsing

    Applied to the currently showing view mode during a transition between calendar and clock views

    -
    -
    -

    collapse

    +

    collapse

    Applied to the currently hidden view mode.

    -
    -
    -

    inline

    +

    inline

    Applied to the widget when the option display.inline is enabled.

    + - Css Classes + CSS Classes 07/08/2021 07/08/2021 - How to use Tempus Dominus datetime picker + + A break down of the CSS classes in Tempus Dominus. datepicker, javascript, open source, tempus dominus, eonasdan \ No newline at end of file diff --git a/src/docs/partials/namespace/errors.html b/src/docs/partials/namespace/errors.html index 243996268..9783202e3 100644 --- a/src/docs/partials/namespace/errors.html +++ b/src/docs/partials/namespace/errors.html @@ -17,18 +17,14 @@

    unexpectedOption (code: 1)unexpectedOptions (code: 1)

    An error indicating that one more keys in the options object is invalid.

    - -

    unexpectedOptionValue (code: 2)unexpectedOptionValue (code: 2) -

    -

    typeMismatch (code: 3)

    @@ -48,9 +42,7 @@

    typeMismatch (code: 3)numbersOutOfRage (code: 4)

    @@ -58,9 +50,7 @@

    numbersOutOfRage (code: 4)failedToParseDate (code: 5)

    @@ -68,18 +58,14 @@

    failedToParseDate (code: 5) -

    -

    mustProvideElement (code: 6)

    An error when an element to attach to was not provided in the constructor.

    -
    -

    subscribeMismatch (code: 7)

    @@ -87,9 +73,7 @@

    subscribeMismatch (code: 7)

    conflictingConfiguration (code: 8) The configuration has conflicting rules e.g. minDate is after maxDate

    -

    -

    dateString

    @@ -108,26 +90,28 @@

    dateString

    -

    Error Messages

    -
    -

    failedToSetInvalidDate

    -

    - Used with an Error Event type if the user selects a date that fails restriction - validation. -

    -
    +

    Error Messages

    +
    +
    +

    failedToSetInvalidDate

    +

    + Used with an Error Event type if the user selects a date that fails + restriction + validation. +

    -
    -

    failedToParseInput

    -

    - Used with an Error Event type when a user changes the value of the input field - directly, and does not provide a valid date. -

    +

    failedToParseInput

    +

    + Used with an Error Event type when a user changes the value of the input field + directly, and does not provide a valid date. +

    +
    +
    @@ -136,7 +120,6 @@

    failedToParseInputErrors 07/08/2021 07/08/2021 - How to use Tempus Dominus datetime picker - + Overview of the errors thrown and error messages from Tempius Dominus. datepicker, javascript, open source, tempus dominus, eonasdan \ No newline at end of file diff --git a/src/docs/partials/namespace/events.html b/src/docs/partials/namespace/events.html index 66f020d92..53c815191 100644 --- a/src/docs/partials/namespace/events.html +++ b/src/docs/partials/namespace/events.html @@ -81,7 +81,6 @@

    hide.td Events 07/08/2021 07/08/2021 - How to use Tempus Dominus datetime picker - + Overview of the events fired from Tempius Dominus Datetime picker. datepicker, javascript, open source, tempus dominus, eonasdan \ No newline at end of file diff --git a/src/docs/partials/namespace/index.html b/src/docs/partials/namespace/index.html index 343c370a4..fe84b7f3d 100644 --- a/src/docs/partials/namespace/index.html +++ b/src/docs/partials/namespace/index.html @@ -17,14 +17,13 @@

    version

    dataKey

    Returns td. This is used as a suffix for events e.g. change.td.

    - -

    Events

    +

    events

    A class with the pickers event keys. See the full events page for more details.

    -

    Css

    +

    css

    A class with the pickers css classes. See the full css page for more details.

    -

    ErrorMessages

    +

    errorMessages

    A class with the pickers errors and error messages. See the full css page for more details.

    @@ -33,7 +32,8 @@

    ErrorMessages

    Namespace 07/08/2021 07/08/2021 - How to use Tempus Dominus datetime picker + + Overview of the Namespace for Tempus Dominus. datepicker, javascript, open source, tempus dominus, eonasdan \ No newline at end of file diff --git a/src/docs/styles/docs.css b/src/docs/styles/docs.css index 279d2c502..99cf56d2e 100644 --- a/src/docs/styles/docs.css +++ b/src/docs/styles/docs.css @@ -7,7 +7,7 @@ */ .bd-navbar { padding: .75rem 0; - background-color: #7952b3 + background-color: var(--bs-primary); } .bd-navbar .navbar-toggler { diff --git a/src/docs/templates/page-template.html b/src/docs/templates/page-template.html index b5380340a..1e867a9d2 100644 --- a/src/docs/templates/page-template.html +++ b/src/docs/templates/page-template.html @@ -1,285 +1,78 @@ -

    + +
  • +
  • + + Migration + +
  • + + -
    -
    -
    -

    Introduction

    -
    -
    -
    +
    +
    +
    +

    Introduction

    +
    +
    +
    \ No newline at end of file diff --git a/src/js/actions.ts b/src/js/actions.ts index a80f67039..2780ed64c 100644 --- a/src/js/actions.ts +++ b/src/js/actions.ts @@ -23,7 +23,7 @@ export default class Actions { */ do(e: any, action?: ActionTypes) { const currentTarget = e.currentTarget; - if (currentTarget.classList.contains(Namespace.Css.disabled)) return false; + if (currentTarget.classList.contains(Namespace.css.disabled)) return false; action = action || currentTarget.dataset.action; const lastPicked = ( this._context.dates.lastPicked || this._context._viewDate @@ -54,14 +54,16 @@ export default class Actions { if (action === ActionTypes.next) this._context._viewDate.manipulate(step, unit); else this._context._viewDate.manipulate(step * -1, unit); - this._context._display._showMode(); this._context._viewUpdate(unit); + + this._context._display._showMode(); break; case ActionTypes.pickerSwitch: this._context._display._showMode(1); this._context._viewUpdate( DatePickerModes[this._context._currentViewMode].unit ); + this._context._display._updateCalendarHeader(); break; case ActionTypes.selectMonth: case ActionTypes.selectYear: @@ -98,10 +100,10 @@ export default class Actions { break; case ActionTypes.selectDay: const day = this._context._viewDate.clone; - if (currentTarget.classList.contains(Namespace.Css.old)) { + if (currentTarget.classList.contains(Namespace.css.old)) { day.manipulate(-1, Unit.month); } - if (currentTarget.classList.contains(Namespace.Css.new)) { + if (currentTarget.classList.contains(Namespace.css.new)) { day.manipulate(1, Unit.month); } @@ -211,7 +213,7 @@ export default class Actions { case ActionTypes.togglePicker: this._context._display.widget .querySelectorAll( - `.${Namespace.Css.dateContainer}, .${Namespace.Css.timeContainer}` + `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}` ) .forEach((htmlElement: HTMLElement) => this.collapse.toggle(htmlElement) @@ -229,7 +231,7 @@ export default class Actions { this._context._options.display.icons.time ).outerHTML; - this._context._display._showMode(); + this._context._display._updateCalendarHeader(); } else { currentTarget.setAttribute( 'title', @@ -247,7 +249,7 @@ export default class Actions { case ActionTypes.showMinutes: case ActionTypes.showSeconds: this._context._display.widget - .querySelectorAll(`.${Namespace.Css.timeContainer} > div`) + .querySelectorAll(`.${Namespace.css.timeContainer} > div`) .forEach( (htmlElement: HTMLElement) => (htmlElement.style.display = 'none') ); @@ -255,19 +257,19 @@ export default class Actions { let classToUse = ''; switch (action) { case ActionTypes.showClock: - classToUse = Namespace.Css.clockContainer; + classToUse = Namespace.css.clockContainer; this._context._display._update('clock'); break; case ActionTypes.showHours: - classToUse = Namespace.Css.hourContainer; + classToUse = Namespace.css.hourContainer; this._context._display._update(Unit.hours); break; case ActionTypes.showMinutes: - classToUse = Namespace.Css.minuteContainer; + classToUse = Namespace.css.minuteContainer; this._context._display._update(Unit.minutes); break; case ActionTypes.showSeconds: - classToUse = Namespace.Css.secondContainer; + classToUse = Namespace.css.secondContainer; this._context._display._update(Unit.seconds); break; } @@ -278,7 +280,7 @@ export default class Actions { break; case ActionTypes.clear: this._context.dates._setValue(null); - this._context._display._showMode(); + this._context._display._updateCalendarHeader(); break; case ActionTypes.close: this._context._display.hide(); diff --git a/src/js/conts.ts b/src/js/conts.ts index aa173dac9..4637a5937 100644 --- a/src/js/conts.ts +++ b/src/js/conts.ts @@ -102,25 +102,25 @@ const DatePickerModes: { }[] = [ { name: 'calendar', - className: Namespace.Css.daysContainer, + className: Namespace.css.daysContainer, unit: Unit.month, step: 1, }, { name: 'months', - className: Namespace.Css.monthsContainer, + className: Namespace.css.monthsContainer, unit: Unit.year, step: 1, }, { name: 'years', - className: Namespace.Css.yearsContainer, + className: Namespace.css.yearsContainer, unit: Unit.year, step: 10, }, { name: 'decades', - className: Namespace.Css.decadesContainer, + className: Namespace.css.decadesContainer, unit: Unit.year, step: 100, }, diff --git a/src/js/dates.ts b/src/js/dates.ts index 16e3015db..a0d61266e 100644 --- a/src/js/dates.ts +++ b/src/js/dates.ts @@ -84,7 +84,7 @@ export default class Dates { clear() { this._context._unset = true; this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: undefined, oldDate: this.lastPicked, isClear: true, @@ -153,7 +153,7 @@ export default class Dates { this._dates.splice(index, 1); } this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: undefined, oldDate, isClear, @@ -185,7 +185,7 @@ export default class Dates { this._context._unset = false; this._context._display._update('all'); this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: target, oldDate, isClear, @@ -201,7 +201,7 @@ export default class Dates { updateInput(); this._context._triggerEvent({ - type: Namespace.Events.change, + type: Namespace.events.change, date: target, oldDate, isClear, @@ -209,8 +209,8 @@ export default class Dates { } as ChangeEvent); } this._context._triggerEvent({ - type: Namespace.Events.error, - reason: Namespace.ErrorMessages.failedToSetInvalidDate, + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToSetInvalidDate, date: target, oldDate, } as FailEvent); diff --git a/src/js/display/calendar/date-display.ts b/src/js/display/calendar/date-display.ts index a24141768..dcd06d843 100644 --- a/src/js/display/calendar/date-display.ts +++ b/src/js/display/calendar/date-display.ts @@ -19,13 +19,13 @@ export default class DateDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.daysContainer); + container.classList.add(Namespace.css.daysContainer); container.append(...this._daysOfTheWeek()); if (this._context._options.display.calendarWeeks) { const div = document.createElement('div'); - div.classList.add(Namespace.Css.calendarWeeks, Namespace.Css.noHighlight); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); container.appendChild(div); } @@ -34,8 +34,8 @@ export default class DateDisplay { if (this._context._options.display.calendarWeeks) { const div = document.createElement('div'); div.classList.add( - Namespace.Css.calendarWeeks, - Namespace.Css.noHighlight + Namespace.css.calendarWeeks, + Namespace.css.noHighlight ); container.appendChild(div); } @@ -55,29 +55,32 @@ export default class DateDisplay { */ _update(): void { const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.daysContainer + Namespace.css.daysContainer )[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = this._context._viewDate.format({ - month: this._context._options.localization.dayViewHeaderFormat, - }); + switcher.setAttribute( + Namespace.css.daysContainer, + this._context._viewDate.format({ + month: this._context._options.localization.dayViewHeaderFormat, + }) + ); this._context._validation.isValid( this._context._viewDate.clone.manipulate(-1, Unit.month), Unit.month ) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid( this._context._viewDate.clone.manipulate(1, Unit.month), Unit.month ) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone .startOf(Unit.month) @@ -86,12 +89,12 @@ export default class DateDisplay { container .querySelectorAll( - `[data-action="${ActionTypes.selectDay}"], .${Namespace.Css.calendarWeeks}` + `[data-action="${ActionTypes.selectDay}"], .${Namespace.css.calendarWeeks}` ) .forEach((containerClone: HTMLElement, index) => { if ( this._context._options.display.calendarWeeks && - containerClone.classList.contains(Namespace.Css.calendarWeeks) + containerClone.classList.contains(Namespace.css.calendarWeeks) ) { if (containerClone.innerText === '#') return; containerClone.innerText = `${innerDate.week}`; @@ -99,29 +102,29 @@ export default class DateDisplay { } let classes = []; - classes.push(Namespace.Css.day); + classes.push(Namespace.css.day); if (innerDate.isBefore(this._context._viewDate, Unit.month)) { - classes.push(Namespace.Css.old); + classes.push(Namespace.css.old); } if (innerDate.isAfter(this._context._viewDate, Unit.month)) { - classes.push(Namespace.Css.new); + classes.push(Namespace.css.new); } if ( !this._context._unset && this._context.dates.isPicked(innerDate, Unit.date) ) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.date)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } if (innerDate.isSame(new DateTime(), Unit.date)) { - classes.push(Namespace.Css.today); + classes.push(Namespace.css.today); } if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { - classes.push(Namespace.Css.weekend); + classes.push(Namespace.css.weekend); } containerClone.classList.remove(...containerClone.classList); @@ -149,8 +152,8 @@ export default class DateDisplay { if (this._context._options.display.calendarWeeks) { const htmlDivElement = document.createElement('div'); htmlDivElement.classList.add( - Namespace.Css.calendarWeeks, - Namespace.Css.noHighlight + Namespace.css.calendarWeeks, + Namespace.css.noHighlight ); htmlDivElement.innerText = '#'; row.push(htmlDivElement); @@ -159,8 +162,8 @@ export default class DateDisplay { for (let i = 0; i < 7; i++) { const htmlDivElement = document.createElement('div'); htmlDivElement.classList.add( - Namespace.Css.dayOfTheWeek, - Namespace.Css.noHighlight + Namespace.css.dayOfTheWeek, + Namespace.css.noHighlight ); htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); innerDate.manipulate(1, Unit.date); diff --git a/src/js/display/calendar/decade-display.ts b/src/js/display/calendar/decade-display.ts index b1fefdde1..c0fab0cec 100644 --- a/src/js/display/calendar/decade-display.ts +++ b/src/js/display/calendar/decade-display.ts @@ -22,7 +22,7 @@ export default class DecadeDisplay { */ get _picker() { const container = document.createElement('div'); - container.classList.add(Namespace.Css.decadesContainer); + container.classList.add(Namespace.css.decadesContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); @@ -47,20 +47,23 @@ export default class DecadeDisplay { this._endDecade.year = end; const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.decadesContainer + Namespace.css.decadesContainer )[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = `${this._startDecade.year}-${this._endDecade.year}`; + switcher.setAttribute( + Namespace.css.decadesContainer, + `${this._startDecade.year}-${this._endDecade.year}` + ); this._context._validation.isValid(this._startDecade, Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._endDecade, Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); const pickedYears = this._context.dates.picked.map((x) => x.year); @@ -68,11 +71,11 @@ export default class DecadeDisplay { .querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`) .forEach((containerClone: HTMLElement, index) => { if (index === 0) { - containerClone.classList.add(Namespace.Css.old); + containerClone.classList.add(Namespace.css.old); if (this._startDecade.year - 10 < 0) { containerClone.textContent = ' '; - previous.classList.add(Namespace.Css.disabled); - containerClone.classList.add(Namespace.Css.disabled); + previous.classList.add(Namespace.css.disabled); + containerClone.classList.add(Namespace.css.disabled); containerClone.setAttribute('data-value', ``); return; } else { @@ -86,7 +89,7 @@ export default class DecadeDisplay { } let classes = []; - classes.push(Namespace.Css.decade); + classes.push(Namespace.css.decade); const startDecadeYear = this._startDecade.year; const endDecadeYear = this._startDecade.year + 9; @@ -95,7 +98,7 @@ export default class DecadeDisplay { pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) .length > 0 ) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } containerClone.classList.remove(...containerClone.classList); diff --git a/src/js/display/calendar/month-display.ts b/src/js/display/calendar/month-display.ts index c1c98474e..d4a60141a 100644 --- a/src/js/display/calendar/month-display.ts +++ b/src/js/display/calendar/month-display.ts @@ -19,7 +19,7 @@ export default class MonthDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.monthsContainer); + container.classList.add(Namespace.css.monthsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); @@ -36,27 +36,30 @@ export default class MonthDisplay { */ _update(): void { const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.monthsContainer + Namespace.css.monthsContainer )[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = this._context._viewDate.format({ year: 'numeric' }); + switcher.setAttribute( + Namespace.css.monthsContainer, + this._context._viewDate.format({ year: 'numeric' }) + ); this._context._validation.isValid( this._context._viewDate.clone.manipulate(-1, Unit.year), Unit.year ) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid( this._context._viewDate.clone.manipulate(1, Unit.year), Unit.year ) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone.startOf(Unit.year); @@ -64,16 +67,16 @@ export default class MonthDisplay { .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`) .forEach((containerClone: HTMLElement, index) => { let classes = []; - classes.push(Namespace.Css.month); + classes.push(Namespace.css.month); if ( !this._context._unset && this._context.dates.isPicked(innerDate, Unit.month) ) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.month)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); diff --git a/src/js/display/calendar/year-display.ts b/src/js/display/calendar/year-display.ts index 055d51ef7..cff0382c4 100644 --- a/src/js/display/calendar/year-display.ts +++ b/src/js/display/calendar/year-display.ts @@ -22,7 +22,7 @@ export default class YearDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.yearsContainer); + container.classList.add(Namespace.css.yearsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); @@ -46,20 +46,20 @@ export default class YearDisplay { this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year); const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.yearsContainer + Namespace.css.yearsContainer )[0]; const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switcher.innerText = `${this._startYear.year}-${this._endYear.year}`; + switcher.setAttribute(Namespace.css.yearsContainer,`${this._startYear.year}-${this._endYear.year}`); this._context._validation.isValid(this._startYear, Unit.year) - ? previous.classList.remove(Namespace.Css.disabled) - : previous.classList.add(Namespace.Css.disabled); + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); this._context._validation.isValid(this._endYear, Unit.year) - ? next.classList.remove(Namespace.Css.disabled) - : next.classList.add(Namespace.Css.disabled); + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); let innerDate = this._context._viewDate.clone .startOf(Unit.year) @@ -69,16 +69,16 @@ export default class YearDisplay { .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`) .forEach((containerClone: HTMLElement, index) => { let classes = []; - classes.push(Namespace.Css.year); + classes.push(Namespace.css.year); if ( !this._context._unset && this._context.dates.isPicked(innerDate, Unit.year) ) { - classes.push(Namespace.Css.active); + classes.push(Namespace.css.active); } if (!this._context._validation.isValid(innerDate, Unit.year)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); diff --git a/src/js/display/collapse.ts b/src/js/display/collapse.ts index 3240878fe..7fb47176c 100644 --- a/src/js/display/collapse.ts +++ b/src/js/display/collapse.ts @@ -11,7 +11,7 @@ export default class Collapse { * @param target html element to affect. */ toggle(target: HTMLElement) { - if (target.classList.contains(Namespace.Css.show)) { + if (target.classList.contains(Namespace.css.show)) { this.hide(target); } else { this.show(target); @@ -24,21 +24,21 @@ export default class Collapse { */ show(target: HTMLElement) { if ( - target.classList.contains(Namespace.Css.collapsing) || - target.classList.contains(Namespace.Css.show) + target.classList.contains(Namespace.css.collapsing) || + target.classList.contains(Namespace.css.show) ) return; const complete = () => { - target.classList.remove(Namespace.Css.collapsing); - target.classList.add(Namespace.Css.collapse, Namespace.Css.show); + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse, Namespace.css.show); target.style.height = ''; this.timeOut = null; }; target.style.height = '0'; - target.classList.remove(Namespace.Css.collapse); - target.classList.add(Namespace.Css.collapsing); + target.classList.remove(Namespace.css.collapse); + target.classList.add(Namespace.css.collapsing); this.timeOut = setTimeout( complete, @@ -53,14 +53,14 @@ export default class Collapse { */ hide(target: HTMLElement) { if ( - target.classList.contains(Namespace.Css.collapsing) || - !target.classList.contains(Namespace.Css.show) + target.classList.contains(Namespace.css.collapsing) || + !target.classList.contains(Namespace.css.show) ) return; const complete = () => { - target.classList.remove(Namespace.Css.collapsing); - target.classList.add(Namespace.Css.collapse); + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse); this.timeOut = null; }; @@ -70,8 +70,8 @@ export default class Collapse { reflow(target); - target.classList.remove(Namespace.Css.collapse, Namespace.Css.show); - target.classList.add(Namespace.Css.collapsing); + target.classList.remove(Namespace.css.collapse, Namespace.css.show); + target.classList.add(Namespace.css.collapsing); target.style.height = ''; this.timeOut = setTimeout( @@ -91,9 +91,8 @@ export default class Collapse { } // Get transition-duration of the element - let { transitionDuration, transitionDelay } = window.getComputedStyle( - element - ); + let { transitionDuration, transitionDelay } = + window.getComputedStyle(element); const floatTransitionDuration = Number.parseFloat(transitionDuration); const floatTransitionDelay = Number.parseFloat(transitionDelay); diff --git a/src/js/display/index.ts b/src/js/display/index.ts index 63aea9fdf..f74c3b7d8 100644 --- a/src/js/display/index.ts +++ b/src/js/display/index.ts @@ -99,7 +99,7 @@ export default class Display { this._update(Unit.year); this._update(Unit.month); this._decadeDisplay._update(); - this._context._display._showMode(); + this._updateCalendarHeader(); break; case 'all': if (this._hasTime) { @@ -177,7 +177,7 @@ export default class Display { this._context._action.do( { currentTarget: this.widget.querySelector( - `.${Namespace.Css.timeContainer}` + `.${Namespace.css.timeContainer}` ), }, ActionTypes.showClock @@ -195,18 +195,18 @@ export default class Display { this._timeDisplay._update(); ( this.widget.getElementsByClassName( - Namespace.Css.clockContainer + Namespace.css.clockContainer )[0] as HTMLElement ).style.display = 'grid'; } } - this.widget.classList.add(Namespace.Css.show); + this.widget.classList.add(Namespace.css.show); if (!this._context._options.display.inline) { this._popperInstance.update(); document.addEventListener('click', this._documentClickEvent); } - this._context._triggerEvent({ type: Namespace.Events.show }); + this._context._triggerEvent({ type: Namespace.events.show }); this._isVisible = true; } @@ -230,7 +230,7 @@ export default class Display { this.widget .querySelectorAll( - `.${Namespace.Css.dateContainer} > div:not(.${Namespace.Css.calendarHeader}), .${Namespace.Css.timeContainer} > div` + `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div` ) .forEach((e: HTMLElement) => (e.style.display = 'none')); @@ -239,12 +239,38 @@ export default class Display { `.${datePickerMode.className}` ); + switch (datePickerMode.className) { + case Namespace.css.decadesContainer: + this._decadeDisplay._update(); + break; + case Namespace.css.yearsContainer: + this._yearDisplay._update(); + break; + case Namespace.css.monthsContainer: + this._monthDisplay._update(); + break; + case Namespace.css.daysContainer: + this._dateDisplay._update(); + break; + } + + picker.style.display = 'grid'; + this._updateCalendarHeader(); + } + + _updateCalendarHeader() { + const showing = [ + ...this.widget.querySelector( + `.${Namespace.css.dateContainer} div[style*="display: grid"]` + ).classList, + ].find((x) => x.startsWith(Namespace.css.dateContainer)); + const [previous, switcher, next] = this._context._display.widget - .getElementsByClassName(Namespace.Css.calendarHeader)[0] + .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); - switch (datePickerMode.className) { - case Namespace.Css.decadesContainer: + switch (showing) { + case Namespace.css.decadesContainer: previous.setAttribute( 'title', this._context._options.localization.previousCentury @@ -254,9 +280,8 @@ export default class Display { 'title', this._context._options.localization.nextCentury ); - this._decadeDisplay._update(); break; - case Namespace.Css.yearsContainer: + case Namespace.css.yearsContainer: previous.setAttribute( 'title', this._context._options.localization.previousDecade @@ -269,9 +294,8 @@ export default class Display { 'title', this._context._options.localization.nextDecade ); - this._yearDisplay._update(); break; - case Namespace.Css.monthsContainer: + case Namespace.css.monthsContainer: previous.setAttribute( 'title', this._context._options.localization.previousYear @@ -284,9 +308,8 @@ export default class Display { 'title', this._context._options.localization.nextYear ); - this._monthDisplay._update(); break; - case Namespace.Css.daysContainer: + case Namespace.css.daysContainer: previous.setAttribute( 'title', this._context._options.localization.previousMonth @@ -299,11 +322,12 @@ export default class Display { 'title', this._context._options.localization.nextMonth ); - this._dateDisplay._update(); + switcher.innerText = this._context._viewDate.format({ + month: this._context._options.localization.dayViewHeaderFormat, + }); break; } - - picker.style.display = 'grid'; + switcher.innerText = switcher.getAttribute(showing); } /** @@ -312,11 +336,11 @@ export default class Display { * @fires Events#hide */ hide(): void { - this.widget.classList.remove(Namespace.Css.show); + this.widget.classList.remove(Namespace.css.show); if (this._isVisible) { this._context._triggerEvent({ - type: Namespace.Events.hide, + type: Namespace.events.hide, date: this._context._unset ? null : this._context.dates.lastPicked @@ -358,10 +382,10 @@ export default class Display { */ private _buildWidget(): HTMLElement { const template = document.createElement('div'); - template.classList.add(Namespace.Css.widget); + template.classList.add(Namespace.css.widget); const dateView = document.createElement('div'); - dateView.classList.add(Namespace.Css.dateContainer); + dateView.classList.add(Namespace.css.dateContainer); dateView.append( this._headTemplate, this._decadeDisplay._picker, @@ -371,18 +395,18 @@ export default class Display { ); const timeView = document.createElement('div'); - timeView.classList.add(Namespace.Css.timeContainer); + timeView.classList.add(Namespace.css.timeContainer); timeView.appendChild(this._timeDisplay._picker); timeView.appendChild(this._hourDisplay._picker); timeView.appendChild(this._minuteDisplay._picker); timeView.appendChild(this._secondDisplay._picker); const toolbar = document.createElement('div'); - toolbar.classList.add(Namespace.Css.toolbar); + toolbar.classList.add(Namespace.css.toolbar); toolbar.append(...this._toolbar); if (this._context._options.display.inline) { - template.classList.add(Namespace.Css.inline); + template.classList.add(Namespace.css.inline); } if (this._context._options.display.calendarWeeks) { @@ -394,7 +418,7 @@ export default class Display { this._hasDate && this._hasTime ) { - template.classList.add(Namespace.Css.sideBySide); + template.classList.add(Namespace.css.sideBySide); if (this._context._options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } @@ -419,18 +443,18 @@ export default class Display { if (this._hasDate) { if (this._hasTime) { - dateView.classList.add(Namespace.Css.collapse); + dateView.classList.add(Namespace.css.collapse); if (this._context._options.display.viewMode !== 'clock') - dateView.classList.add(Namespace.Css.show); + dateView.classList.add(Namespace.css.show); } template.appendChild(dateView); } if (this._hasTime) { if (this._hasDate) { - timeView.classList.add(Namespace.Css.collapse); + timeView.classList.add(Namespace.css.collapse); if (this._context._options.display.viewMode === 'clock') - timeView.classList.add(Namespace.Css.show); + timeView.classList.add(Namespace.css.show); } template.appendChild(timeView); } @@ -539,21 +563,21 @@ export default class Display { */ get _headTemplate(): HTMLElement { const calendarHeader = document.createElement('div'); - calendarHeader.classList.add(Namespace.Css.calendarHeader); + calendarHeader.classList.add(Namespace.css.calendarHeader); const previous = document.createElement('div'); - previous.classList.add(Namespace.Css.previous); + previous.classList.add(Namespace.css.previous); previous.setAttribute('data-action', ActionTypes.previous); previous.appendChild( this._iconTag(this._context._options.display.icons.previous) ); const switcher = document.createElement('div'); - switcher.classList.add(Namespace.Css.switch); + switcher.classList.add(Namespace.css.switch); switcher.setAttribute('data-action', ActionTypes.pickerSwitch); const next = document.createElement('div'); - next.classList.add(Namespace.Css.next); + next.classList.add(Namespace.css.next); next.setAttribute('data-action', ActionTypes.next); next.appendChild(this._iconTag(this._context._options.display.icons.next)); diff --git a/src/js/display/time/hour-display.ts b/src/js/display/time/hour-display.ts index b244d1939..12318158a 100644 --- a/src/js/display/time/hour-display.ts +++ b/src/js/display/time/hour-display.ts @@ -19,7 +19,7 @@ export default class HourDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.hourContainer); + container.classList.add(Namespace.css.hourContainer); for ( let i = 0; @@ -41,7 +41,7 @@ export default class HourDisplay { */ _update(): void { const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.hourContainer + Namespace.css.hourContainer )[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.date); @@ -49,10 +49,10 @@ export default class HourDisplay { .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`) .forEach((containerClone: HTMLElement, index) => { let classes = []; - classes.push(Namespace.Css.hour); + classes.push(Namespace.css.hour); if (!this._context._validation.isValid(innerDate, Unit.hours)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); diff --git a/src/js/display/time/minute-display.ts b/src/js/display/time/minute-display.ts index 1d01a938b..9203d77a1 100644 --- a/src/js/display/time/minute-display.ts +++ b/src/js/display/time/minute-display.ts @@ -19,7 +19,7 @@ export default class MinuteDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.minuteContainer); + container.classList.add(Namespace.css.minuteContainer); let step = this._context._options.stepping === 1 @@ -40,7 +40,7 @@ export default class MinuteDisplay { */ _update(): void { const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.minuteContainer + Namespace.css.minuteContainer )[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.hours); let step = @@ -52,10 +52,10 @@ export default class MinuteDisplay { .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`) .forEach((containerClone: HTMLElement, index) => { let classes = []; - classes.push(Namespace.Css.minute); + classes.push(Namespace.css.minute); if (!this._context._validation.isValid(innerDate, Unit.minutes)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); diff --git a/src/js/display/time/second-display.ts b/src/js/display/time/second-display.ts index cff642ce4..808e61cae 100644 --- a/src/js/display/time/second-display.ts +++ b/src/js/display/time/second-display.ts @@ -19,7 +19,7 @@ export default class secondDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.secondContainer); + container.classList.add(Namespace.css.secondContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); @@ -36,7 +36,7 @@ export default class secondDisplay { */ _update(): void { const container = this._context._display.widget.getElementsByClassName( - Namespace.Css.secondContainer + Namespace.css.secondContainer )[0]; let innerDate = this._context._viewDate.clone.startOf(Unit.minutes); @@ -44,10 +44,10 @@ export default class secondDisplay { .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`) .forEach((containerClone: HTMLElement, index) => { let classes = []; - classes.push(Namespace.Css.second); + classes.push(Namespace.css.second); if (!this._context._validation.isValid(innerDate, Unit.seconds)) { - classes.push(Namespace.Css.disabled); + classes.push(Namespace.css.disabled); } containerClone.classList.remove(...containerClone.classList); diff --git a/src/js/display/time/time-display.ts b/src/js/display/time/time-display.ts index 46ed4398d..55e66ca41 100644 --- a/src/js/display/time/time-display.ts +++ b/src/js/display/time/time-display.ts @@ -18,7 +18,7 @@ export default class TimeDisplay { */ get _picker(): HTMLElement { const container = document.createElement('div'); - container.classList.add(Namespace.Css.clockContainer); + container.classList.add(Namespace.css.clockContainer); container.append(...this._grid()); @@ -32,7 +32,7 @@ export default class TimeDisplay { */ _update(): void { const timesDiv = this._context._display.widget.getElementsByClassName( - Namespace.Css.clockContainer + Namespace.css.clockContainer )[0]; const lastPicked = ( this._context.dates.lastPicked || this._context._viewDate @@ -42,7 +42,7 @@ export default class TimeDisplay { timesDiv .querySelectorAll('.disabled') - .forEach((element) => element.classList.remove(Namespace.Css.disabled)); + .forEach((element) => element.classList.remove(Namespace.css.disabled)); if (this._context._options.display.components.hours) { columns++; @@ -54,7 +54,7 @@ export default class TimeDisplay { ) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementHours}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if ( @@ -65,7 +65,7 @@ export default class TimeDisplay { ) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementHours}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector( `[data-time-component=${Unit.hours}]` @@ -84,7 +84,7 @@ export default class TimeDisplay { ) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if ( @@ -95,7 +95,7 @@ export default class TimeDisplay { ) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector( `[data-time-component=${Unit.minutes}]` @@ -112,7 +112,7 @@ export default class TimeDisplay { ) { timesDiv .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } if ( @@ -123,7 +123,7 @@ export default class TimeDisplay { ) { timesDiv .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`) - .classList.add(Namespace.Css.disabled); + .classList.add(Namespace.css.disabled); } timesDiv.querySelector( `[data-time-component=${Unit.seconds}]` @@ -146,9 +146,9 @@ export default class TimeDisplay { ) ) ) { - toggle.classList.add(Namespace.Css.disabled); + toggle.classList.add(Namespace.css.disabled); } else { - toggle.classList.remove(Namespace.Css.disabled); + toggle.classList.remove(Namespace.css.disabled); } } @@ -160,8 +160,7 @@ export default class TimeDisplay { * @private */ private _grid(): HTMLElement[] { - const - top = [], + const top = [], middle = [], bottom = [], separator = document.createElement('div'), @@ -172,7 +171,7 @@ export default class TimeDisplay { this._context._options.display.icons.down ); - separator.classList.add(Namespace.Css.separator, Namespace.Css.noHighlight); + separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); const separatorColon = separator.cloneNode(true); separatorColon.innerHTML = ':'; @@ -292,7 +291,7 @@ export default class TimeDisplay { button.setAttribute('tabindex', '-1'); divElement = document.createElement('div'); - divElement.classList.add(Namespace.Css.noHighlight); + divElement.classList.add(Namespace.css.noHighlight); divElement.appendChild(button); middle.push(divElement); diff --git a/src/js/jQuery-provider.js b/src/js/jQuery-provider.js index 10be69ff1..349605690 100644 --- a/src/js/jQuery-provider.js +++ b/src/js/jQuery-provider.js @@ -66,7 +66,7 @@ tempusDominus.getSelectorFromElement = function ($element) { */ $(document) .on( - `click${tempusDominus.Namespace.Events.key}.data-api`, + `click${tempusDominus.Namespace.events.key}.data-api`, `[data-toggle="${tempusDominus.Namespace.dataKey}"]`, function () { const $originalTarget = $(this), @@ -85,7 +85,7 @@ $(document) } ) .on( - tempusDominus.Namespace.Events.change, + tempusDominus.Namespace.events.change, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)); @@ -96,7 +96,7 @@ $(document) } ) .on( - tempusDominus.Namespace.Events.blur, + tempusDominus.Namespace.events.blur, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)), @@ -125,7 +125,7 @@ $(document) tempusDominus.jQueryInterface.call($target, '_keyup', event); })*/ .on( - tempusDominus.Namespace.Events.focus, + tempusDominus.Namespace.events.focus, `.${tempusDominus.Namespace.NAME}-input`, function (event) { const $target = tempusDominus.getSelectorFromElement($(this)), diff --git a/src/js/namespace.ts b/src/js/namespace.ts index db36eea02..45e188ddc 100644 --- a/src/js/namespace.ts +++ b/src/js/namespace.ts @@ -264,9 +264,9 @@ export default class Namespace { static version = version; static dataKey = dataKey; - static Events = new Events(); + static events = new Events(); - static Css = new Css(); + static css = new Css(); - static ErrorMessages = new ErrorMessages(); + static errorMessages = new ErrorMessages(); } diff --git a/src/js/options.ts b/src/js/options.ts index 84a242ac3..e734ce62a 100644 --- a/src/js/options.ts +++ b/src/js/options.ts @@ -103,7 +103,7 @@ export class OptionConverter { if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( 'viewDate', providedType, 'DateTime or Date' @@ -117,7 +117,7 @@ export class OptionConverter { if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( 'restrictions.minDate', providedType, 'DateTime or Date' @@ -131,7 +131,7 @@ export class OptionConverter { if (dateTime !== undefined) { return dateTime; } - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( 'restrictions.maxDate', providedType, 'DateTime or Date' @@ -147,7 +147,7 @@ export class OptionConverter { providedType ); if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.ErrorMessages.numbersOutOfRage( + Namespace.errorMessages.numbersOutOfRage( 'restrictions.disabledHours', 0, 23 @@ -163,7 +163,7 @@ export class OptionConverter { providedType ); if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.ErrorMessages.numbersOutOfRage( + Namespace.errorMessages.numbersOutOfRage( 'restrictions.enabledHours', 0, 23 @@ -179,7 +179,7 @@ export class OptionConverter { providedType ); if (value.filter((x) => x < 0 || x > 6).length > 0) - Namespace.ErrorMessages.numbersOutOfRage( + Namespace.errorMessages.numbersOutOfRage( 'restrictions.daysOfWeekDisabled', 0, 6 @@ -210,7 +210,7 @@ export class OptionConverter { return []; } if (!Array.isArray(value)) { - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }' @@ -223,7 +223,7 @@ export class OptionConverter { let d = valueObject[i][vk]; const dateTime = this._dateConversion(d, subOptionName); if (!dateTime) { - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( subOptionName, typeof d, 'DateTime or Date' @@ -251,7 +251,7 @@ export class OptionConverter { }; const keyOptions = optionValues[key]; if (!keyOptions.includes(value)) - Namespace.ErrorMessages.unexpectedOptionValue( + Namespace.errorMessages.unexpectedOptionValue( path.substring(1), value, keyOptions @@ -273,7 +273,7 @@ export class OptionConverter { case 'function': return value; default: - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( path.substring(1), providedType, defaultType @@ -303,7 +303,7 @@ export class OptionConverter { if (didYouMean) error += `Did you mean "${didYouMean}"?`; return error; }); - Namespace.ErrorMessages.unexpectedOptions(errors); + Namespace.errorMessages.unexpectedOptions(errors); } Object.keys(mergeOption).forEach((key) => { const defaultOptionValue = mergeOption[key]; @@ -453,7 +453,7 @@ export class OptionConverter { */ static _typeCheckDateArray(optionName: string, value, providedType: string) { if (!Array.isArray(value)) { - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( optionName, providedType, 'array of DateTime or Date' @@ -463,7 +463,7 @@ export class OptionConverter { let d = value[i]; const dateTime = this._dateConversion(d, optionName); if (!dateTime) { - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( optionName, typeof d, 'DateTime or Date' @@ -485,7 +485,7 @@ export class OptionConverter { providedType: string ) { if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) { - Namespace.ErrorMessages.typeMismatch( + Namespace.errorMessages.typeMismatch( optionName, providedType, 'array of numbers' @@ -501,13 +501,13 @@ export class OptionConverter { */ static _dateConversion(d: any, optionName: string) { if (typeof d === typeof '') { - Namespace.ErrorMessages.dateString(); + Namespace.errorMessages.dateString(); } const converted = this._dateTypeCheck(d); if (!converted) { - Namespace.ErrorMessages.failedToParseDate(optionName, d); + Namespace.errorMessages.failedToParseDate(optionName, d); } return converted; } @@ -531,13 +531,13 @@ export class OptionConverter { static _validateConflcits(config: Options) { if (config.restrictions.minDate && config.restrictions.maxDate) { if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { - Namespace.ErrorMessages.conflictingConfiguration( + Namespace.errorMessages.conflictingConfiguration( 'minDate is after maxDate' ); } if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { - Namespace.ErrorMessages.conflictingConfiguration( + Namespace.errorMessages.conflictingConfiguration( 'maxDate is before minDate' ); } diff --git a/src/js/tempus-dominus.ts b/src/js/tempus-dominus.ts index 01fdf3eea..044075ff8 100644 --- a/src/js/tempus-dominus.ts +++ b/src/js/tempus-dominus.ts @@ -36,7 +36,7 @@ class TempusDominus { constructor(element: HTMLElement, options: Options = {} as Options) { if (!element) { - Namespace.ErrorMessages.mustProvideElement; + Namespace.errorMessages.mustProvideElement; } this._element = element; this._options = this._initializeOptions(options, DefaultOptions, true); @@ -156,7 +156,7 @@ class TempusDominus { } if (eventTypes.length !== callBackArray.length) { - Namespace.ErrorMessages.subscribeMismatch; + Namespace.errorMessages.subscribeMismatch; } const returnArray = []; @@ -259,7 +259,7 @@ class TempusDominus { */ _viewUpdate(unit: Unit) { this._triggerEvent({ - type: Namespace.Events.update, + type: Namespace.events.update, change: unit, viewDate: this._viewDate.clone, } as ViewUpdateEvent); @@ -401,8 +401,8 @@ class TempusDominus { !this._display._hasTime || // clock component is already showing this._display.widget - ?.getElementsByClassName(Namespace.Css.show)[0] - .classList.contains(Namespace.Css.timeContainer) + ?.getElementsByClassName(Namespace.css.show)[0] + .classList.contains(Namespace.css.timeContainer) ) return; @@ -422,7 +422,7 @@ class TempusDominus { this._action.do( { currentTarget: this._display.widget.querySelector( - `.${Namespace.Css.switch} div` + `.${Namespace.css.switch} div` ), }, ActionTypes.togglePicker @@ -443,8 +443,8 @@ class TempusDominus { this.dates._setValue(parsedDate); } else { this._triggerEvent({ - type: Namespace.Events.error, - reason: Namespace.ErrorMessages.failedToParseInput, + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToParseInput, date: parsedDate, } as FailEvent); }