From 9d28d5b7200518c95d28369cee0546f2833dbd65 Mon Sep 17 00:00:00 2001 From: Eonasdan Date: Tue, 27 Sep 2022 15:40:25 -0400 Subject: [PATCH] Development (#2668) * docs action (#2660) * fix popper * fix npm packages (again) --- README.md | 2 +- build/change-version.js | 2 +- build/plugins.js | 38 +- build/rollup-plugin.config.js | 13 +- build/rollup.config.js | 8 +- dist/css/tempus-dominus.min.css | 2 +- dist/js/jQuery-provider.js | 2 +- dist/js/jQuery-provider.min.js | 2 +- dist/js/tempus-dominus.esm.js | 126 +- dist/js/tempus-dominus.esm.js.map | 2 +- dist/js/tempus-dominus.esm.min.js | 4 +- dist/js/tempus-dominus.js | 7762 +++++++++++++-------------- dist/js/tempus-dominus.js.map | 2 +- dist/js/tempus-dominus.min.js | 4 +- dist/locales/ar-SA.js | 2 +- dist/locales/ar.js | 2 +- dist/locales/de.js | 2 +- dist/locales/es.js | 2 +- dist/locales/fi.js | 2 +- dist/locales/fr.js | 2 +- dist/locales/it.js | 2 +- dist/locales/nl.js | 2 +- dist/locales/ro.js | 2 +- dist/locales/ru.js | 2 +- dist/locales/sl.js | 2 +- dist/locales/tr.js | 37 + dist/plugins/customDateFormat.js | 7 +- dist/plugins/fa-five.js | 2 +- dist/plugins/moment-parse.js | 2 +- package-lock.json | 3971 +++++++------- package.json | 9 +- src/docs/js/docs.js | 19 - src/docs/templates/index.html | 2 +- src/docs/templates/shell.html | 8 +- src/js/display/index.ts | 13 +- src/js/jQuery-provider.js | 2 +- src/js/tempus-dominus.ts | 5 +- src/nuget/TempusDominus.nuspec | 2 +- src/nuget/TempusDominus.scss.nuspec | 2 +- tsconfig.json | 7 +- types/tempus-dominus.d.ts | 6 +- types/tempus-dominus.esm.d.ts | 1255 +++++ types/tempus-dominus.esm.min.d.ts | 1255 +++++ types/tempus-dominus.min.d.ts | 1255 +++++ 44 files changed, 9809 insertions(+), 6041 deletions(-) create mode 100644 dist/locales/tr.js create mode 100644 types/tempus-dominus.esm.d.ts create mode 100644 types/tempus-dominus.esm.min.d.ts create mode 100644 types/tempus-dominus.min.d.ts diff --git a/README.md b/README.md index ae3356f6a..cb4929767 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Rate on Openbase](https://badges.openbase.com/js/rating/@eonasdan/tempus-dominus.svg)](https://openbase.com/js/@eonasdan/tempus-dominus?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) -# Tempus Dominus Date/Time Picker v6.1.2 +# Tempus Dominus Date/Time Picker v6.1.3 Tempus Dominus is a powerful and robust date time picker for javascript. Version 6 is another major rewrite over the previous version. V6 is written with modern browsers in mind and is written in typescript. Bootstrap, momentjs and jQuery are no longer required dependencies. Popper2 is all that is required for the picker to position correctly. If you still require jQuery (seriously, you should move off that asap) there's a jQuery provider that wraps the native js functions. diff --git a/build/change-version.js b/build/change-version.js index 969ce4411..790a6e7cf 100644 --- a/build/change-version.js +++ b/build/change-version.js @@ -79,4 +79,4 @@ async function main(args) { } } -main(process.argv.slice(2)) +main(process.argv.slice(2)).then() diff --git a/build/plugins.js b/build/plugins.js index 2eb3081a3..d38e9b255 100644 --- a/build/plugins.js +++ b/build/plugins.js @@ -1,55 +1,55 @@ -const rollup = require('rollup') -const genericRollup = require('./rollup-plugin.config') -const fs = require('fs') -const util = require('util') -const path = require('path') +const rollup = require('rollup'); +const genericRollup = require('./rollup-plugin.config'); +const fs = require('fs'); +const util = require('util'); +const path = require('path'); -const { promisify } = util +const { promisify } = util; -const promisifyReadDir = promisify(fs.readdir) -const formatName = n => n.replace(/\.ts/, '').replace(/-/g, '_') +const promisifyReadDir = promisify(fs.readdir); +const formatName = n => n.replace(/\.ts/, '').replace(/-/g, '_'); -const localePath = path.join(__dirname, '../src/locales') +const localePath = path.join(__dirname, '../src/locales'); async function build(option) { - const bundle = await rollup.rollup(option.input) - await bundle.write(option.output) + const bundle = await rollup.rollup(option.input); + await bundle.write(option.output); } (async () => { try { /* eslint-disable no-restricted-syntax, no-await-in-loop */ // We use await-in-loop to make rollup run sequentially to save on RAM - const locales = await promisifyReadDir(localePath) + const locales = await promisifyReadDir(localePath); for (const l of locales) { // run builds sequentially to limit RAM usage await build(genericRollup({ input: `./src/locales/${l}`, fileName: `./dist/locales/${l.replace('.ts', '.js')}`, name: `tempusDominus.locales.${formatName(l)}` - })) + })); } - const plugins = await promisifyReadDir(path.join(__dirname, '../src/plugins')) + const plugins = await promisifyReadDir(path.join(__dirname, '../src/plugins')); for (const plugin of plugins.filter(x => x !== 'examples')) { // run builds sequentially to limit RAM usage await build(genericRollup({ input: `./src/plugins/${plugin}/index.ts`, fileName: `./dist/plugins/${plugin}.js`, name: `tempusDominus.plugins.${formatName(plugin)}` - })) + })); } - const examplePlugins = await promisifyReadDir(path.join(__dirname, '../src/plugins/examples')) + const examplePlugins = await promisifyReadDir(path.join(__dirname, '../src/plugins/examples')); for (const plugin of examplePlugins.map(x => x.replace('.ts', ''))) { // run builds sequentially to limit RAM usage await build(genericRollup({ input: `./src/plugins/examples/${plugin}.ts`, fileName: `./dist/plugins/examples/${plugin}.js`, name: `tempusDominus.plugins.${formatName(plugin)}` - })) + })); } } catch (e) { - console.error(e) // eslint-disable-line no-console + console.error(e); // eslint-disable-line no-console } -})() +})(); diff --git a/build/rollup-plugin.config.js b/build/rollup-plugin.config.js index 04a8d8bd6..36c910e4b 100644 --- a/build/rollup-plugin.config.js +++ b/build/rollup-plugin.config.js @@ -1,6 +1,4 @@ -const typescript = require('rollup-plugin-typescript2'); //todo investigate why the other one doesn't work -//const typescript = require('@rollup/plugin-typescript'); -//import { terser } from "rollup-plugin-terser"; +const typescript = require('rollup-plugin-ts'); const banner = require('./banner.js'); const globals = { @@ -9,7 +7,7 @@ const globals = { }; module.exports = (config) => { - const { input, fileName, name } = config + const { input, fileName, name } = config; return { input: { input, @@ -18,8 +16,7 @@ module.exports = (config) => { ], plugins: [ typescript({ - declaration: true, - declarationDir: 'types' + tsconfig: resolvedConfig => ({ ...resolvedConfig, declaration: false, rootDir: "./src" }) }) ] }, @@ -31,5 +28,5 @@ module.exports = (config) => { globals, compact: true } - } -} \ No newline at end of file + }; +}; diff --git a/build/rollup.config.js b/build/rollup.config.js index 415cae796..d516f0c79 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -1,5 +1,4 @@ -//const typescript = require('rollup-plugin-typescript2'); //this doesn't produce map files correctly ...sigh -const typescript = require('@rollup/plugin-typescript'); +const typescript = require('rollup-plugin-ts'); import postcss from 'rollup-plugin-postcss'; import { terser } from "rollup-plugin-terser"; @@ -49,10 +48,7 @@ export default [ ], external: ['@popperjs/core'], plugins: [ - typescript({ - declaration: true, - declarationDir: 'types' - }) + typescript() ] }, { diff --git a/dist/css/tempus-dominus.min.css b/dist/css/tempus-dominus.min.css index 6d42a60d0..e7f02c8af 100644 --- a/dist/css/tempus-dominus.min.css +++ b/dist/css/tempus-dominus.min.css @@ -1 +1 @@ -.tempus-dominus-widget [data-action]:after,.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.tempus-dominus-widget{border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);display:none;list-style:none;padding:4px;width:19rem;z-index:9999}.tempus-dominus-widget.calendarWeeks{width:21rem}.tempus-dominus-widget.calendarWeeks .date-container-days{grid-auto-columns:12.5%;grid-template-areas:"a a a a a a a a"}.tempus-dominus-widget [data-action]{cursor:pointer}.tempus-dominus-widget [data-action]:after{content:attr(title)}.tempus-dominus-widget [data-action].disabled,.tempus-dominus-widget [data-action].disabled:hover{background:none;cursor:not-allowed}.tempus-dominus-widget .arrow{display:none}.tempus-dominus-widget.show{display:block}.tempus-dominus-widget .td-collapse:not(.show){display:none}.tempus-dominus-widget .td-collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (min-width:576px){.tempus-dominus-widget.timepicker-sbs{width:38em}}@media (min-width:768px){.tempus-dominus-widget.timepicker-sbs{width:38em}}@media (min-width:992px){.tempus-dominus-widget.timepicker-sbs{width:38em}}.tempus-dominus-widget.timepicker-sbs .td-row{display:flex}.tempus-dominus-widget.timepicker-sbs .td-row .td-half{flex:0 0 auto;width:50%}.tempus-dominus-widget div[data-action]:active{box-shadow:none}.tempus-dominus-widget .timepicker-hour,.tempus-dominus-widget .timepicker-minute,.tempus-dominus-widget .timepicker-second{font-size:1.2em;font-weight:700;margin:0;width:54px}.tempus-dominus-widget button[data-action]{padding:6px}.tempus-dominus-widget .toggleMeridiem{height:38px;text-align:center}.tempus-dominus-widget .calendar-header{display:grid;font-weight:700;grid-template-areas:"a a a";margin-bottom:10px}.tempus-dominus-widget .calendar-header .next{padding-right:10px;text-align:right}.tempus-dominus-widget .calendar-header .previous{padding-left:10px;text-align:left}.tempus-dominus-widget .calendar-header .picker-switch{text-align:center}.tempus-dominus-widget .toolbar{display:grid;grid-auto-flow:column;grid-auto-rows:40px}.tempus-dominus-widget .toolbar div{align-items:center;border-radius:999px;box-sizing:border-box;display:flex;justify-content:center}.tempus-dominus-widget .date-container-days{display:grid;grid-auto-columns:14.2857142857%;grid-auto-rows:40px;grid-template-areas:"a a a a a a a"}.tempus-dominus-widget .date-container-days .dow{align-items:center;justify-content:center;text-align:center}.tempus-dominus-widget .date-container-days .cw{align-items:center;cursor:default;display:flex;font-size:.8em;height:90%;justify-content:center;line-height:20px;width:90%}.tempus-dominus-widget .date-container-decades,.tempus-dominus-widget .date-container-months,.tempus-dominus-widget .date-container-years{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px);grid-template-areas:"a a a"}.tempus-dominus-widget .time-container-hour,.tempus-dominus-widget .time-container-minute,.tempus-dominus-widget .time-container-second{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px);grid-template-areas:"a a a a"}.tempus-dominus-widget .time-container-clock{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px)}.tempus-dominus-widget .time-container-clock .no-highlight{align-items:center;display:flex;height:90%;justify-content:center;width:90%}.tempus-dominus-widget .date-container-days div:not(.no-highlight),.tempus-dominus-widget .date-container-decades div:not(.no-highlight),.tempus-dominus-widget .date-container-months div:not(.no-highlight),.tempus-dominus-widget .date-container-years div:not(.no-highlight),.tempus-dominus-widget .time-container-clock div:not(.no-highlight),.tempus-dominus-widget .time-container-hour div:not(.no-highlight),.tempus-dominus-widget .time-container-minute div:not(.no-highlight),.tempus-dominus-widget .time-container-second div:not(.no-highlight){align-items:center;border-radius:999px;box-sizing:border-box;display:flex;height:90%;justify-content:center;width:90%}.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover{background:none;cursor:not-allowed}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today{position:relative}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before{border:solid transparent;border-width:0 0 7px 7px;bottom:6px;content:"";display:inline-block;position:absolute;right:6px}.tempus-dominus-widget .time-container{margin-bottom:.5rem}.tempus-dominus-widget button{border-radius:.25rem;cursor:pointer;display:inline-block;font-size:1rem;font-weight:400;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]{cursor:default;pointer-events:none}.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover{background:none}.tempus-dominus-widget.light{background-color:#fff;color:#000}.tempus-dominus-widget.light [data-action].disabled,.tempus-dominus-widget.light [data-action].disabled:hover{color:#6c757d}.tempus-dominus-widget.light .toolbar div:hover{background:#e9ecef}.tempus-dominus-widget.light .date-container-days .dow{color:rgba(0,0,0,.5)}.tempus-dominus-widget.light .date-container-days .cw{color:rgba(0,0,0,.38)}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight):hover,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight):hover,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight):hover,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight):hover{background:#e9ecef}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active{background-color:#0d6efd;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.old,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.old,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.old,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.old{color:#fff}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.today:before{border-bottom-color:#fff}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).old{color:rgba(0,0,0,.38)}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled:hover{color:#6c757d}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).today:before{border-bottom-color:#0d6efd;border-top-color:rgba(0,0,0,.2)}.tempus-dominus-widget.light button{background-color:#0d6efd;border-color:#0d6efd;color:#fff}.tempus-dominus-widget.dark{background-color:#1b1b1b;color:#e3e3e3}.tempus-dominus-widget.dark [data-action].disabled,.tempus-dominus-widget.dark [data-action].disabled:hover{color:#6c757d}.tempus-dominus-widget.dark .toolbar div:hover{background:#232627}.tempus-dominus-widget.dark .date-container-days .dow{color:hsla(36,10%,90%,.5)}.tempus-dominus-widget.dark .date-container-days .cw{color:hsla(36,10%,90%,.38)}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight):hover,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight):hover,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight):hover,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight):hover{background:#232627}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active{background-color:#4db2ff;color:#fff;text-shadow:0 -1px 0 hsla(36,10%,90%,.25)}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.old{color:#fff}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.today:before{border-bottom-color:#1b1b1b}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).old{color:hsla(36,10%,90%,.38)}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled:hover{color:#6c757d}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).today:before{border-bottom-color:#4db2ff;border-top-color:hsla(36,10%,90%,.2)}.tempus-dominus-widget.dark button{background-color:#4db2ff;border-color:#4db2ff;color:#fff} \ No newline at end of file +.tempus-dominus-widget [data-action]:after,.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.tempus-dominus-widget{border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);display:none;list-style:none;padding:4px;width:19rem;z-index:9999}.tempus-dominus-widget.calendarWeeks{width:21rem}.tempus-dominus-widget.calendarWeeks .date-container-days{grid-auto-columns:12.5%;grid-template-areas:"a a a a a a a a"}.tempus-dominus-widget [data-action]{cursor:pointer}.tempus-dominus-widget [data-action]:after{content:attr(title)}.tempus-dominus-widget [data-action].disabled,.tempus-dominus-widget [data-action].disabled:hover{background:none;cursor:not-allowed}.tempus-dominus-widget .arrow{display:none}.tempus-dominus-widget.show{display:block}.tempus-dominus-widget .td-collapse:not(.show){display:none}.tempus-dominus-widget .td-collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (min-width:576px){.tempus-dominus-widget.timepicker-sbs{width:38em}}@media (min-width:768px){.tempus-dominus-widget.timepicker-sbs{width:38em}}@media (min-width:992px){.tempus-dominus-widget.timepicker-sbs{width:38em}}.tempus-dominus-widget.timepicker-sbs .td-row{display:flex}.tempus-dominus-widget.timepicker-sbs .td-row .td-half{flex:0 0 auto;width:50%}.tempus-dominus-widget div[data-action]:active{box-shadow:none}.tempus-dominus-widget .timepicker-hour,.tempus-dominus-widget .timepicker-minute,.tempus-dominus-widget .timepicker-second{font-size:1.2em;font-weight:700;margin:0;width:54px}.tempus-dominus-widget button[data-action]{padding:6px}.tempus-dominus-widget .toggleMeridiem{height:38px;text-align:center}.tempus-dominus-widget .calendar-header{display:grid;font-weight:700;grid-template-areas:"a a a";margin-bottom:10px}.tempus-dominus-widget .calendar-header .next{padding-right:10px;text-align:right}.tempus-dominus-widget .calendar-header .previous{padding-left:10px;text-align:left}.tempus-dominus-widget .calendar-header .picker-switch{text-align:center}.tempus-dominus-widget .toolbar{display:grid;grid-auto-flow:column;grid-auto-rows:40px}.tempus-dominus-widget .toolbar div{align-items:center;border-radius:999px;box-sizing:border-box;display:flex;justify-content:center}.tempus-dominus-widget .date-container-days{display:grid;grid-auto-columns:14.2857142857%;grid-auto-rows:40px;grid-template-areas:"a a a a a a a"}.tempus-dominus-widget .date-container-days .dow{align-items:center;justify-content:center;text-align:center}.tempus-dominus-widget .date-container-days .cw{align-items:center;cursor:default;display:flex;font-size:.8em;height:90%;justify-content:center;line-height:20px;width:90%}.tempus-dominus-widget .date-container-decades,.tempus-dominus-widget .date-container-months,.tempus-dominus-widget .date-container-years{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px);grid-template-areas:"a a a"}.tempus-dominus-widget .time-container-hour,.tempus-dominus-widget .time-container-minute,.tempus-dominus-widget .time-container-second{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px);grid-template-areas:"a a a a"}.tempus-dominus-widget .time-container-clock{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px)}.tempus-dominus-widget .time-container-clock .no-highlight{align-items:center;display:flex;height:90%;justify-content:center;width:90%}.tempus-dominus-widget .date-container-days div:not(.no-highlight),.tempus-dominus-widget .date-container-decades div:not(.no-highlight),.tempus-dominus-widget .date-container-months div:not(.no-highlight),.tempus-dominus-widget .date-container-years div:not(.no-highlight),.tempus-dominus-widget .time-container-clock div:not(.no-highlight),.tempus-dominus-widget .time-container-hour div:not(.no-highlight),.tempus-dominus-widget .time-container-minute div:not(.no-highlight),.tempus-dominus-widget .time-container-second div:not(.no-highlight){align-items:center;border-radius:999px;box-sizing:border-box;display:flex;height:90%;justify-content:center;width:90%}.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover{background:none;cursor:not-allowed}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today{position:relative}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before{border:solid transparent;border-width:0 0 7px 7px;bottom:6px;content:"";display:inline-block;position:absolute;right:6px}.tempus-dominus-widget .time-container{margin-bottom:.5rem}.tempus-dominus-widget button{border-radius:.25rem;cursor:pointer;display:inline-block;font-size:1rem;font-weight:400;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod],.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second{cursor:default;pointer-events:none}.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second:hover{background:none}.tempus-dominus-widget.light{background-color:#fff;color:#000}.tempus-dominus-widget.light [data-action].disabled,.tempus-dominus-widget.light [data-action].disabled:hover{color:#6c757d}.tempus-dominus-widget.light .toolbar div:hover{background:#e9ecef}.tempus-dominus-widget.light .date-container-days .dow{color:rgba(0,0,0,.5)}.tempus-dominus-widget.light .date-container-days .cw{color:rgba(0,0,0,.38)}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight):hover,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight):hover,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight):hover,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight):hover,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight):hover{background:#e9ecef}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active{background-color:#0d6efd;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.old,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.old,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.old,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.new,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.old,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.new,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.old{color:#fff}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.today:before,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.today:before{border-bottom-color:#fff}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).old,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).new,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).old,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).new,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).old{color:rgba(0,0,0,.38)}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled:hover{color:#6c757d}.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).today:before{border-bottom-color:#0d6efd;border-top-color:rgba(0,0,0,.2)}.tempus-dominus-widget.light button{background-color:#0d6efd;border-color:#0d6efd;color:#fff}.tempus-dominus-widget.dark{background-color:#1b1b1b;color:#e3e3e3}.tempus-dominus-widget.dark [data-action].disabled,.tempus-dominus-widget.dark [data-action].disabled:hover{color:#6c757d}.tempus-dominus-widget.dark .toolbar div:hover{background:#232627}.tempus-dominus-widget.dark .date-container-days .dow{color:hsla(36,10%,90%,.5)}.tempus-dominus-widget.dark .date-container-days .cw{color:hsla(36,10%,90%,.38)}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight):hover,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight):hover,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight):hover,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight):hover,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight):hover{background:#232627}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active{background-color:#4db2ff;color:#fff;text-shadow:0 -1px 0 hsla(36,10%,90%,.25)}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.old,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.new,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.old{color:#fff}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.today:before,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.today:before{border-bottom-color:#1b1b1b}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).old,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).new,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).old,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).new,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).old{color:hsla(36,10%,90%,.38)}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled:hover{color:#6c757d}.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).today:before{border-bottom-color:#4db2ff;border-top-color:hsla(36,10%,90%,.2)}.tempus-dominus-widget.dark button{background-color:#4db2ff;border-color:#4db2ff;color:#fff} \ No newline at end of file diff --git a/dist/js/jQuery-provider.js b/dist/js/jQuery-provider.js index e8d4cc5b8..79660e641 100644 --- a/dist/js/jQuery-provider.js +++ b/dist/js/jQuery-provider.js @@ -2,7 +2,7 @@ /*global $, tempusDominus */ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2021 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/js/jQuery-provider.min.js b/dist/js/jQuery-provider.min.js index 30630e652..d0ff3da56 100644 --- a/dist/js/jQuery-provider.min.js +++ b/dist/js/jQuery-provider.min.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2021 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/js/tempus-dominus.esm.js b/dist/js/tempus-dominus.esm.js index 518f51629..1c0c742ea 100644 --- a/dist/js/tempus-dominus.esm.js +++ b/dist/js/tempus-dominus.esm.js @@ -1,33 +1,8 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - var Unit; (function (Unit) { Unit["seconds"] = "seconds"; @@ -362,13 +337,12 @@ class DateTime extends Date { * @param locale */ meridiem(locale = this.locale) { - var _a; - return (_a = new Intl.DateTimeFormat(locale, { + return new Intl.DateTimeFormat(locale, { hour: 'numeric', hour12: true }) .formatToParts(this) - .find((p) => p.type === 'dayPeriod')) === null || _a === void 0 ? void 0 : _a.value; + .find((p) => p.type === 'dayPeriod')?.value; } /** * Shortcut to Date.getDate() @@ -917,7 +891,6 @@ class Validation { * @param granularity */ isValid(targetDate, granularity) { - var _a; if (this.optionsStore.options.restrictions.disabledDates.length > 0 && this._isInDisabledDates(targetDate)) { return false; @@ -928,7 +901,7 @@ class Validation { } if (granularity !== Unit.month && granularity !== Unit.year && - ((_a = this.optionsStore.options.restrictions.daysOfWeekDisabled) === null || _a === void 0 ? void 0 : _a.length) > 0 && + this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 && this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { return false; } @@ -1369,7 +1342,7 @@ class OptionConverter { if (value && !(value instanceof HTMLElement || value instanceof Element || - (value === null || value === void 0 ? void 0 : value.appendChild))) { + value?.appendChild)) { Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement'); } return value; @@ -1396,20 +1369,19 @@ class OptionConverter { } } static _mergeOptions(providedOptions, mergeTo) { - var _a; const newConfig = OptionConverter.deepCopy(mergeTo); //see if the options specify a locale - const localization = ((_a = mergeTo.localization) === null || _a === void 0 ? void 0 : _a.locale) !== 'default' + const localization = mergeTo.localization?.locale !== 'default' ? mergeTo.localization - : (providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.localization) || DefaultOptions.localization; + : providedOptions?.localization || DefaultOptions.localization; OptionConverter.spread(providedOptions, newConfig, '', localization); return newConfig; } static _dataToOptions(element, options) { const eData = JSON.parse(JSON.stringify(element.dataset)); - if (eData === null || eData === void 0 ? void 0 : eData.tdTargetInput) + if (eData?.tdTargetInput) delete eData.tdTargetInput; - if (eData === null || eData === void 0 ? void 0 : eData.tdTargetToggle) + if (eData?.tdTargetToggle) delete eData.tdTargetToggle; if (!eData || Object.keys(eData).length === 0 || @@ -1496,7 +1468,6 @@ class OptionConverter { * @param localization */ static _typeCheckDateArray(optionName, value, providedType, localization) { - var _a; if (!Array.isArray(value)) { Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of DateTime or Date'); } @@ -1506,7 +1477,7 @@ class OptionConverter { if (!dateTime) { Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); } - dateTime.setLocale((_a = localization === null || localization === void 0 ? void 0 : localization.locale) !== null && _a !== void 0 ? _a : 'default'); + dateTime.setLocale(localization?.locale ?? 'default'); value[i] = dateTime; } } @@ -1739,7 +1710,7 @@ class Dates { if (this.optionsStore.input.value != newValue) this.optionsStore.input.value = newValue; }; - if (target && (oldDate === null || oldDate === void 0 ? void 0 : oldDate.isSame(target))) { + if (target && oldDate?.isSame(target)) { updateInput(); return; } @@ -2640,12 +2611,11 @@ class Display { * @param e MouseEvent */ this._documentClickEvent = (e) => { - var _a; if (this.optionsStore.options.debug || window.debug) return; if (this._isVisible && !e.composedPath().includes(this.widget) && // click inside the widget - !((_a = e.composedPath()) === null || _a === void 0 ? void 0 : _a.includes(this.optionsStore.element)) // click on the element + !e.composedPath()?.includes(this.optionsStore.element) // click on the element ) { this.hide(); } @@ -2758,7 +2728,6 @@ class Display { * fires Events#show */ show() { - var _a, _b; if (this.widget == undefined) { if (this.dates.picked.length == 0) { if (this.optionsStore.options.useCurrent && @@ -2767,7 +2736,7 @@ class Display { if (!this.optionsStore.options.keepInvalid) { let tries = 0; let direction = 1; - if ((_a = this.optionsStore.options.restrictions.maxDate) === null || _a === void 0 ? void 0 : _a.isBefore(date)) { + if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) { direction = -1; } while (!this.validation.isValid(date)) { @@ -2817,7 +2786,7 @@ class Display { } if (!this.optionsStore.options.display.inline) { // If needed to change the parent container - const container = ((_b = this.optionsStore.options) === null || _b === void 0 ? void 0 : _b.container) || document.body; + const container = this.optionsStore.options?.container || document.body; container.appendChild(this.widget); this.createPopup(this.optionsStore.element, this.widget, { modifiers: [{ name: 'eventListeners', enabled: true }], @@ -2853,15 +2822,21 @@ class Display { this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show }); this._isVisible = true; } - createPopup(element, widget, options) { - return __awaiter(this, void 0, void 0, function* () { - const { createPopper } = yield import('@popperjs/core'); - this._popperInstance = createPopper(element, widget, options); - }); + async createPopup(element, widget, options) { + let createPopperFunction; + if (window?.Popper) { + createPopperFunction = window?.Popper?.createPopper; + } + else { + const { createPopper } = await import('@popperjs/core'); + createPopperFunction = createPopper; + } + if (createPopperFunction) { + this._popperInstance = createPopperFunction(element, widget, options); + } } updatePopup() { - var _a; - (_a = this._popperInstance) === null || _a === void 0 ? void 0 : _a.update(); + this._popperInstance?.update(); } /** * Changes the calendar view mode. E.g. month <-> year @@ -3229,11 +3204,10 @@ class Actions { * @param action If not provided, then look for a [data-action] */ do(e, action) { - var _a, _b; - const currentTarget = e === null || e === void 0 ? void 0 : e.currentTarget; - if ((_a = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.classList) === null || _a === void 0 ? void 0 : _a.contains(Namespace.css.disabled)) + const currentTarget = e?.currentTarget; + if (currentTarget?.classList?.contains(Namespace.css.disabled)) return false; - action = action || ((_b = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.dataset) === null || _b === void 0 ? void 0 : _b.action); + action = action || currentTarget?.dataset?.action; const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate) .clone; switch (action) { @@ -3468,7 +3442,7 @@ class TempusDominus { * @private */ this._inputChangeEvent = (event) => { - const internallyTriggered = event === null || event === void 0 ? void 0 : event.detail; + const internallyTriggered = event?.detail; if (internallyTriggered) return; const setViewDate = () => { @@ -3484,7 +3458,7 @@ class TempusDominus { } setViewDate(); } - catch (_a) { + catch { console.warn('TD: Something went wrong trying to set the multipleDates values from the input field.'); } } @@ -3499,8 +3473,7 @@ class TempusDominus { * @private */ this._toggleClickEvent = () => { - var _a, _b; - if (((_a = this.optionsStore.element) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.disabled)) + if (this.optionsStore.element?.disabled || this.optionsStore.input?.disabled) return; this.toggle(); }; @@ -3579,11 +3552,10 @@ class TempusDominus { * @public */ disable() { - var _a; this._isDisabled = true; // todo this might be undesired. If a dev disables the input field to // only allow using the picker, this will break that. - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled'); + this.optionsStore.input?.setAttribute('disabled', 'disabled'); this.display.hide(); } // noinspection JSUnusedGlobalSymbols @@ -3592,9 +3564,8 @@ class TempusDominus { * @public */ enable() { - var _a; this._isDisabled = false; - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeAttribute('disabled'); + this.optionsStore.input?.removeAttribute('disabled'); } // noinspection JSUnusedGlobalSymbols /** @@ -3647,15 +3618,14 @@ class TempusDominus { * Hides the picker and removes event listeners */ dispose() { - var _a, _b, _c; this.display.hide(); // this will clear the document click event listener this.display._dispose(); - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._inputChangeEvent); + this.optionsStore.input?.removeEventListener('change', this._inputChangeEvent); if (this.optionsStore.options.allowInputToggle) { - (_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this._toggleClickEvent); + this.optionsStore.input?.removeEventListener('click', this._toggleClickEvent); } - (_c = this._toggle) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', this._toggleClickEvent); + this._toggle?.removeEventListener('click', this._toggleClickEvent); this._subscribers = {}; } /** @@ -3678,7 +3648,6 @@ class TempusDominus { * @private */ _triggerEvent(event) { - var _a, _b; event.viewMode = this.optionsStore.currentView; const isChangeEvent = event.type === Namespace.events.change; if (isChangeEvent) { @@ -3688,8 +3657,8 @@ class TempusDominus { return; } this._handleAfterChangeEvent(event); - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(event.type, { detail: event })); - (_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.dispatchEvent(new CustomEvent('change', { detail: event })); + this.optionsStore.input?.dispatchEvent(new CustomEvent(event.type, { detail: event })); + this.optionsStore.input?.dispatchEvent(new CustomEvent('change', { detail: event })); } this.optionsStore.element.dispatchEvent(new CustomEvent(event.type, { detail: event })); if (window.jQuery) { @@ -3734,7 +3703,6 @@ class TempusDominus { * @private */ _initializeOptions(config, mergeTo, includeDataset = false) { - var _a, _b; let newConfig = OptionConverter.deepCopy(config); newConfig = OptionConverter._mergeOptions(newConfig, mergeTo); if (includeDataset) @@ -3763,11 +3731,11 @@ class TempusDominus { newConfig.display.viewMode) { this.optionsStore.currentCalendarViewMode = Math.max(CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode), this.optionsStore.minimumCalendarViewMode); } - if ((_a = this.display) === null || _a === void 0 ? void 0 : _a.isVisible) { + if (this.display?.isVisible) { this.display._update('all'); } if (newConfig.display.components.useTwentyfourHour === undefined) { - newConfig.display.components.useTwentyfourHour = !!!((_b = newConfig.viewDate.parts()) === null || _b === void 0 ? void 0 : _b.dayPeriod); + newConfig.display.components.useTwentyfourHour = !!!newConfig.viewDate.parts()?.dayPeriod; } this.optionsStore.options = newConfig; } @@ -3824,7 +3792,6 @@ class TempusDominus { * @private */ _handleAfterChangeEvent(e) { - var _a, _b; if ( // options is disabled !this.optionsStore.options.promptTimeOnDateChange || @@ -3832,15 +3799,16 @@ class TempusDominus { this.optionsStore.options.display.sideBySide || // time is disabled !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))) + this.display.widget + ?.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. // or date didn't change (time did) or date changed because time did. if ((!e.oldDate && this.optionsStore.options.useCurrent) || - (e.oldDate && ((_b = e.date) === null || _b === void 0 ? void 0 : _b.isSame(e.oldDate)))) { + (e.oldDate && e.date?.isSame(e.oldDate))) { return; } clearTimeout(this._currentPromptTimeTimeout); @@ -3898,7 +3866,7 @@ const extend = function (plugin, option) { } return tempusDominus; }; -const version = '6.1.2'; +const version = '6.1.3'; const tempusDominus = { TempusDominus, extend, diff --git a/dist/js/tempus-dominus.esm.js.map b/dist/js/tempus-dominus.esm.js.map index 1c9d5309b..9cc52c751 100644 --- a/dist/js/tempus-dominus.esm.js.map +++ b/dist/js/tempus-dominus.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"tempus-dominus.esm.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/js/datetime.ts","../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/service-locator.ts","../../src/js/utilities/calendar-modes.ts","../../src/js/utilities/optionsStore.ts","../../src/js/validation.ts","../../src/js/utilities/event-emitter.ts","../../src/js/utilities/default-options.ts","../../src/js/utilities/optionConverter.ts","../../src/js/dates.ts","../../src/js/utilities/action-types.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.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/collapse.ts","../../src/js/display/index.ts","../../src/js/actions.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export enum Unit {\r\n seconds = 'seconds',\r\n minutes = 'minutes',\r\n hours = 'hours',\r\n date = 'date',\r\n month = 'month',\r\n year = 'year',\r\n}\r\n\r\nconst twoDigitTemplate = {\r\n month: '2-digit',\r\n day: '2-digit',\r\n year: 'numeric',\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n second: '2-digit',\r\n hour12: true,\r\n}\r\n\r\nconst twoDigitTwentyFourTemplate = {\r\n hour: '2-digit',\r\n hour12: false\r\n}\r\n\r\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\r\n timeStyle?: 'short' | 'medium' | 'long';\r\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\r\n numberingSystem?: string;\r\n}\r\n\r\nexport const getFormatByUnit = (unit: Unit): object => {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric'\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n};\r\n\r\n/**\r\n * For the most part this object behaves exactly the same way\r\n * as the native Date object with a little extra spice.\r\n */\r\nexport class DateTime extends Date {\r\n /**\r\n * Used with Intl.DateTimeFormat\r\n */\r\n locale = 'default';\r\n\r\n /**\r\n * Chainable way to set the {@link locale}\r\n * @param value\r\n */\r\n setLocale(value: string): this {\r\n this.locale = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts a plain JS date object to a DateTime object.\r\n * Doing this allows access to format, etc.\r\n * @param date\r\n * @param locale\r\n */\r\n static convert(date: Date, locale: string = 'default'): DateTime {\r\n if (!date) throw new Error(`A date is required`);\r\n return new DateTime(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n ).setLocale(locale);\r\n }\r\n\r\n /**\r\n * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates.\r\n * @param input\r\n * @param localization\r\n */\r\n static fromString(input: string, localization: any): DateTime {\r\n return new DateTime(input);\r\n }\r\n\r\n /**\r\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\r\n */\r\n get clone() {\r\n return new DateTime(\r\n this.year,\r\n this.month,\r\n this.date,\r\n this.hours,\r\n this.minutes,\r\n this.seconds,\r\n this.getMilliseconds()\r\n ).setLocale(this.locale);\r\n }\r\n\r\n /**\r\n * Sets the current date to the start of the {@link unit} provided\r\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')\r\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\r\n * @param unit\r\n * @param startOfTheWeek Allows for the changing the start of the week.\r\n */\r\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(0);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(0, 0);\r\n break;\r\n case 'hours':\r\n this.setMinutes(0, 0, 0);\r\n break;\r\n case 'date':\r\n this.setHours(0, 0, 0, 0);\r\n break;\r\n case 'weekDay':\r\n this.startOf(Unit.date);\r\n if (this.weekDay === startOfTheWeek) break;\r\n let goBack = this.weekDay;\r\n if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek;\r\n this.manipulate(startOfTheWeek - goBack, Unit.date);\r\n break;\r\n case 'month':\r\n this.startOf(Unit.date);\r\n this.setDate(1);\r\n break;\r\n case 'year':\r\n this.startOf(Unit.date);\r\n this.setMonth(0, 1);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the current date to the end of the {@link unit} provided\r\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')\r\n * would return April 30, 2021, 11:59:59.999 PM\r\n * @param unit\r\n * @param startOfTheWeek\r\n */\r\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(999);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(59, 999);\r\n break;\r\n case 'hours':\r\n this.setMinutes(59, 59, 999);\r\n break;\r\n case 'date':\r\n this.setHours(23, 59, 59, 999);\r\n break;\r\n case 'weekDay':\r\n this.endOf(Unit.date);\r\n this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date);\r\n break;\r\n case 'month':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.month);\r\n this.setDate(0);\r\n break;\r\n case 'year':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.year);\r\n this.setDate(0);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Change a {@link unit} value. Value can be positive or negative\r\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')\r\n * would return May 30, 2021, 11:45:32.984 AM\r\n * @param value A positive or negative number\r\n * @param unit\r\n */\r\n manipulate(value: number, unit: Unit): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n this[unit] += value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a string format.\r\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\r\n * for valid templates and locale objects\r\n * @param template An object. Uses browser defaults otherwise.\r\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\r\n */\r\n format(template: DateTimeFormatOptions, locale = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, template).format(this);\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is before this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isBefore(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() < compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is after this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isAfter(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() > compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is same this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isSame(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() === compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n compare = DateTime.convert(compare);\r\n return (\r\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\r\n * @param left\r\n * @param right\r\n * @param unit.\r\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\r\n * If the inclusivity parameter is used, both indicators must be passed.\r\n */\r\n isBetween(\r\n left: DateTime,\r\n right: DateTime,\r\n unit?: Unit,\r\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\r\n ): boolean {\r\n if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n const leftInclusivity = inclusivity[0] === '(';\r\n const rightInclusivity = inclusivity[1] === ')';\r\n\r\n return (\r\n ((leftInclusivity\r\n ? this.isAfter(left, unit)\r\n : !this.isBefore(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isBefore(right, unit)\r\n : !this.isAfter(right, unit))) ||\r\n ((leftInclusivity\r\n ? this.isBefore(left, unit)\r\n : !this.isAfter(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isAfter(right, unit)\r\n : !this.isBefore(right, unit)))\r\n );\r\n }\r\n\r\n /**\r\n * Returns flattened object of the date. Does not include literals\r\n * @param locale\r\n * @param template\r\n */\r\n parts(\r\n locale = this.locale,\r\n template: any = { dateStyle: 'full', timeStyle: 'long' }\r\n ): any {\r\n const parts = {};\r\n new Intl.DateTimeFormat(locale, template)\r\n .formatToParts(this)\r\n .filter((x) => x.type !== 'literal')\r\n .forEach((x) => (parts[x.type] = x.value));\r\n return parts;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getSeconds()\r\n */\r\n get seconds(): number {\r\n return this.getSeconds();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setSeconds()\r\n */\r\n set seconds(value: number) {\r\n this.setSeconds(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get secondsFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).second;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMinutes()\r\n */\r\n get minutes(): number {\r\n return this.getMinutes();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMinutes()\r\n */\r\n set minutes(value: number) {\r\n this.setMinutes(value);\r\n }\r\n\r\n /**\r\n * Returns two digit minutes\r\n */\r\n get minutesFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).minute;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getHours()\r\n */\r\n get hours(): number {\r\n return this.getHours();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setHours()\r\n */\r\n set hours(value: number) {\r\n this.setHours(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get hoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTwentyFourTemplate).hour;\r\n }\r\n\r\n /**\r\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\r\n */\r\n get twelveHoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).hour;\r\n }\r\n\r\n /**\r\n * Get the meridiem of the date. E.g. AM or PM.\r\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\r\n * otherwise it will return AM or PM.\r\n * @param locale\r\n */\r\n meridiem(locale: string = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, {\r\n hour: 'numeric',\r\n hour12: true\r\n } as any)\r\n .formatToParts(this)\r\n .find((p) => p.type === 'dayPeriod')?.value;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDate()\r\n */\r\n get date(): number {\r\n return this.getDate();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setDate()\r\n */\r\n set date(value: number) {\r\n this.setDate(value);\r\n }\r\n\r\n /**\r\n * Return two digit date\r\n */\r\n get dateFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).day;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDay()\r\n */\r\n get weekDay(): number {\r\n return this.getDay();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMonth()\r\n */\r\n get month(): number {\r\n return this.getMonth();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMonth()\r\n */\r\n set month(value: number) {\r\n const targetMonth = new Date(this.year, value + 1);\r\n targetMonth.setDate(0);\r\n const endOfMonth = targetMonth.getDate();\r\n if (this.date > endOfMonth) {\r\n this.date = endOfMonth;\r\n }\r\n this.setMonth(value);\r\n }\r\n\r\n /**\r\n * Return two digit, human expected month. E.g. January = 1, December = 12\r\n */\r\n get monthFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).month;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getFullYear()\r\n */\r\n get year(): number {\r\n return this.getFullYear();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setFullYear()\r\n */\r\n set year(value: number) {\r\n this.setFullYear(value);\r\n }\r\n\r\n // borrowed a bunch of stuff from Luxon\r\n /**\r\n * Gets the week of the year\r\n */\r\n get week(): number {\r\n const ordinal = this.computeOrdinal(),\r\n weekday = this.getUTCDay();\r\n\r\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\r\n\r\n if (weekNumber < 1) {\r\n weekNumber = this.weeksInWeekYear(this.year - 1);\r\n } else if (weekNumber > this.weeksInWeekYear(this.year)) {\r\n weekNumber = 1;\r\n }\r\n\r\n return weekNumber;\r\n }\r\n\r\n weeksInWeekYear(weekYear) {\r\n const p1 =\r\n (weekYear +\r\n Math.floor(weekYear / 4) -\r\n Math.floor(weekYear / 100) +\r\n Math.floor(weekYear / 400)) %\r\n 7,\r\n last = weekYear - 1,\r\n p2 =\r\n (last +\r\n Math.floor(last / 4) -\r\n Math.floor(last / 100) +\r\n Math.floor(last / 400)) %\r\n 7;\r\n return p1 === 4 || p2 === 3 ? 53 : 52;\r\n }\r\n\r\n get isLeapYear() {\r\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\r\n }\r\n\r\n private computeOrdinal() {\r\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\r\n }\r\n\r\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\r\n}\r\n","export class TdError extends Error {\r\n code: number;\r\n}\r\n\r\nexport class ErrorMessages {\r\n private base = 'TD:';\r\n\r\n //#region out to console\r\n\r\n /**\r\n * Throws an error indicating that a key in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOption(optionName: string) {\r\n const error = new TdError(\r\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\r\n );\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error indicating that one more keys in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOptions(optionName: string[]) {\r\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option is provide an unsupported value.\r\n * For example a value of 'cheese' for toolbarPlacement which only supports\r\n * 'top', 'bottom', 'default'.\r\n * @param optionName\r\n * @param badValue\r\n * @param validOptions\r\n */\r\n unexpectedOptionValue(\r\n optionName: string,\r\n badValue: string,\r\n validOptions: string[]\r\n ) {\r\n const error = new TdError(\r\n `${\r\n this.base\r\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\r\n ', '\r\n )}`\r\n );\r\n error.code = 2;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is the wrong type.\r\n * For example a string value was provided to multipleDates which only\r\n * supports true or false.\r\n * @param optionName\r\n * @param badType\r\n * @param expectedType\r\n */\r\n typeMismatch(optionName: string, badType: string, expectedType: string) {\r\n const error = new TdError(\r\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\r\n );\r\n error.code = 3;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is outside of the expected range.\r\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\r\n * @param optionName\r\n * @param lower\r\n * @param upper\r\n */\r\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\r\n const error = new TdError(\r\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\r\n );\r\n error.code = 4;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when a value for a date options couldn't be parsed. Either\r\n * the option was an invalid string or an invalid Date object.\r\n * @param optionName\r\n * @param date\r\n * @param soft If true, logs a warning instead of an error.\r\n */\r\n failedToParseDate(optionName: string, date: any, soft = false) {\r\n const error = new TdError(\r\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\r\n );\r\n error.code = 5;\r\n if (!soft) throw error;\r\n console.warn(error);\r\n }\r\n\r\n /**\r\n * Throws when an element to attach to was not provided in the constructor.\r\n */\r\n mustProvideElement() {\r\n const error = new TdError(`${this.base} No element was provided.`);\r\n error.code = 6;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if providing an array for the events to subscribe method doesn't have\r\n * the same number of callbacks. E.g., subscribe([1,2], [1])\r\n */\r\n subscribeMismatch() {\r\n const error = new TdError(\r\n `${this.base} The subscribed events does not match the number of callbacks`\r\n );\r\n error.code = 7;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\r\n */\r\n conflictingConfiguration(message?: string) {\r\n const error = new TdError(\r\n `${this.base} A configuration value conflicts with another rule. ${message}`\r\n );\r\n error.code = 8;\r\n throw error;\r\n }\r\n\r\n /**\r\n * customDateFormat errors\r\n */\r\n customDateFormatError(message?: string) {\r\n const error = new TdError(\r\n `${this.base} customDateFormat: ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Logs a warning if a date option value is provided as a string, instead of\r\n * a date/datetime object.\r\n */\r\n dateString() {\r\n console.warn(\r\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`\r\n );\r\n }\r\n\r\n throwError(message) {\r\n const error = new TdError(\r\n `${this.base} ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region used with notify.error\r\n\r\n /**\r\n * Used with an Error Event type if the user selects a date that\r\n * fails restriction validation.\r\n */\r\n failedToSetInvalidDate = 'Failed to set invalid date';\r\n\r\n /**\r\n * Used with an Error Event type when a user changes the value of the\r\n * input field directly, and does not provide a valid date.\r\n */\r\n failedToParseInput = 'Failed parse input field';\r\n\r\n //#endregion\r\n}\r\n","import { ErrorMessages } from './errors';\r\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\r\nconst NAME = 'tempus-dominus',\r\n dataKey = 'td';\r\n\r\n/**\r\n * Events\r\n */\r\nclass Events {\r\n key = `.${dataKey}`;\r\n\r\n /**\r\n * Change event. Fired when the user selects a date.\r\n * See also EventTypes.ChangeEvent\r\n */\r\n change = `change${this.key}`;\r\n\r\n /**\r\n * Emit when the view changes for example from month view to the year view.\r\n * See also EventTypes.ViewUpdateEvent\r\n */\r\n update = `update${this.key}`;\r\n\r\n /**\r\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\r\n * See also EventTypes.FailEvent\r\n */\r\n error = `error${this.key}`;\r\n\r\n /**\r\n * Show event\r\n * @event Events#show\r\n */\r\n show = `show${this.key}`;\r\n\r\n /**\r\n * Hide event\r\n * @event Events#hide\r\n */\r\n hide = `hide${this.key}`;\r\n\r\n // blur and focus are used in the jQuery provider but are otherwise unused.\r\n // keyup/down will be used later for keybinding options\r\n\r\n blur = `blur${this.key}`;\r\n focus = `focus${this.key}`;\r\n keyup = `keyup${this.key}`;\r\n keydown = `keydown${this.key}`;\r\n}\r\n\r\nclass Css {\r\n /**\r\n * The outer element for the widget.\r\n */\r\n widget = `${NAME}-widget`;\r\n\r\n /**\r\n * Hold the previous, next and switcher divs\r\n */\r\n calendarHeader = 'calendar-header';\r\n\r\n /**\r\n * The element for the action to change the calendar view. E.g. month -> year.\r\n */\r\n switch = 'picker-switch';\r\n\r\n /**\r\n * The elements for all the toolbar options\r\n */\r\n toolbar = 'toolbar';\r\n\r\n /**\r\n * Disables the hover and rounding affect.\r\n */\r\n noHighlight = 'no-highlight';\r\n\r\n /**\r\n * Applied to the widget element when the side by side option is in use.\r\n */\r\n sideBySide = 'timepicker-sbs';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> July\r\n */\r\n previous = 'previous';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> September\r\n */\r\n next = 'next';\r\n\r\n /**\r\n * Applied to any action that would violate any restriction options. ALso applied\r\n * to an input field if the disabled function is called.\r\n */\r\n disabled = 'disabled';\r\n\r\n /**\r\n * Applied to any date that is less than requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n old = 'old';\r\n\r\n /**\r\n * Applied to any date that is greater than of requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n new = 'new';\r\n\r\n /**\r\n * Applied to any date that is currently selected.\r\n */\r\n active = 'active';\r\n\r\n //#region date element\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n dateContainer = 'date-container';\r\n\r\n /**\r\n * The outer element for the decades view.\r\n */\r\n decadesContainer = `${this.dateContainer}-decades`;\r\n\r\n /**\r\n * Applied to elements within the decades container, e.g. 2020, 2030\r\n */\r\n decade = 'decade';\r\n\r\n /**\r\n * The outer element for the years view.\r\n */\r\n yearsContainer = `${this.dateContainer}-years`;\r\n\r\n /**\r\n * Applied to elements within the years container, e.g. 2021, 2021\r\n */\r\n year = 'year';\r\n\r\n /**\r\n * The outer element for the month view.\r\n */\r\n monthsContainer = `${this.dateContainer}-months`;\r\n\r\n /**\r\n * Applied to elements within the month container, e.g. January, February\r\n */\r\n month = 'month';\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n daysContainer = `${this.dateContainer}-days`;\r\n\r\n /**\r\n * Applied to elements within the day container, e.g. 1, 2..31\r\n */\r\n day = 'day';\r\n\r\n /**\r\n * If display.calendarWeeks is enabled, a column displaying the week of year\r\n * is shown. This class is applied to each cell in that column.\r\n */\r\n calendarWeeks = 'cw';\r\n\r\n /**\r\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\r\n */\r\n dayOfTheWeek = 'dow';\r\n\r\n /**\r\n * Applied to the current date on the calendar view.\r\n */\r\n today = 'today';\r\n\r\n /**\r\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\r\n */\r\n weekend = 'weekend';\r\n\r\n //#endregion\r\n\r\n //#region time element\r\n\r\n /**\r\n * The outer element for all time related elements.\r\n */\r\n timeContainer = 'time-container';\r\n\r\n /**\r\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\r\n */\r\n separator = 'separator';\r\n\r\n /**\r\n * The outer element for the clock view.\r\n */\r\n clockContainer = `${this.timeContainer}-clock`;\r\n\r\n /**\r\n * The outer element for the hours selection view.\r\n */\r\n hourContainer = `${this.timeContainer}-hour`;\r\n\r\n /**\r\n * The outer element for the minutes selection view.\r\n */\r\n minuteContainer = `${this.timeContainer}-minute`;\r\n\r\n /**\r\n * The outer element for the seconds selection view.\r\n */\r\n secondContainer = `${this.timeContainer}-second`;\r\n\r\n /**\r\n * Applied to each element in the hours selection view.\r\n */\r\n hour = 'hour';\r\n\r\n /**\r\n * Applied to each element in the minutes selection view.\r\n */\r\n minute = 'minute';\r\n\r\n /**\r\n * Applied to each element in the seconds selection view.\r\n */\r\n second = 'second';\r\n\r\n /**\r\n * Applied AM/PM toggle button.\r\n */\r\n toggleMeridiem = 'toggleMeridiem';\r\n\r\n //#endregion\r\n\r\n //#region collapse\r\n\r\n /**\r\n * Applied the element of the current view mode, e.g. calendar or clock.\r\n */\r\n show = 'show';\r\n\r\n /**\r\n * Applied to the currently showing view mode during a transition\r\n * between calendar and clock views\r\n */\r\n collapsing = 'td-collapsing';\r\n\r\n /**\r\n * Applied to the currently hidden view mode.\r\n */\r\n collapse = 'td-collapse';\r\n\r\n //#endregion\r\n\r\n /**\r\n * Applied to the widget when the option display.inline is enabled.\r\n */\r\n inline = 'inline';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is light.\r\n */\r\n lightTheme = 'light';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is dark.\r\n */\r\n darkTheme = 'dark';\r\n\r\n /**\r\n * Used for detecting if the system color preference is dark mode\r\n */\r\n isDarkPreferredQuery = '(prefers-color-scheme: dark)';\r\n}\r\n\r\nexport default class Namespace {\r\n static NAME = NAME;\r\n // noinspection JSUnusedGlobalSymbols\r\n static dataKey = dataKey;\r\n\r\n static events = new Events();\r\n\r\n static css = new Css();\r\n\r\n static errorMessages = new ErrorMessages();\r\n}\r\n","export declare type Constructable = new (...args: any[]) => T;\r\n\r\nclass ServiceLocator {\r\n private cache: Map, unknown | Symbol> = new Map();\r\n\r\n locate(identifier: Constructable): T {\r\n const service = this.cache.get(identifier);\r\n if (service) return service as T;\r\n const value = new identifier();\r\n this.cache.set(identifier, value);\r\n return value;\r\n }\r\n}\r\nexport const setupServiceLocator = () => {\r\n serviceLocator = new ServiceLocator();\r\n}\r\n\r\nexport let serviceLocator: ServiceLocator;\r\n","import { Unit } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\n\nconst CalendarModes: {\n name: keyof ViewMode;\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 default CalendarModes;\n","import {DateTime} from \"../datetime\";\r\nimport CalendarModes from \"./calendar-modes\";\r\nimport ViewMode from \"./view-mode\";\r\nimport Options from \"./options\";\r\n\r\nexport class OptionsStore {\r\n options: Options;\r\n element: HTMLElement;\r\n viewDate = new DateTime();\r\n input: HTMLInputElement;\r\n unset: boolean;\r\n private _currentCalendarViewMode = 0;\r\n get currentCalendarViewMode() {\r\n return this._currentCalendarViewMode;\r\n }\r\n\r\n set currentCalendarViewMode(value) {\r\n this._currentCalendarViewMode = value;\r\n this.currentView = CalendarModes[value].name;\r\n }\r\n\r\n /**\r\n * When switching back to the calendar from the clock,\r\n * this sets currentView to the correct calendar view.\r\n */\r\n refreshCurrentView() {\r\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\r\n }\r\n\r\n minimumCalendarViewMode = 0;\r\n currentView: keyof ViewMode = 'calendar';\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\n\r\n/**\r\n * Main class for date validation rules based on the options provided.\r\n */\r\nexport default class Validation {\r\n private optionsStore: OptionsStore;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n }\r\n\r\n /**\r\n * Checks to see if the target date is valid based on the rules provided in the options.\r\n * Granularity can be provided to check portions of the date instead of the whole.\r\n * @param targetDate\r\n * @param granularity\r\n */\r\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\r\n if (\r\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\r\n this._isInDisabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\r\n !this._isInEnabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n granularity !== Unit.month &&\r\n granularity !== Unit.year &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\r\n targetDate.weekDay\r\n ) !== -1\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.optionsStore.options.restrictions.minDate &&\r\n targetDate.isBefore(\r\n this.optionsStore.options.restrictions.minDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.maxDate &&\r\n targetDate.isAfter(\r\n this.optionsStore.options.restrictions.maxDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n granularity === Unit.hours ||\r\n granularity === Unit.minutes ||\r\n granularity === Unit.seconds\r\n ) {\r\n if (\r\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\r\n this._isInDisabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\r\n !this._isInEnabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0\r\n ) {\r\n for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) {\r\n if (\r\n targetDate.isBetween(\r\n disabledTimeIntervals.from,\r\n disabledTimeIntervals.to\r\n )\r\n )\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledDates ||\r\n this.optionsStore.options.restrictions.disabledDates.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.disabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledDates ||\r\n this.optionsStore.options.restrictions.enabledDates.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.enabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledHours ||\r\n this.optionsStore.options.restrictions.disabledHours.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.disabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledHours ||\r\n this.optionsStore.options.restrictions.enabledHours.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.enabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n}\r\n","import { Unit } from '../datetime';\r\nimport ActionTypes from './action-types';\r\nimport { BaseEvent } from './event-types';\r\n\r\nexport type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all';\r\n\r\nexport class EventEmitter {\r\n private subscribers: ((value?: T) => void)[] = [];\r\n\r\n subscribe(callback: (value: T) => void) {\r\n this.subscribers.push(callback);\r\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\r\n }\r\n\r\n unsubscribe(index: number) {\r\n this.subscribers.splice(index, 1);\r\n }\r\n\r\n emit(value?: T) {\r\n this.subscribers.forEach((callback) => {\r\n callback(value);\r\n });\r\n }\r\n\r\n destroy() {\r\n this.subscribers = null;\r\n this.subscribers = [];\r\n }\r\n}\r\n\r\nexport class EventEmitters {\r\n triggerEvent = new EventEmitter();\r\n viewUpdate = new EventEmitter();\r\n updateDisplay = new EventEmitter();\r\n action = new EventEmitter<{ e: any; action?: ActionTypes }>();\r\n\r\n destroy() {\r\n this.triggerEvent.destroy();\r\n this.viewUpdate.destroy();\r\n this.updateDisplay.destroy();\r\n this.action.destroy();\r\n }\r\n}\r\n","import Options from './options';\r\nimport { DateTime } from '../datetime';\r\n\r\nconst DefaultOptions: Options = {\r\n restrictions: {\r\n minDate: undefined,\r\n maxDate: undefined,\r\n disabledDates: [],\r\n enabledDates: [],\r\n daysOfWeekDisabled: [],\r\n disabledTimeIntervals: [],\r\n disabledHours: [],\r\n enabledHours: []\r\n },\r\n display: {\r\n icons: {\r\n type: 'icons',\r\n time: 'fa-solid fa-clock',\r\n date: 'fa-solid fa-calendar',\r\n up: 'fa-solid fa-arrow-up',\r\n down: 'fa-solid fa-arrow-down',\r\n previous: 'fa-solid fa-chevron-left',\r\n next: 'fa-solid fa-chevron-right',\r\n today: 'fa-solid fa-calendar-check',\r\n clear: 'fa-solid fa-trash',\r\n close: 'fa-solid fa-xmark'\r\n },\r\n sideBySide: false,\r\n calendarWeeks: false,\r\n viewMode: 'calendar',\r\n toolbarPlacement: 'bottom',\r\n keepOpen: false,\r\n buttons: {\r\n today: false,\r\n clear: false,\r\n close: false\r\n },\r\n components: {\r\n calendar: true,\r\n date: true,\r\n month: true,\r\n year: true,\r\n decades: true,\r\n clock: true,\r\n hours: true,\r\n minutes: true,\r\n seconds: false,\r\n useTwentyfourHour: undefined\r\n },\r\n inline: false,\r\n theme: 'auto'\r\n },\r\n stepping: 1,\r\n useCurrent: true,\r\n defaultDate: undefined,\r\n localization: {\r\n today: 'Go to today',\r\n clear: 'Clear selection',\r\n close: 'Close the picker',\r\n selectMonth: 'Select Month',\r\n previousMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n selectYear: 'Select Year',\r\n previousYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n selectDecade: 'Select Decade',\r\n previousDecade: 'Previous Decade',\r\n nextDecade: 'Next Decade',\r\n previousCentury: 'Previous Century',\r\n nextCentury: 'Next Century',\r\n pickHour: 'Pick Hour',\r\n incrementHour: 'Increment Hour',\r\n decrementHour: 'Decrement Hour',\r\n pickMinute: 'Pick Minute',\r\n incrementMinute: 'Increment Minute',\r\n decrementMinute: 'Decrement Minute',\r\n pickSecond: 'Pick Second',\r\n incrementSecond: 'Increment Second',\r\n decrementSecond: 'Decrement Second',\r\n toggleMeridiem: 'Toggle Meridiem',\r\n selectTime: 'Select Time',\r\n selectDate: 'Select Date',\r\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\r\n locale: 'default',\r\n startOfTheWeek: 0,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n dateFormats: {\r\n LTS: 'h:mm:ss T',\r\n LT: 'h:mm T',\r\n L: 'MM/dd/yyyy',\r\n LL: 'MMMM d, yyyy',\r\n LLL: 'MMMM d, yyyy h:mm T',\r\n LLLL: 'dddd, MMMM d, yyyy h:mm T',\r\n },\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n ordinal: (n) => n,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n format: 'L'\r\n },\r\n keepInvalid: false,\r\n debug: false,\r\n allowInputToggle: false,\r\n viewDate: new DateTime(),\r\n multipleDates: false,\r\n multipleDatesSeparator: '; ',\r\n promptTimeOnDateChange: false,\r\n promptTimeOnDateChangeTransitionDelay: 200,\r\n meta: {},\r\n container: undefined\r\n};\r\n\r\nexport default DefaultOptions;\r\n","import Namespace from './namespace';\r\nimport { DateTime } from '../datetime';\r\nimport DefaultOptions from './default-options';\r\nimport Options, { FormatLocalization } from './options';\r\n\r\nexport class OptionConverter {\r\n\r\n private static ignoreProperties = ['meta', 'dayViewHeaderFormat',\r\n 'container', 'dateForms', 'ordinal'];\r\n\r\n static deepCopy(input): Options {\r\n const o = {};\r\n\r\n Object.keys(input).forEach((key) => {\r\n const inputElement = input[key];\r\n o[key] = inputElement;\r\n if (typeof inputElement !== 'object' ||\r\n inputElement instanceof HTMLElement ||\r\n inputElement instanceof Element ||\r\n inputElement instanceof Date) return;\r\n if (!Array.isArray(inputElement)) {\r\n o[key] = OptionConverter.deepCopy(inputElement);\r\n }\r\n });\r\n\r\n return o;\r\n }\r\n\r\n private static isValue = a => a != null; // everything except undefined + null\r\n\r\n /**\r\n * Finds value out of an object based on a string, period delimited, path\r\n * @param paths\r\n * @param obj\r\n */\r\n static objectPath(paths: string, obj) {\r\n if (paths.charAt(0) === '.')\r\n paths = paths.slice(1);\r\n if (!paths) return obj;\r\n return paths.split('.')\r\n .reduce((value, key) => (OptionConverter.isValue(value) || OptionConverter.isValue(value[key]) ?\r\n value[key] :\r\n undefined), obj);\r\n }\r\n\r\n /**\r\n * The spread operator caused sub keys to be missing after merging.\r\n * This is to fix that issue by using spread on the child objects first.\r\n * Also handles complex options like disabledDates\r\n * @param provided An option from new providedOptions\r\n * @param copyTo Destination object. This was added to prevent reference copies\r\n * @param path\r\n * @param localization\r\n */\r\n static spread(provided, copyTo, path = '', localization: FormatLocalization) {\r\n const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);\r\n\r\n const unsupportedOptions = Object.keys(provided).filter(\r\n (x) => !Object.keys(defaultOptions).includes(x)\r\n );\r\n\r\n if (unsupportedOptions.length > 0) {\r\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\r\n\r\n const errors = unsupportedOptions.map((x) => {\r\n let error = `\"${path}.${x}\" in not a known option.`;\r\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\r\n if (didYouMean) error += ` Did you mean \"${didYouMean}\"?`;\r\n return error;\r\n });\r\n Namespace.errorMessages.unexpectedOptions(errors);\r\n }\r\n\r\n Object.keys(provided).filter(key => key !== '__proto__' && key !== 'constructor').forEach((key) => {\r\n path += `.${key}`;\r\n if (path.charAt(0) === '.') path = path.slice(1);\r\n\r\n const defaultOptionValue = defaultOptions[key];\r\n let providedType = typeof provided[key];\r\n let defaultType = typeof defaultOptionValue;\r\n let value = provided[key];\r\n\r\n if (value === undefined || value === null) {\r\n copyTo[key] = value;\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n return;\r\n }\r\n\r\n if (typeof defaultOptionValue === 'object' &&\r\n !Array.isArray(provided[key]) &&\r\n !(defaultOptionValue instanceof Date || OptionConverter.ignoreProperties.includes(key))) {\r\n OptionConverter.spread(provided[key], copyTo[key], path, localization);\r\n } else {\r\n copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization);\r\n }\r\n\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n });\r\n }\r\n\r\n static processKey(key, value, providedType, defaultType, path, localization: FormatLocalization) {\r\n switch (key) {\r\n case 'defaultDate': {\r\n const dateTime = this.dateConversion(value, 'defaultDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'defaultDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'viewDate': {\r\n const dateTime = this.dateConversion(value, 'viewDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'viewDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'minDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.minDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.minDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'maxDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.maxDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.maxDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'disabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.disabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.disabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'enabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.enabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.enabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'daysOfWeekDisabled':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.daysOfWeekDisabled',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 6).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.daysOfWeekDisabled',\r\n 0,\r\n 6\r\n );\r\n return value;\r\n case 'enabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.enabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.disabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledTimeIntervals':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n key,\r\n providedType,\r\n 'array of { from: DateTime|Date, to: DateTime|Date }'\r\n );\r\n }\r\n const valueObject = value as { from: any; to: any }[];\r\n for (let i = 0; i < valueObject.length; i++) {\r\n Object.keys(valueObject[i]).forEach((vk) => {\r\n const subOptionName = `${key}[${i}].${vk}`;\r\n let d = valueObject[i][vk];\r\n const dateTime = this.dateConversion(d, subOptionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n subOptionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization.locale);\r\n valueObject[i][vk] = dateTime;\r\n });\r\n }\r\n return valueObject;\r\n case 'toolbarPlacement':\r\n case 'type':\r\n case 'viewMode':\r\n case 'theme':\r\n const optionValues = {\r\n toolbarPlacement: ['top', 'bottom', 'default'],\r\n type: ['icons', 'sprites'],\r\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\r\n theme: ['light', 'dark', 'auto']\r\n };\r\n const keyOptions = optionValues[key];\r\n if (!keyOptions.includes(value))\r\n Namespace.errorMessages.unexpectedOptionValue(\r\n path.substring(1),\r\n value,\r\n keyOptions\r\n );\r\n\r\n return value;\r\n case 'meta':\r\n case 'dayViewHeaderFormat':\r\n return value;\r\n case 'container':\r\n if (\r\n value &&\r\n !(\r\n value instanceof HTMLElement ||\r\n value instanceof Element ||\r\n value?.appendChild\r\n )\r\n ) {\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n typeof value,\r\n 'HTMLElement'\r\n );\r\n }\r\n return value;\r\n case 'useTwentyfourHour':\r\n if (value === undefined || providedType === 'boolean') return value;\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n break;\r\n default:\r\n switch (defaultType) {\r\n case 'boolean':\r\n return value === 'true' || value === true;\r\n case 'number':\r\n return +value;\r\n case 'string':\r\n return value.toString();\r\n case 'object':\r\n return {};\r\n case 'function':\r\n return value;\r\n default:\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n }\r\n }\r\n }\r\n\r\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\r\n const newConfig = OptionConverter.deepCopy(mergeTo);\r\n //see if the options specify a locale\r\n const localization =\r\n mergeTo.localization?.locale !== 'default'\r\n ? mergeTo.localization\r\n : providedOptions?.localization || DefaultOptions.localization;\r\n\r\n OptionConverter.spread(providedOptions, newConfig, '', localization);\r\n\r\n return newConfig;\r\n }\r\n\r\n static _dataToOptions(element, options: Options): Options {\r\n const eData = JSON.parse(JSON.stringify(element.dataset));\r\n\r\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\r\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\r\n\r\n if (\r\n !eData ||\r\n Object.keys(eData).length === 0 ||\r\n eData.constructor !== DOMStringMap\r\n )\r\n return options;\r\n let dataOptions = {} as Options;\r\n\r\n // because dataset returns camelCase including the 'td' key the option\r\n // key won't align\r\n const objectToNormalized = (object) => {\r\n const lowered = {};\r\n Object.keys(object).forEach((x) => {\r\n lowered[x.toLowerCase()] = x;\r\n });\r\n\r\n return lowered;\r\n };\r\n\r\n const rabbitHole = (\r\n split: string[],\r\n index: number,\r\n optionSubgroup: {},\r\n value: any\r\n ) => {\r\n // first round = display { ... }\r\n const normalizedOptions = objectToNormalized(optionSubgroup);\r\n\r\n const keyOption = normalizedOptions[split[index].toLowerCase()];\r\n const internalObject = {};\r\n\r\n if (keyOption === undefined) return internalObject;\r\n\r\n // if this is another object, continue down the rabbit hole\r\n if (optionSubgroup[keyOption].constructor === Object) {\r\n index++;\r\n internalObject[keyOption] = rabbitHole(\r\n split,\r\n index,\r\n optionSubgroup[keyOption],\r\n value\r\n );\r\n } else {\r\n internalObject[keyOption] = value;\r\n }\r\n return internalObject;\r\n };\r\n const optionsLower = objectToNormalized(options);\r\n\r\n Object.keys(eData)\r\n .filter((x) => x.startsWith(Namespace.dataKey))\r\n .map((x) => x.substring(2))\r\n .forEach((key) => {\r\n let keyOption = optionsLower[key.toLowerCase()];\r\n\r\n // dataset merges dashes to camelCase... yay\r\n // i.e. key = display_components_seconds\r\n if (key.includes('_')) {\r\n // [display, components, seconds]\r\n const split = key.split('_');\r\n // display\r\n keyOption = optionsLower[split[0].toLowerCase()];\r\n if (\r\n keyOption !== undefined &&\r\n options[keyOption].constructor === Object\r\n ) {\r\n dataOptions[keyOption] = rabbitHole(\r\n split,\r\n 1,\r\n options[keyOption],\r\n eData[`td${key}`]\r\n );\r\n }\r\n }\r\n // or key = multipleDate\r\n else if (keyOption !== undefined) {\r\n dataOptions[keyOption] = eData[`td${key}`];\r\n }\r\n });\r\n\r\n return this._mergeOptions(dataOptions, options);\r\n }\r\n\r\n /**\r\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\r\n * @param d If a string will attempt creating a date from it.\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n * @private\r\n */\r\n static _dateTypeCheck(d: any, localization: FormatLocalization): DateTime | null {\r\n if (d.constructor.name === DateTime.name) return d;\r\n if (d.constructor.name === Date.name) {\r\n return DateTime.convert(d);\r\n }\r\n if (typeof d === typeof '') {\r\n const dateTime = DateTime.fromString(d, localization);\r\n if (JSON.stringify(dateTime) === 'null') {\r\n return null;\r\n }\r\n return dateTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of Date or DateTime\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n * @param localization\r\n */\r\n static _typeCheckDateArray(\r\n optionName: string,\r\n value,\r\n providedType: string,\r\n localization: FormatLocalization\r\n ) {\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of DateTime or Date'\r\n );\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n let d = value[i];\r\n const dateTime = this.dateConversion(d, optionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization?.locale ?? 'default');\r\n value[i] = dateTime;\r\n }\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of numbers\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckNumberArray(\r\n optionName: string,\r\n value,\r\n providedType: string\r\n ) {\r\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of numbers'\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to convert `d` to a DateTime object\r\n * @param d value to convert\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n */\r\n static dateConversion(d: any, optionName: string, localization: FormatLocalization): DateTime {\r\n if (typeof d === typeof '' && optionName !== 'input') {\r\n Namespace.errorMessages.dateString();\r\n }\r\n\r\n const converted = this._dateTypeCheck(d, localization);\r\n\r\n if (!converted) {\r\n Namespace.errorMessages.failedToParseDate(\r\n optionName,\r\n d,\r\n optionName === 'input'\r\n );\r\n }\r\n return converted;\r\n }\r\n\r\n private static _flattenDefaults: string[];\r\n\r\n private static getFlattenDefaultOptions(): string[] {\r\n if (this._flattenDefaults) return this._flattenDefaults;\r\n const deepKeys = (t, pre = []) => {\r\n if (Array.isArray(t)) return [];\r\n if (Object(t) === t) {\r\n return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));\r\n } else {\r\n return pre.join('.');\r\n }\r\n };\r\n\r\n this._flattenDefaults = deepKeys(DefaultOptions);\r\n\r\n return this._flattenDefaults;\r\n }\r\n\r\n /**\r\n * Some options conflict like min/max date. Verify that these kinds of options\r\n * are set correctly.\r\n * @param config\r\n */\r\n static _validateConflicts(config: Options) {\r\n if (\r\n config.display.sideBySide &&\r\n (!config.display.components.clock ||\r\n !(\r\n config.display.components.hours ||\r\n config.display.components.minutes ||\r\n config.display.components.seconds\r\n ))\r\n ) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'Cannot use side by side mode without the clock components'\r\n );\r\n }\r\n\r\n if (config.restrictions.minDate && config.restrictions.maxDate) {\r\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'minDate is after maxDate'\r\n );\r\n }\r\n\r\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'maxDate is before minDate'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\r\nimport Validation from './validation';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\n\r\nexport default class Dates {\r\n private _dates: DateTime[] = [];\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n }\r\n\r\n /**\r\n * Returns the array of selected dates\r\n */\r\n get picked(): DateTime[] {\r\n return this._dates;\r\n }\r\n\r\n /**\r\n * Returns the last picked value.\r\n */\r\n get lastPicked(): DateTime {\r\n return this._dates[this.lastPickedIndex];\r\n }\r\n\r\n /**\r\n * Returns the length of picked dates -1 or 0 if none are selected.\r\n */\r\n get lastPickedIndex(): number {\r\n if (this._dates.length === 0) return 0;\r\n return this._dates.length - 1;\r\n }\r\n\r\n /**\r\n * Formats a DateTime object to a string. Used when setting the input value.\r\n * @param date\r\n */\r\n formatInput(date: DateTime): string {\r\n const components = this.optionsStore.options.display.components;\r\n if (!date) return '';\r\n return date.format({\r\n year: components.calendar && components.year ? 'numeric' : undefined,\r\n month: components.calendar && components.month ? '2-digit' : undefined,\r\n day: components.calendar && components.date ? '2-digit' : undefined,\r\n hour:\r\n components.clock && components.hours\r\n ? components.useTwentyfourHour\r\n ? '2-digit'\r\n : 'numeric'\r\n : undefined,\r\n minute: components.clock && components.minutes ? '2-digit' : undefined,\r\n second: components.clock && components.seconds ? '2-digit' : undefined,\r\n hour12: !components.useTwentyfourHour,\r\n });\r\n }\r\n \r\n /**\r\n * parse the value into a DateTime object.\r\n * this can be overwritten to supply your own parsing.\r\n */\r\n parseInput(value:any): DateTime {\r\n return OptionConverter.dateConversion(value, 'input', this.optionsStore.options.localization);\r\n }\r\n\r\n /**\r\n * Tries to convert the provided value to a DateTime object.\r\n * If value is null|undefined then clear the value of the provided index (or 0).\r\n * @param value Value to convert or null|undefined\r\n * @param index When using multidates this is the index in the array\r\n */\r\n setFromInput(value: any, index?: number) {\r\n if (!value) {\r\n this.setValue(undefined, index);\r\n return;\r\n }\r\n const converted = this.parseInput(value);\r\n if (converted) {\r\n converted.setLocale(this.optionsStore.options.localization.locale);\r\n this.setValue(converted, index);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a new DateTime to selected dates array\r\n * @param date\r\n */\r\n add(date: DateTime): void {\r\n this._dates.push(date);\r\n }\r\n\r\n /**\r\n * Returns true if the `targetDate` is part of the selected dates array.\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return (\r\n this._dates\r\n .map((x) => x.format(format))\r\n .find((x) => x === innerDateFormatted) !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the index at which `targetDate` is in the array.\r\n * This is used for updating or removing a date when multi-date is used\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\r\n if (!unit) return this._dates.indexOf(targetDate);\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\r\n }\r\n\r\n /**\r\n * Clears all selected dates.\r\n */\r\n clear() {\r\n this.optionsStore.unset = true;\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate: this.lastPicked,\r\n isClear: true,\r\n isValid: true,\r\n } as ChangeEvent);\r\n this._dates = [];\r\n }\r\n\r\n /**\r\n * Find the \"book end\" years given a `year` and a `factor`\r\n * @param factor e.g. 100 for decades\r\n * @param year e.g. 2021\r\n */\r\n static getStartEndYear(\r\n factor: number,\r\n year: number\r\n ): [number, number, number] {\r\n const step = factor / 10,\r\n startYear = Math.floor(year / factor) * factor,\r\n endYear = startYear + step * 9,\r\n focusValue = Math.floor(year / step) * step;\r\n return [startYear, endYear, focusValue];\r\n }\r\n\r\n /**\r\n * Attempts to either clear or set the `target` date at `index`.\r\n * If the `target` is null then the date will be cleared.\r\n * If multi-date is being used then it will be removed from the array.\r\n * If `target` is valid and multi-date is used then if `index` is\r\n * provided the date at that index will be replaced, otherwise it is appended.\r\n * @param target\r\n * @param index\r\n */\r\n setValue(target?: DateTime, index?: number): void {\r\n const noIndex = typeof index === 'undefined',\r\n isClear = !target && noIndex;\r\n let oldDate = this.optionsStore.unset ? null : this._dates[index];\r\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\r\n oldDate = this.lastPicked;\r\n }\r\n\r\n const updateInput = () => {\r\n if (!this.optionsStore.input) return;\r\n\r\n let newValue = this.formatInput(target);\r\n if (this.optionsStore.options.multipleDates) {\r\n newValue = this._dates\r\n .map((d) => this.formatInput(d))\r\n .join(this.optionsStore.options.multipleDatesSeparator);\r\n }\r\n if (this.optionsStore.input.value != newValue)\r\n this.optionsStore.input.value = newValue;\r\n };\r\n\r\n if (target && oldDate?.isSame(target)) {\r\n updateInput();\r\n return;\r\n }\r\n\r\n // case of calling setValue(null)\r\n if (!target) {\r\n if (\r\n !this.optionsStore.options.multipleDates ||\r\n this._dates.length === 1 ||\r\n isClear\r\n ) {\r\n this.optionsStore.unset = true;\r\n this._dates = [];\r\n } else {\r\n this._dates.splice(index, 1);\r\n }\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n\r\n this._eventEmitters.updateDisplay.emit('all');\r\n return;\r\n }\r\n\r\n index = index || 0;\r\n target = target.clone;\r\n\r\n // minute stepping is being used, force the minute to the closest value\r\n if (this.optionsStore.options.stepping !== 1) {\r\n target.minutes =\r\n Math.round(target.minutes / this.optionsStore.options.stepping) *\r\n this.optionsStore.options.stepping;\r\n target.seconds = 0;\r\n }\r\n\r\n if (this.validation.isValid(target)) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this.optionsStore.unset = false;\r\n this._eventEmitters.updateDisplay.emit('all');\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.keepInvalid) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: false,\r\n } as ChangeEvent);\r\n }\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.error,\r\n reason: Namespace.errorMessages.failedToSetInvalidDate,\r\n date: target,\r\n oldDate,\r\n } as FailEvent);\r\n }\r\n}\r\n","enum ActionTypes {\n next = 'next',\n previous = 'previous',\n changeCalendarView = 'changeCalendarView',\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 toggleMeridiem = 'toggleMeridiem',\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\nexport default ActionTypes;\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport Dates from \"../../dates\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `date`\r\n */\r\nexport default class DateDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.daysContainer);\r\n\r\n container.append(...this._daysOfTheWeek());\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\r\n container.appendChild(div);\r\n }\r\n\r\n for (let i = 0; i < 42; i++) {\r\n if (i !== 0 && i % 7 === 0) {\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n container.appendChild(div);\r\n }\r\n }\r\n\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDay);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.daysContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"calendar\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.daysContainer,\r\n this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n )\r\n );\r\n\r\n this.optionsStore.options.display.components.month\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\r\n Unit.month\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\r\n Unit.month\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.month)\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .manipulate(12, Unit.hours);\r\n\r\n container\r\n .querySelectorAll(\r\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\r\n )\r\n .forEach((containerClone: HTMLElement) => {\r\n if (\r\n this.optionsStore.options.display.calendarWeeks &&\r\n containerClone.classList.contains(Namespace.css.calendarWeeks)\r\n ) {\r\n if (containerClone.innerText === \"#\") return;\r\n containerClone.innerText = `${innerDate.week}`;\r\n return;\r\n }\r\n\r\n let classes: string[] = [];\r\n classes.push(Namespace.css.day);\r\n\r\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.old);\r\n }\r\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.new);\r\n }\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.date)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.date)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n if (innerDate.isSame(new DateTime(), Unit.date)) {\r\n classes.push(Namespace.css.today);\r\n }\r\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\r\n classes.push(Namespace.css.weekend);\r\n }\r\n\r\n paint(Unit.date, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\r\n );\r\n containerClone.setAttribute(\"data-day\", `${innerDate.date}`);\r\n containerClone.innerText = innerDate.format({ day: \"numeric\" });\r\n innerDate.manipulate(1, Unit.date);\r\n });\r\n }\r\n\r\n /***\r\n * Generates an html row that contains the days of the week.\r\n * @private\r\n */\r\n private _daysOfTheWeek(): HTMLElement[] {\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .startOf(Unit.date);\r\n const row = [];\r\n document.createElement(\"div\");\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = \"#\";\r\n row.push(htmlDivElement);\r\n }\r\n\r\n for (let i = 0; i < 7; i++) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.dayOfTheWeek,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = innerDate.format({ weekday: \"short\" });\r\n innerDate.manipulate(1, Unit.date);\r\n row.push(htmlDivElement);\r\n }\r\n\r\n return row;\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { Paint } from '../index';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `month`\r\n */\r\nexport default class MonthDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.monthsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMonth);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.monthsContainer\r\n )[0];\r\n\r\n if(this.optionsStore.currentView === 'months') {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.monthsContainer,\r\n this.optionsStore.viewDate.format({ year: 'numeric' })\r\n );\r\n\r\n this.optionsStore.options.display.components.year\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\r\n Unit.year\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\r\n Unit.year\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n let classes = [];\r\n classes.push(Namespace.css.month);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.month)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.month)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.month, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${index}`);\r\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\r\n innerDate.manipulate(1, Unit.month);\r\n });\r\n }\r\n}\r\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Dates from \"../../dates\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `year`\r\n */\r\nexport default class YearDisplay {\r\n private _startYear: DateTime;\r\n private _endYear: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.yearsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectYear);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year);\r\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.yearsContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"years\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.yearsContainer,\r\n `${this._startYear.format({ year: \"numeric\" })}-${this._endYear.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.optionsStore.options.display.components.decades\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(this._startYear, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endYear, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.year)\r\n .manipulate(-1, Unit.year);\r\n\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.year);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.year)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.year)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.year, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\"data-value\", `${innerDate.year}`);\r\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\r\n\r\n innerDate.manipulate(1, Unit.year);\r\n });\r\n }\r\n}\r\n","import Dates from \"../../dates\";\r\nimport { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class DecadeDisplay {\r\n private _startDecade: DateTime;\r\n private _endDecade: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker() {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.decadesContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDecade);\r\n container.appendChild(div);\r\n }\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n const [start, end] = Dates.getStartEndYear(\r\n 100,\r\n this.optionsStore.viewDate.year\r\n );\r\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._startDecade.year = start;\r\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._endDecade.year = end;\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.decadesContainer\r\n )[0];\r\n\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n if (this.optionsStore.currentView === 'decades') {\r\n switcher.setAttribute(\r\n Namespace.css.decadesContainer,\r\n `${this._startDecade.format({ year: \"numeric\" })}-${this._endDecade.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.validation.isValid(this._startDecade, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endDecade, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n const pickedYears = this.dates.picked.map((x) => x.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n if (index === 0) {\r\n containerClone.classList.add(Namespace.css.old);\r\n if (this._startDecade.year - 10 < 0) {\r\n containerClone.textContent = \" \";\r\n previous.classList.add(Namespace.css.disabled);\r\n containerClone.classList.add(Namespace.css.disabled);\r\n containerClone.setAttribute(\"data-value\", ``);\r\n return;\r\n } else {\r\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: \"numeric\" });\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n return;\r\n }\r\n }\r\n\r\n let classes = [];\r\n classes.push(Namespace.css.decade);\r\n const startDecadeYear = this._startDecade.year;\r\n const endDecadeYear = this._startDecade.year + 9;\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\r\n .length > 0\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n\r\n paint(\"decade\", this._startDecade, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n containerClone.innerText = `${this._startDecade.format({ year: \"numeric\" })}`;\r\n\r\n this._startDecade.manipulate(10, Unit.year);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates the clock display\r\n */\r\nexport default class TimeDisplay {\r\n private _gridColumns = '';\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the clock display\r\n * @private\r\n */\r\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.clockContainer);\r\n\r\n container.append(...this._grid(iconTag));\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the various elements with in the clock display\r\n * like the current hour and if the manipulation icons are enabled.\r\n * @private\r\n */\r\n _update(widget: HTMLElement): void {\r\n const timesDiv = (\r\n widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0]\r\n );\r\n const lastPicked = (\r\n this.dates.lastPicked || this.optionsStore.viewDate\r\n ).clone;\r\n\r\n timesDiv\r\n .querySelectorAll('.disabled')\r\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.hours}]`\r\n ).innerText = this.optionsStore.options.display.components.useTwentyfourHour\r\n ? lastPicked.hoursFormatted\r\n : lastPicked.twelveHoursFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.minutes}]`\r\n ).innerText = lastPicked.minutesFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.seconds}]`\r\n ).innerText = lastPicked.secondsFormatted;\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n const toggle = timesDiv.querySelector(\r\n `[data-action=${ActionTypes.toggleMeridiem}]`\r\n );\r\n\r\n toggle.innerText = lastPicked.meridiem();\r\n\r\n if (\r\n !this.validation.isValid(\r\n lastPicked.clone.manipulate(\r\n lastPicked.hours >= 12 ? -12 : 12,\r\n Unit.hours\r\n )\r\n )\r\n ) {\r\n toggle.classList.add(Namespace.css.disabled);\r\n } else {\r\n toggle.classList.remove(Namespace.css.disabled);\r\n }\r\n }\r\n\r\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\r\n }\r\n\r\n /**\r\n * Creates the table for the clock display depending on what options are selected.\r\n * @private\r\n */\r\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\r\n this._gridColumns = '';\r\n const top = [],\r\n middle = [],\r\n bottom = [],\r\n separator = document.createElement('div'),\r\n upIcon = iconTag(\r\n this.optionsStore.options.display.icons.up\r\n ),\r\n downIcon = iconTag(\r\n this.optionsStore.options.display.icons.down\r\n );\r\n\r\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\r\n const separatorColon = separator.cloneNode(true);\r\n separatorColon.innerHTML = ':';\r\n\r\n const getSeparator = (colon = false): HTMLElement => {\r\n return colon\r\n ? separatorColon.cloneNode(true)\r\n : separator.cloneNode(true);\r\n };\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showHours);\r\n divElement.setAttribute('data-time-component', Unit.hours);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n this._gridColumns += 'a';\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.hours) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\r\n divElement.setAttribute('data-time-component', Unit.minutes);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.minutes) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\r\n divElement.setAttribute('data-time-component', Unit.seconds);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n this._gridColumns += ' a';\r\n let divElement = getSeparator();\r\n top.push(divElement);\r\n\r\n let button = document.createElement('button');\r\n button.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.toggleMeridiem\r\n );\r\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\r\n button.setAttribute('tabindex', '-1');\r\n if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function?\r\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\r\n }\r\n else button.classList.add(Namespace.css.toggleMeridiem);\r\n\r\n divElement = document.createElement('div');\r\n divElement.classList.add(Namespace.css.noHighlight);\r\n divElement.appendChild(button);\r\n middle.push(divElement);\r\n\r\n divElement = getSeparator();\r\n bottom.push(divElement);\r\n }\r\n\r\n this._gridColumns = this._gridColumns.trim();\r\n\r\n return [...top, ...middle, ...bottom];\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `hours`\r\n */\r\nexport default class HourDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.hourContainer);\r\n\r\n for (\r\n let i = 0;\r\n i <\r\n (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12);\r\n i++\r\n ) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectHour);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.hourContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.hour);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.hours)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.hours, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\r\n containerClone.innerText = this.optionsStore.options.display.components\r\n .useTwentyfourHour\r\n ? innerDate.hoursFormatted\r\n : innerDate.twelveHoursFormatted;\r\n innerDate.manipulate(1, Unit.hours);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `minutes`\r\n */\r\nexport default class MinuteDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.minuteContainer);\r\n\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n for (let i = 0; i < 60 / step; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMinute);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.minuteContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.minute);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.minutes, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${innerDate.minutes}`\r\n );\r\n containerClone.innerText = innerDate.minutesFormatted;\r\n innerDate.manipulate(step, Unit.minutes);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class secondDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.secondContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectSecond);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.secondContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.second);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.seconds, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\r\n containerClone.innerText = innerDate.secondsFormatted;\r\n innerDate.manipulate(5, Unit.seconds);\r\n });\r\n }\r\n}\r\n","import Namespace from '../utilities/namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n static 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 * Skips any animation or timeouts and immediately set the element to show.\r\n * @param target\r\n */\r\n static showImmediately(target: HTMLElement) {\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 }\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.showImmediately(target);\r\n 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 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 * Skips any animation or timeouts and immediately set the element to hide.\r\n * @param target\r\n */\r\n static hideImmediately(target: HTMLElement) {\r\n if (!target) return;\r\n target.classList.remove(Namespace.css.collapsing, Namespace.css.show);\r\n target.classList.add(Namespace.css.collapse);\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.hideImmediately(target);\r\n 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 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 static 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 } =\r\n window.getComputedStyle(element);\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 DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport Namespace from '../utilities/namespace';\r\nimport { HideEvent } from '../utilities/event-types';\r\nimport Collapse from './collapse';\r\nimport Validation from '../validation';\r\nimport Dates from '../dates';\r\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\r\nimport { serviceLocator } from '../utilities/service-locator';\r\nimport ActionTypes from '../utilities/action-types';\r\nimport CalendarModes from '../utilities/calendar-modes';\r\nimport { OptionsStore } from '../utilities/optionsStore';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _widget: HTMLElement;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n dateDisplay: DateDisplay;\r\n monthDisplay: MonthDisplay;\r\n yearDisplay: YearDisplay;\r\n decadeDisplay: DecadeDisplay;\r\n timeDisplay: TimeDisplay;\r\n hourDisplay: HourDisplay;\r\n minuteDisplay: MinuteDisplay;\r\n secondDisplay: SecondDisplay;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.dates = serviceLocator.locate(Dates);\r\n\r\n this.dateDisplay = serviceLocator.locate(DateDisplay);\r\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\r\n this.yearDisplay = serviceLocator.locate(YearDisplay);\r\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\r\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\r\n this.hourDisplay = serviceLocator.locate(HourDisplay);\r\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\r\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this._widget = undefined;\r\n\r\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\r\n this._update(result);\r\n });\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: ViewUpdateValues): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this.secondDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.minutes:\r\n this.minuteDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.hours:\r\n this.hourDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.date:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.month:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.year:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this.timeDisplay._update(this.widget);\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n // noinspection JSUnusedLocalSymbols\r\n /**\r\n * Allows developers to add/remove classes from an element.\r\n * @param _unit\r\n * @param _date\r\n * @param _classes\r\n * @param _element\r\n */\r\n paint(\r\n _unit: Unit | 'decade',\r\n _date: DateTime,\r\n _classes: string[],\r\n _element: HTMLElement\r\n ) {\r\n // implemented in plugin\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (this.dates.picked.length == 0) {\r\n if (\r\n this.optionsStore.options.useCurrent &&\r\n !this.optionsStore.options.defaultDate\r\n ) {\r\n const date = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n if (!this.optionsStore.options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (\r\n this.optionsStore.options.restrictions.maxDate?.isBefore(date)\r\n ) {\r\n direction = -1;\r\n }\r\n while (!this.validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this.dates.setValue(date);\r\n }\r\n\r\n if (this.optionsStore.options.defaultDate) {\r\n this.dates.setValue(this.optionsStore.options.defaultDate);\r\n }\r\n }\r\n\r\n this._buildWidget();\r\n this._updateTheme();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this.optionsStore.currentView = 'clock';\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n // otherwise return to the calendar view\r\n if (!this.optionsStore.currentCalendarViewMode) {\r\n this.optionsStore.currentCalendarViewMode =\r\n this.optionsStore.minimumCalendarViewMode;\r\n }\r\n\r\n if (\r\n !onlyClock &&\r\n this.optionsStore.options.display.viewMode !== 'clock'\r\n ) {\r\n if (this._hasTime) {\r\n if(!this.optionsStore.options.display.sideBySide) {\r\n Collapse.hideImmediately(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n } else {\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n }\r\n }\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.dateContainer}`)\r\n );\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this.optionsStore.options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this.optionsStore.options?.container || document.body;\r\n container.appendChild(this.widget);\r\n this.createPopup(this.optionsStore.element, this.widget, {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start',\r\n }).then();\r\n } else {\r\n this.optionsStore.element.appendChild(this.widget);\r\n }\r\n\r\n if (this.optionsStore.options.display.viewMode == 'clock') {\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\r\n this.timeDisplay._update(this.widget);\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this.optionsStore.options.display.inline) {\r\n this.updatePopup();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n async createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise {\r\n const { createPopper } = await import('@popperjs/core');\r\n this._popperInstance = createPopper(element, widget, options);\r\n }\r\n\r\n updatePopup(): void {\r\n this._popperInstance?.update();\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\r\n );\r\n if (this.optionsStore.currentCalendarViewMode == max) return;\r\n this.optionsStore.currentCalendarViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.daysContainer:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n this._eventEmitters.viewUpdate.emit();\r\n }\r\n\r\n /**\r\n * Changes the theme. E.g. light, dark or auto\r\n * @param theme the theme name\r\n * @private\r\n */\r\n _updateTheme(theme?: 'light' | 'dark' | 'auto'): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (theme) {\r\n if (this.optionsStore.options.display.theme === theme) return;\r\n this.optionsStore.options.display.theme = theme;\r\n }\r\n\r\n this.widget.classList.remove('light', 'dark');\r\n this.widget.classList.add(this._getThemeClass());\r\n\r\n if (this.optionsStore.options.display.theme === 'auto') {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .addEventListener('change', () => this._updateTheme());\r\n } else {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .removeEventListener('change', () => this._updateTheme());\r\n }\r\n }\r\n\r\n _getThemeClass(): string {\r\n const currentTheme = this.optionsStore.options.display.theme || 'auto';\r\n\r\n const isDarkMode =\r\n window.matchMedia &&\r\n window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;\r\n\r\n switch (currentTheme) {\r\n case 'light':\r\n return Namespace.css.lightTheme;\r\n case 'dark':\r\n return Namespace.css.darkTheme;\r\n case 'auto':\r\n return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;\r\n }\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList,\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextMonth\r\n );\r\n switcher.innerText = this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n );\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.hide,\r\n date: this.optionsStore.unset\r\n ? null\r\n : this.dates.lastPicked\r\n ? this.dates.lastPicked.clone\r\n : void 0,\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this.getHeadTemplate(),\r\n this.decadeDisplay.getPicker(),\r\n this.yearDisplay.getPicker(),\r\n this.monthDisplay.getPicker(),\r\n this.dateDisplay.getPicker()\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\r\n timeView.appendChild(this.hourDisplay.getPicker());\r\n timeView.appendChild(this.minuteDisplay.getPicker());\r\n timeView.appendChild(this.secondDisplay.getPicker());\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this.getToolbarElements());\r\n\r\n if (this.optionsStore.options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.clock &&\r\n (this.optionsStore.options.display.components.hours ||\r\n this.optionsStore.options.display.components.minutes ||\r\n this.optionsStore.options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.calendar &&\r\n (this.optionsStore.options.display.components.year ||\r\n this.optionsStore.options.display.components.month ||\r\n this.optionsStore.options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n getToolbarElements(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this.optionsStore.options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this.optionsStore.options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this.optionsStore.options.display.viewMode === 'clock') {\r\n title = this.optionsStore.options.localization.selectDate;\r\n icon = this.optionsStore.options.display.icons.date;\r\n } else {\r\n title = this.optionsStore.options.localization.selectTime;\r\n icon = this.optionsStore.options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this.optionsStore.options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this.optionsStore.options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n getHeadTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.next)\r\n );\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then a svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement | SVGElement {\r\n if (this.optionsStore.options.display.icons.type === 'sprites') {\r\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\r\n\r\n const icon = document.createElementNS(\r\n 'http://www.w3.org/2000/svg',\r\n 'use'\r\n );\r\n icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility\r\n icon.setAttribute('href', iconClass);\r\n svg.appendChild(icon);\r\n\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n icon.classList.add(...iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this.optionsStore.options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._eventEmitters.action.emit({ e: e });\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n\r\nexport type Paint = (\r\n unit: Unit | 'decade',\r\n innerDate: DateTime,\r\n classes: string[],\r\n element: HTMLElement\r\n) => void;\r\n","import { DateTime, Unit } from \"./datetime\";\r\nimport Collapse from \"./display/collapse\";\r\nimport Namespace from \"./utilities/namespace\";\r\nimport Dates from \"./dates\";\r\nimport Validation from \"./validation\";\r\nimport Display from \"./display\";\r\nimport { EventEmitters } from \"./utilities/event-emitter\";\r\nimport { serviceLocator } from \"./utilities/service-locator.js\";\r\nimport ActionTypes from \"./utilities/action-types\";\r\nimport CalendarModes from \"./utilities/calendar-modes\";\r\nimport { OptionsStore } from \"./utilities/optionsStore\";\r\n\r\n/**\r\n *\r\n */\r\nexport default class Actions {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n private display: Display;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.display = serviceLocator.locate(Display);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n\r\n this._eventEmitters.action.subscribe((result) => {\r\n this.do(result.e, result.action);\r\n });\r\n }\r\n\r\n /**\r\n * Performs the selected `action`. See ActionTypes\r\n * @param e This is normally a click event\r\n * @param action If not provided, then look for a [data-action]\r\n */\r\n do(e: any, action?: ActionTypes) {\r\n const currentTarget = e?.currentTarget;\r\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\r\n return false;\r\n action = action || currentTarget?.dataset?.action;\r\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\r\n .clone;\r\n\r\n switch (action) {\r\n case ActionTypes.next:\r\n case ActionTypes.previous:\r\n this.handleNextPrevious(action);\r\n break;\r\n case ActionTypes.changeCalendarView:\r\n this.display._showMode(1);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.selectMonth:\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n const value = +currentTarget.dataset.value;\r\n switch (action) {\r\n case ActionTypes.selectMonth:\r\n this.optionsStore.viewDate.month = value;\r\n break;\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n this.optionsStore.viewDate.year = value;\r\n break;\r\n }\r\n\r\n if (\r\n this.optionsStore.currentCalendarViewMode ===\r\n this.optionsStore.minimumCalendarViewMode\r\n ) {\r\n this.dates.setValue(\r\n this.optionsStore.viewDate,\r\n this.dates.lastPickedIndex\r\n );\r\n if (!this.optionsStore.options.display.inline) {\r\n this.display.hide();\r\n }\r\n } else {\r\n this.display._showMode(-1);\r\n }\r\n break;\r\n case ActionTypes.selectDay:\r\n const day = this.optionsStore.viewDate.clone;\r\n if (currentTarget.classList.contains(Namespace.css.old)) {\r\n day.manipulate(-1, Unit.month);\r\n }\r\n if (currentTarget.classList.contains(Namespace.css.new)) {\r\n day.manipulate(1, Unit.month);\r\n }\r\n\r\n day.date = +currentTarget.dataset.day;\r\n let index = 0;\r\n if (this.optionsStore.options.multipleDates) {\r\n index = this.dates.pickedIndex(day, Unit.date);\r\n if (index !== -1) {\r\n this.dates.setValue(null, index); //deselect multi-date\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex + 1);\r\n }\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex);\r\n }\r\n\r\n if (\r\n !this.display._hasTime &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline &&\r\n !this.optionsStore.options.multipleDates\r\n ) {\r\n this.display.hide();\r\n }\r\n break;\r\n case ActionTypes.selectHour:\r\n let hour = +currentTarget.dataset.value;\r\n if (\r\n lastPicked.hours >= 12 &&\r\n !this.optionsStore.options.display.components.useTwentyfourHour\r\n )\r\n hour += 12;\r\n lastPicked.hours = hour;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectMinute:\r\n lastPicked.minutes = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectSecond:\r\n lastPicked.seconds = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.incrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours);\r\n break;\r\n case ActionTypes.incrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping\r\n );\r\n break;\r\n case ActionTypes.incrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds);\r\n break;\r\n case ActionTypes.decrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\r\n break;\r\n case ActionTypes.decrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping * -1\r\n );\r\n break;\r\n case ActionTypes.decrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\r\n break;\r\n case ActionTypes.toggleMeridiem:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.hours,\r\n this.dates.lastPicked.hours >= 12 ? -12 : 12\r\n );\r\n break;\r\n case ActionTypes.togglePicker:\r\n if (\r\n currentTarget.getAttribute('title') ===\r\n this.optionsStore.options.localization.selectDate\r\n ) {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectTime\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.time\r\n ).outerHTML;\r\n\r\n this.display._updateCalendarHeader();\r\n this.optionsStore.refreshCurrentView();\r\n } else {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDate\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.date\r\n ).outerHTML;\r\n if (this.display._hasTime) {\r\n this.handleShowClockContainers(ActionTypes.showClock);\r\n this.display._update('clock');\r\n }\r\n }\r\n\r\n this.display.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\r\n )\r\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\r\n this._eventEmitters.viewUpdate.emit();\r\n break;\r\n case ActionTypes.showClock:\r\n case ActionTypes.showHours:\r\n case ActionTypes.showMinutes:\r\n case ActionTypes.showSeconds:\r\n //make sure the clock is actually displaying\r\n if (!this.optionsStore.options.display.sideBySide && this.optionsStore.currentView !== 'clock') {\r\n //hide calendar\r\n Collapse.hideImmediately(this.display.widget.querySelector(`div.${Namespace.css.dateContainer}`));\r\n //show clock\r\n Collapse.showImmediately(this.display.widget.querySelector(`div.${Namespace.css.timeContainer}`));\r\n }\r\n this.handleShowClockContainers(action);\r\n break;\r\n case ActionTypes.clear:\r\n this.dates.setValue(null);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.close:\r\n this.display.hide();\r\n break;\r\n case ActionTypes.today:\r\n const today = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.viewDate = today;\r\n if (this.validation.isValid(today, Unit.date))\r\n this.dates.setValue(today, this.dates.lastPickedIndex);\r\n break;\r\n }\r\n }\r\n\r\n private handleShowClockContainers(action: ActionTypes) {\r\n if (!this.display._hasTime) {\r\n Namespace.errorMessages.throwError('Cannot show clock containers when time is disabled.');\r\n return;\r\n }\r\n\r\n this.optionsStore.currentView = 'clock';\r\n this.display.widget\r\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\r\n .forEach(\r\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\r\n );\r\n\r\n let classToUse = '';\r\n switch (action) {\r\n case ActionTypes.showClock:\r\n classToUse = Namespace.css.clockContainer;\r\n this.display._update('clock');\r\n break;\r\n case ActionTypes.showHours:\r\n classToUse = Namespace.css.hourContainer;\r\n this.display._update(Unit.hours);\r\n break;\r\n case ActionTypes.showMinutes:\r\n classToUse = Namespace.css.minuteContainer;\r\n this.display._update(Unit.minutes);\r\n break;\r\n case ActionTypes.showSeconds:\r\n classToUse = Namespace.css.secondContainer;\r\n this.display._update(Unit.seconds);\r\n break;\r\n }\r\n\r\n ((\r\n this.display.widget.getElementsByClassName(classToUse)[0]\r\n )).style.display = 'grid';\r\n }\r\n\r\n private handleNextPrevious(action: ActionTypes) {\r\n const {unit, step} =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n if (action === ActionTypes.next)\r\n this.optionsStore.viewDate.manipulate(step, unit);\r\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\r\n this._eventEmitters.viewUpdate.emit();\r\n\r\n this.display._showMode();\r\n }\r\n\r\n /**\r\n * After setting the value it will either show the clock or hide the widget.\r\n * @param e\r\n */\r\n private hideOrClock(e) {\r\n if (\r\n this.optionsStore.options.display.components.useTwentyfourHour &&\r\n !this.optionsStore.options.display.components.minutes &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline\r\n ) {\r\n this.display.hide();\r\n } else {\r\n this.do(e, ActionTypes.showClock);\r\n }\r\n }\r\n\r\n /**\r\n * Common function to manipulate {@link lastPicked} by `unit`.\r\n * @param lastPicked\r\n * @param unit\r\n * @param value Value to change by\r\n */\r\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\r\n const newDate = lastPicked.manipulate(value, unit);\r\n if (this.validation.isValid(newDate, unit)) {\r\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\r\n }\r\n }\r\n}\r\n","import Display from './display/index';\r\nimport Dates from './dates';\r\nimport Actions from './actions';\r\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport Options from './utilities/options';\r\nimport {\r\n BaseEvent,\r\n ChangeEvent,\r\n ViewUpdateEvent,\r\n} from './utilities/event-types';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {\r\n serviceLocator,\r\n setupServiceLocator,\r\n} from './utilities/service-locator';\r\nimport CalendarModes from './utilities/calendar-modes';\r\nimport DefaultOptions from './utilities/default-options';\r\nimport ActionTypes from './utilities/action-types';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\nimport { ErrorMessages } from './utilities/errors';\r\n\r\n/**\r\n * A robust and powerful date/time picker component.\r\n */\r\nclass TempusDominus {\r\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\r\n private _isDisabled = false;\r\n private _toggle: HTMLElement;\r\n private _currentPromptTimeTimeout: any;\r\n private actions: Actions;\r\n private optionsStore: OptionsStore;\r\n private _eventEmitters: EventEmitters;\r\n display: Display;\r\n dates: Dates;\r\n\r\n constructor(element: HTMLElement, options: Options = {} as Options) {\r\n setupServiceLocator();\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.display = serviceLocator.locate(Display);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.actions = serviceLocator.locate(Actions);\r\n\r\n if (!element) {\r\n Namespace.errorMessages.mustProvideElement();\r\n }\r\n\r\n this.optionsStore.element = element;\r\n this._initializeOptions(options, DefaultOptions, true);\r\n this.optionsStore.viewDate.setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.unset = true;\r\n\r\n this._initializeInput();\r\n this._initializeToggle();\r\n\r\n if (this.optionsStore.options.display.inline) this.display.show();\r\n\r\n this._eventEmitters.triggerEvent.subscribe((e) => {\r\n this._triggerEvent(e);\r\n });\r\n\r\n this._eventEmitters.viewUpdate.subscribe(() => {\r\n this._viewUpdate();\r\n });\r\n }\r\n\r\n get viewDate() {\r\n return this.optionsStore.viewDate;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\r\n * @param options\r\n * @param reset\r\n * @public\r\n */\r\n updateOptions(options, reset = false): void {\r\n if (reset) this._initializeOptions(options, DefaultOptions);\r\n else this._initializeOptions(options, this.optionsStore.options);\r\n this.display._rebuild();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\r\n * @public\r\n */\r\n toggle(): void {\r\n if (this._isDisabled) return;\r\n this.display.toggle();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Shows the picker unless the picker is disabled.\r\n * @public\r\n */\r\n show(): void {\r\n if (this._isDisabled) return;\r\n this.display.show();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker unless the picker is disabled.\r\n * @public\r\n */\r\n hide(): void {\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Disables the picker and the target input field.\r\n * @public\r\n */\r\n disable(): void {\r\n this._isDisabled = true;\r\n // todo this might be undesired. If a dev disables the input field to\r\n // only allow using the picker, this will break that.\r\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Enables the picker and the target input field.\r\n * @public\r\n */\r\n enable(): void {\r\n this._isDisabled = false;\r\n this.optionsStore.input?.removeAttribute('disabled');\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Clears all the selected dates\r\n * @public\r\n */\r\n clear(): void {\r\n this.optionsStore.input.value = '';\r\n this.dates.clear();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\r\n * @param eventTypes See Namespace.Events\r\n * @param callbacks Function to call when event is triggered\r\n * @public\r\n */\r\n subscribe(\r\n eventTypes: string | string[],\r\n callbacks: (event: any) => void | ((event: any) => void)[]\r\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\r\n if (typeof eventTypes === 'string') {\r\n eventTypes = [eventTypes];\r\n }\r\n let callBackArray: any[];\r\n if (!Array.isArray(callbacks)) {\r\n callBackArray = [callbacks];\r\n } else {\r\n callBackArray = callbacks;\r\n }\r\n\r\n if (eventTypes.length !== callBackArray.length) {\r\n Namespace.errorMessages.subscribeMismatch();\r\n }\r\n\r\n const returnArray = [];\r\n\r\n for (let i = 0; i < eventTypes.length; i++) {\r\n const eventType = eventTypes[i];\r\n if (!Array.isArray(this._subscribers[eventType])) {\r\n this._subscribers[eventType] = [];\r\n }\r\n\r\n this._subscribers[eventType].push(callBackArray[i]);\r\n\r\n returnArray.push({\r\n unsubscribe: this._unsubscribe.bind(\r\n this,\r\n eventType,\r\n this._subscribers[eventType].length - 1\r\n ),\r\n });\r\n\r\n if (eventTypes.length === 1) {\r\n return returnArray[0];\r\n }\r\n }\r\n\r\n return returnArray;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker and removes event listeners\r\n */\r\n dispose() {\r\n this.display.hide();\r\n // this will clear the document click event listener\r\n this.display._dispose();\r\n this.optionsStore.input?.removeEventListener(\r\n 'change',\r\n this._inputChangeEvent\r\n );\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input?.removeEventListener(\r\n 'click',\r\n this._toggleClickEvent\r\n );\r\n }\r\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\r\n this._subscribers = {};\r\n }\r\n\r\n /**\r\n * Updates the options to use the provided language.\r\n * THe language file must be loaded first.\r\n * @param language\r\n */\r\n locale(language: string) {\r\n let asked = loadedLocales[language];\r\n if (!asked) return;\r\n this.updateOptions({\r\n localization: asked,\r\n });\r\n }\r\n\r\n /**\r\n * Triggers an event like ChangeEvent when the picker has updated the value\r\n * of a selected date.\r\n * @param event Accepts a BaseEvent object.\r\n * @private\r\n */\r\n private _triggerEvent(event: BaseEvent) {\r\n event.viewMode = this.optionsStore.currentView;\r\n\r\n const isChangeEvent = event.type === Namespace.events.change;\r\n if (isChangeEvent) {\r\n const { date, oldDate, isClear } = event as ChangeEvent;\r\n if (\r\n (date && oldDate && date.isSame(oldDate)) ||\r\n (!isClear && !date && !oldDate)\r\n ) {\r\n return;\r\n }\r\n this._handleAfterChangeEvent(event as ChangeEvent);\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent('change', { detail: event as any })\r\n );\r\n }\r\n\r\n this.optionsStore.element.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n if ((window as any).jQuery) {\r\n const $ = (window as any).jQuery;\r\n\r\n if (isChangeEvent && this.optionsStore.input) {\r\n $(this.optionsStore.input).trigger(event);\r\n } else {\r\n $(this.optionsStore.element).trigger(event);\r\n }\r\n }\r\n\r\n this._publish(event);\r\n }\r\n\r\n private _publish(event: BaseEvent) {\r\n // return if event is not subscribed\r\n if (!Array.isArray(this._subscribers[event.type])) {\r\n return;\r\n }\r\n\r\n // Trigger callback for each subscriber\r\n this._subscribers[event.type].forEach((callback) => {\r\n callback(event);\r\n });\r\n }\r\n\r\n /**\r\n * Fires a ViewUpdate event when, for example, the month view is changed.\r\n * @private\r\n */\r\n private _viewUpdate() {\r\n this._triggerEvent({\r\n type: Namespace.events.update,\r\n viewDate: this.optionsStore.viewDate.clone,\r\n } as ViewUpdateEvent);\r\n }\r\n\r\n private _unsubscribe(eventName, index) {\r\n this._subscribers[eventName].splice(index, 1);\r\n }\r\n\r\n /**\r\n * Merges two Option objects together and validates options type\r\n * @param config new Options\r\n * @param mergeTo Options to merge into\r\n * @param includeDataset When true, the elements data-td attributes will be included in the\r\n * @private\r\n */\r\n private _initializeOptions(\r\n config: Options,\r\n mergeTo: Options,\r\n includeDataset = false\r\n ): void {\r\n let newConfig = OptionConverter.deepCopy(config);\r\n newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);\r\n if (includeDataset)\r\n newConfig = OptionConverter._dataToOptions(\r\n this.optionsStore.element,\r\n newConfig\r\n );\r\n\r\n OptionConverter._validateConflicts(newConfig);\r\n\r\n newConfig.viewDate = newConfig.viewDate.setLocale(newConfig.localization.locale);\r\n\r\n if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {\r\n this.optionsStore.viewDate = newConfig.viewDate;\r\n }\r\n\r\n /**\r\n * Sets the minimum view allowed by the picker. For example the case of only\r\n * allowing year and month to be selected but not date.\r\n */\r\n if (newConfig.display.components.year) {\r\n this.optionsStore.minimumCalendarViewMode = 2;\r\n }\r\n if (newConfig.display.components.month) {\r\n this.optionsStore.minimumCalendarViewMode = 1;\r\n }\r\n if (newConfig.display.components.date) {\r\n this.optionsStore.minimumCalendarViewMode = 0;\r\n }\r\n\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n this.optionsStore.currentCalendarViewMode\r\n );\r\n\r\n // Update view mode if needed\r\n if (\r\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\r\n newConfig.display.viewMode\r\n ) {\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),\r\n this.optionsStore.minimumCalendarViewMode\r\n );\r\n }\r\n\r\n if (this.display?.isVisible) {\r\n this.display._update('all');\r\n }\r\n\r\n if (newConfig.display.components.useTwentyfourHour === undefined) {\r\n newConfig.display.components.useTwentyfourHour = !!!newConfig.viewDate.parts()?.dayPeriod;\r\n }\r\n\r\n\r\n this.optionsStore.options = newConfig;\r\n }\r\n\r\n /**\r\n * Checks if an input field is being used, attempts to locate one and sets an\r\n * event listener if found.\r\n * @private\r\n */\r\n private _initializeInput() {\r\n if (this.optionsStore.element.tagName == 'INPUT') {\r\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\r\n } else {\r\n let query = this.optionsStore.element.dataset.tdTargetInput;\r\n if (query == undefined || query == 'nearest') {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector('input');\r\n } else {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector(query);\r\n }\r\n }\r\n\r\n if (!this.optionsStore.input) return;\r\n\r\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n if (this.optionsStore.input.value) {\r\n this._inputChangeEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to locate a toggle for the picker and sets an event listener\r\n * @private\r\n */\r\n private _initializeToggle() {\r\n if (this.optionsStore.options.display.inline) return;\r\n let query = this.optionsStore.element.dataset.tdTargetToggle;\r\n if (query == 'nearest') {\r\n query = '[data-td-toggle=\"datetimepicker\"]';\r\n }\r\n this._toggle =\r\n query == undefined\r\n ? this.optionsStore.element\r\n : this.optionsStore.element.querySelector(query);\r\n this._toggle.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n /**\r\n * If the option is enabled this will render the clock view after a date pick.\r\n * @param e change event\r\n * @private\r\n */\r\n private _handleAfterChangeEvent(e: ChangeEvent) {\r\n if (\r\n // options is disabled\r\n !this.optionsStore.options.promptTimeOnDateChange ||\r\n this.optionsStore.options.display.inline ||\r\n this.optionsStore.options.display.sideBySide ||\r\n // time is disabled\r\n !this.display._hasTime ||\r\n // clock component is already showing\r\n this.display.widget\r\n ?.getElementsByClassName(Namespace.css.show)[0]\r\n .classList.contains(Namespace.css.timeContainer)\r\n )\r\n return;\r\n\r\n // First time ever. If useCurrent option is set to true (default), do nothing\r\n // because the first date is selected automatically.\r\n // or date didn't change (time did) or date changed because time did.\r\n if (\r\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\r\n (e.oldDate && e.date?.isSame(e.oldDate))\r\n ) {\r\n return;\r\n }\r\n\r\n clearTimeout(this._currentPromptTimeTimeout);\r\n this._currentPromptTimeTimeout = setTimeout(() => {\r\n if (this.display.widget) {\r\n this._eventEmitters.action.emit({\r\n e: {\r\n currentTarget: this.display.widget.querySelector(\r\n `.${Namespace.css.switch} div`\r\n ),\r\n },\r\n action: ActionTypes.togglePicker,\r\n });\r\n }\r\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\r\n }\r\n\r\n /**\r\n * Event for when the input field changes. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _inputChangeEvent = (event?: any) => {\r\n const internallyTriggered = event?.detail;\r\n if (internallyTriggered) return;\r\n\r\n const setViewDate = () => {\r\n if (this.dates.lastPicked)\r\n this.optionsStore.viewDate = this.dates.lastPicked.clone;\r\n };\r\n\r\n const value = this.optionsStore.input.value;\r\n if (this.optionsStore.options.multipleDates) {\r\n try {\r\n const valueSplit = value.split(\r\n this.optionsStore.options.multipleDatesSeparator\r\n );\r\n for (let i = 0; i < valueSplit.length; i++) {\r\n this.dates.setFromInput(valueSplit[i], i);\r\n }\r\n setViewDate();\r\n } catch {\r\n console.warn(\r\n 'TD: Something went wrong trying to set the multipleDates values from the input field.'\r\n );\r\n }\r\n } else {\r\n this.dates.setFromInput(value, 0);\r\n setViewDate();\r\n }\r\n };\r\n\r\n /**\r\n * Event for when the toggle is clicked. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _toggleClickEvent = () => {\r\n if ((this.optionsStore.element as any)?.disabled || this.optionsStore.input?.disabled) return\r\n this.toggle();\r\n };\r\n}\r\n\r\n/**\r\n * Whenever a locale is loaded via a plugin then store it here based on the\r\n * locale name. E.g. loadedLocales['ru']\r\n */\r\nconst loadedLocales = {};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a locale plugin.\r\n * @param l locale object for localization options\r\n */\r\nconst loadLocale = (l) => {\r\n if (loadedLocales[l.name]) return;\r\n loadedLocales[l.name] = l.localization;\r\n};\r\n\r\n/**\r\n * A sets the global localization options to the provided locale name.\r\n * `loadLocale` MUST be called first.\r\n * @param l\r\n */\r\nconst locale = (l: string) => {\r\n let asked = loadedLocales[l];\r\n if (!asked) return;\r\n DefaultOptions.localization = asked;\r\n};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a plugin to extend or override picker defaults.\r\n * @param plugin\r\n * @param option\r\n */\r\nconst extend = function (plugin, option) {\r\n if (!plugin) return tempusDominus;\r\n if (!plugin.installed) {\r\n // install plugin only once\r\n plugin(option, { TempusDominus, Dates, Display, DateTime, ErrorMessages }, tempusDominus);\r\n plugin.installed = true;\r\n }\r\n return tempusDominus;\r\n};\r\n\r\nconst version = '6.1.2';\r\n\r\nconst tempusDominus = {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version\r\n};\r\n\r\nexport {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version\r\n}\r\n"],"names":["ActionTypes","SecondDisplay"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuDA;AACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KA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EF;AACA;;;;AAIG;AACH,MAAM,MAAM,GAAG,UAAU,MAAM,EAAE,MAAM,EAAA;AACrC,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,aAAa,CAAC;AAClC,IAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;;AAErB,QAAA,MAAM,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,aAAa,CAAC,CAAC;AAC1F,QAAA,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;AACzB,KAAA;AACD,IAAA,OAAO,aAAa,CAAC;AACvB,EAAE;AAEI,MAAA,OAAO,GAAG,QAAQ;AAExB,MAAM,aAAa,GAAG;IACpB,aAAa;IACb,MAAM;IACN,UAAU;IACV,MAAM;IACN,SAAS;IACT,cAAc;IACd,QAAQ;IACR,IAAI;IACJ,OAAO;CACR;;;;"} \ No newline at end of file +{"version":3,"file":"tempus-dominus.esm.js","sources":["../../src/js/datetime.ts","../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/service-locator.ts","../../src/js/utilities/calendar-modes.ts","../../src/js/utilities/optionsStore.ts","../../src/js/validation.ts","../../src/js/utilities/event-emitter.ts","../../src/js/utilities/default-options.ts","../../src/js/utilities/optionConverter.ts","../../src/js/dates.ts","../../src/js/utilities/action-types.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.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/collapse.ts","../../src/js/display/index.ts","../../src/js/actions.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\r\n seconds = 'seconds',\r\n minutes = 'minutes',\r\n hours = 'hours',\r\n date = 'date',\r\n month = 'month',\r\n year = 'year',\r\n}\r\n\r\nconst twoDigitTemplate = {\r\n month: '2-digit',\r\n day: '2-digit',\r\n year: 'numeric',\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n second: '2-digit',\r\n hour12: true,\r\n}\r\n\r\nconst twoDigitTwentyFourTemplate = {\r\n hour: '2-digit',\r\n hour12: false\r\n}\r\n\r\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\r\n timeStyle?: 'short' | 'medium' | 'long';\r\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\r\n numberingSystem?: string;\r\n}\r\n\r\nexport const getFormatByUnit = (unit: Unit): object => {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric'\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n};\r\n\r\n/**\r\n * For the most part this object behaves exactly the same way\r\n * as the native Date object with a little extra spice.\r\n */\r\nexport class DateTime extends Date {\r\n /**\r\n * Used with Intl.DateTimeFormat\r\n */\r\n locale = 'default';\r\n\r\n /**\r\n * Chainable way to set the {@link locale}\r\n * @param value\r\n */\r\n setLocale(value: string): this {\r\n this.locale = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts a plain JS date object to a DateTime object.\r\n * Doing this allows access to format, etc.\r\n * @param date\r\n * @param locale\r\n */\r\n static convert(date: Date, locale: string = 'default'): DateTime {\r\n if (!date) throw new Error(`A date is required`);\r\n return new DateTime(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n ).setLocale(locale);\r\n }\r\n\r\n /**\r\n * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates.\r\n * @param input\r\n * @param localization\r\n */\r\n static fromString(input: string, localization: any): DateTime {\r\n return new DateTime(input);\r\n }\r\n\r\n /**\r\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\r\n */\r\n get clone() {\r\n return new DateTime(\r\n this.year,\r\n this.month,\r\n this.date,\r\n this.hours,\r\n this.minutes,\r\n this.seconds,\r\n this.getMilliseconds()\r\n ).setLocale(this.locale);\r\n }\r\n\r\n /**\r\n * Sets the current date to the start of the {@link unit} provided\r\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')\r\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\r\n * @param unit\r\n * @param startOfTheWeek Allows for the changing the start of the week.\r\n */\r\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(0);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(0, 0);\r\n break;\r\n case 'hours':\r\n this.setMinutes(0, 0, 0);\r\n break;\r\n case 'date':\r\n this.setHours(0, 0, 0, 0);\r\n break;\r\n case 'weekDay':\r\n this.startOf(Unit.date);\r\n if (this.weekDay === startOfTheWeek) break;\r\n let goBack = this.weekDay;\r\n if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek;\r\n this.manipulate(startOfTheWeek - goBack, Unit.date);\r\n break;\r\n case 'month':\r\n this.startOf(Unit.date);\r\n this.setDate(1);\r\n break;\r\n case 'year':\r\n this.startOf(Unit.date);\r\n this.setMonth(0, 1);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the current date to the end of the {@link unit} provided\r\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')\r\n * would return April 30, 2021, 11:59:59.999 PM\r\n * @param unit\r\n * @param startOfTheWeek\r\n */\r\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(999);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(59, 999);\r\n break;\r\n case 'hours':\r\n this.setMinutes(59, 59, 999);\r\n break;\r\n case 'date':\r\n this.setHours(23, 59, 59, 999);\r\n break;\r\n case 'weekDay':\r\n this.endOf(Unit.date);\r\n this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date);\r\n break;\r\n case 'month':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.month);\r\n this.setDate(0);\r\n break;\r\n case 'year':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.year);\r\n this.setDate(0);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Change a {@link unit} value. Value can be positive or negative\r\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')\r\n * would return May 30, 2021, 11:45:32.984 AM\r\n * @param value A positive or negative number\r\n * @param unit\r\n */\r\n manipulate(value: number, unit: Unit): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n this[unit] += value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a string format.\r\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\r\n * for valid templates and locale objects\r\n * @param template An object. Uses browser defaults otherwise.\r\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\r\n */\r\n format(template: DateTimeFormatOptions, locale = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, template).format(this);\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is before this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isBefore(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() < compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is after this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isAfter(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() > compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is same this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isSame(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() === compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n compare = DateTime.convert(compare);\r\n return (\r\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\r\n * @param left\r\n * @param right\r\n * @param unit.\r\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\r\n * If the inclusivity parameter is used, both indicators must be passed.\r\n */\r\n isBetween(\r\n left: DateTime,\r\n right: DateTime,\r\n unit?: Unit,\r\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\r\n ): boolean {\r\n if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n const leftInclusivity = inclusivity[0] === '(';\r\n const rightInclusivity = inclusivity[1] === ')';\r\n\r\n return (\r\n ((leftInclusivity\r\n ? this.isAfter(left, unit)\r\n : !this.isBefore(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isBefore(right, unit)\r\n : !this.isAfter(right, unit))) ||\r\n ((leftInclusivity\r\n ? this.isBefore(left, unit)\r\n : !this.isAfter(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isAfter(right, unit)\r\n : !this.isBefore(right, unit)))\r\n );\r\n }\r\n\r\n /**\r\n * Returns flattened object of the date. Does not include literals\r\n * @param locale\r\n * @param template\r\n */\r\n parts(\r\n locale = this.locale,\r\n template: any = { dateStyle: 'full', timeStyle: 'long' }\r\n ): any {\r\n const parts = {};\r\n new Intl.DateTimeFormat(locale, template)\r\n .formatToParts(this)\r\n .filter((x) => x.type !== 'literal')\r\n .forEach((x) => (parts[x.type] = x.value));\r\n return parts;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getSeconds()\r\n */\r\n get seconds(): number {\r\n return this.getSeconds();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setSeconds()\r\n */\r\n set seconds(value: number) {\r\n this.setSeconds(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get secondsFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).second;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMinutes()\r\n */\r\n get minutes(): number {\r\n return this.getMinutes();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMinutes()\r\n */\r\n set minutes(value: number) {\r\n this.setMinutes(value);\r\n }\r\n\r\n /**\r\n * Returns two digit minutes\r\n */\r\n get minutesFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).minute;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getHours()\r\n */\r\n get hours(): number {\r\n return this.getHours();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setHours()\r\n */\r\n set hours(value: number) {\r\n this.setHours(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get hoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTwentyFourTemplate).hour;\r\n }\r\n\r\n /**\r\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\r\n */\r\n get twelveHoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).hour;\r\n }\r\n\r\n /**\r\n * Get the meridiem of the date. E.g. AM or PM.\r\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\r\n * otherwise it will return AM or PM.\r\n * @param locale\r\n */\r\n meridiem(locale: string = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, {\r\n hour: 'numeric',\r\n hour12: true\r\n } as any)\r\n .formatToParts(this)\r\n .find((p) => p.type === 'dayPeriod')?.value;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDate()\r\n */\r\n get date(): number {\r\n return this.getDate();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setDate()\r\n */\r\n set date(value: number) {\r\n this.setDate(value);\r\n }\r\n\r\n /**\r\n * Return two digit date\r\n */\r\n get dateFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).day;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDay()\r\n */\r\n get weekDay(): number {\r\n return this.getDay();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMonth()\r\n */\r\n get month(): number {\r\n return this.getMonth();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMonth()\r\n */\r\n set month(value: number) {\r\n const targetMonth = new Date(this.year, value + 1);\r\n targetMonth.setDate(0);\r\n const endOfMonth = targetMonth.getDate();\r\n if (this.date > endOfMonth) {\r\n this.date = endOfMonth;\r\n }\r\n this.setMonth(value);\r\n }\r\n\r\n /**\r\n * Return two digit, human expected month. E.g. January = 1, December = 12\r\n */\r\n get monthFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).month;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getFullYear()\r\n */\r\n get year(): number {\r\n return this.getFullYear();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setFullYear()\r\n */\r\n set year(value: number) {\r\n this.setFullYear(value);\r\n }\r\n\r\n // borrowed a bunch of stuff from Luxon\r\n /**\r\n * Gets the week of the year\r\n */\r\n get week(): number {\r\n const ordinal = this.computeOrdinal(),\r\n weekday = this.getUTCDay();\r\n\r\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\r\n\r\n if (weekNumber < 1) {\r\n weekNumber = this.weeksInWeekYear(this.year - 1);\r\n } else if (weekNumber > this.weeksInWeekYear(this.year)) {\r\n weekNumber = 1;\r\n }\r\n\r\n return weekNumber;\r\n }\r\n\r\n weeksInWeekYear(weekYear) {\r\n const p1 =\r\n (weekYear +\r\n Math.floor(weekYear / 4) -\r\n Math.floor(weekYear / 100) +\r\n Math.floor(weekYear / 400)) %\r\n 7,\r\n last = weekYear - 1,\r\n p2 =\r\n (last +\r\n Math.floor(last / 4) -\r\n Math.floor(last / 100) +\r\n Math.floor(last / 400)) %\r\n 7;\r\n return p1 === 4 || p2 === 3 ? 53 : 52;\r\n }\r\n\r\n get isLeapYear() {\r\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\r\n }\r\n\r\n private computeOrdinal() {\r\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\r\n }\r\n\r\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\r\n}\r\n","export class TdError extends Error {\r\n code: number;\r\n}\r\n\r\nexport class ErrorMessages {\r\n private base = 'TD:';\r\n\r\n //#region out to console\r\n\r\n /**\r\n * Throws an error indicating that a key in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOption(optionName: string) {\r\n const error = new TdError(\r\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\r\n );\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error indicating that one more keys in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOptions(optionName: string[]) {\r\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option is provide an unsupported value.\r\n * For example a value of 'cheese' for toolbarPlacement which only supports\r\n * 'top', 'bottom', 'default'.\r\n * @param optionName\r\n * @param badValue\r\n * @param validOptions\r\n */\r\n unexpectedOptionValue(\r\n optionName: string,\r\n badValue: string,\r\n validOptions: string[]\r\n ) {\r\n const error = new TdError(\r\n `${\r\n this.base\r\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\r\n ', '\r\n )}`\r\n );\r\n error.code = 2;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is the wrong type.\r\n * For example a string value was provided to multipleDates which only\r\n * supports true or false.\r\n * @param optionName\r\n * @param badType\r\n * @param expectedType\r\n */\r\n typeMismatch(optionName: string, badType: string, expectedType: string) {\r\n const error = new TdError(\r\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\r\n );\r\n error.code = 3;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is outside of the expected range.\r\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\r\n * @param optionName\r\n * @param lower\r\n * @param upper\r\n */\r\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\r\n const error = new TdError(\r\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\r\n );\r\n error.code = 4;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when a value for a date options couldn't be parsed. Either\r\n * the option was an invalid string or an invalid Date object.\r\n * @param optionName\r\n * @param date\r\n * @param soft If true, logs a warning instead of an error.\r\n */\r\n failedToParseDate(optionName: string, date: any, soft = false) {\r\n const error = new TdError(\r\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\r\n );\r\n error.code = 5;\r\n if (!soft) throw error;\r\n console.warn(error);\r\n }\r\n\r\n /**\r\n * Throws when an element to attach to was not provided in the constructor.\r\n */\r\n mustProvideElement() {\r\n const error = new TdError(`${this.base} No element was provided.`);\r\n error.code = 6;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if providing an array for the events to subscribe method doesn't have\r\n * the same number of callbacks. E.g., subscribe([1,2], [1])\r\n */\r\n subscribeMismatch() {\r\n const error = new TdError(\r\n `${this.base} The subscribed events does not match the number of callbacks`\r\n );\r\n error.code = 7;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\r\n */\r\n conflictingConfiguration(message?: string) {\r\n const error = new TdError(\r\n `${this.base} A configuration value conflicts with another rule. ${message}`\r\n );\r\n error.code = 8;\r\n throw error;\r\n }\r\n\r\n /**\r\n * customDateFormat errors\r\n */\r\n customDateFormatError(message?: string) {\r\n const error = new TdError(\r\n `${this.base} customDateFormat: ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Logs a warning if a date option value is provided as a string, instead of\r\n * a date/datetime object.\r\n */\r\n dateString() {\r\n console.warn(\r\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`\r\n );\r\n }\r\n\r\n throwError(message) {\r\n const error = new TdError(\r\n `${this.base} ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region used with notify.error\r\n\r\n /**\r\n * Used with an Error Event type if the user selects a date that\r\n * fails restriction validation.\r\n */\r\n failedToSetInvalidDate = 'Failed to set invalid date';\r\n\r\n /**\r\n * Used with an Error Event type when a user changes the value of the\r\n * input field directly, and does not provide a valid date.\r\n */\r\n failedToParseInput = 'Failed parse input field';\r\n\r\n //#endregion\r\n}\r\n","import { ErrorMessages } from './errors';\r\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\r\nconst NAME = 'tempus-dominus',\r\n dataKey = 'td';\r\n\r\n/**\r\n * Events\r\n */\r\nclass Events {\r\n key = `.${dataKey}`;\r\n\r\n /**\r\n * Change event. Fired when the user selects a date.\r\n * See also EventTypes.ChangeEvent\r\n */\r\n change = `change${this.key}`;\r\n\r\n /**\r\n * Emit when the view changes for example from month view to the year view.\r\n * See also EventTypes.ViewUpdateEvent\r\n */\r\n update = `update${this.key}`;\r\n\r\n /**\r\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\r\n * See also EventTypes.FailEvent\r\n */\r\n error = `error${this.key}`;\r\n\r\n /**\r\n * Show event\r\n * @event Events#show\r\n */\r\n show = `show${this.key}`;\r\n\r\n /**\r\n * Hide event\r\n * @event Events#hide\r\n */\r\n hide = `hide${this.key}`;\r\n\r\n // blur and focus are used in the jQuery provider but are otherwise unused.\r\n // keyup/down will be used later for keybinding options\r\n\r\n blur = `blur${this.key}`;\r\n focus = `focus${this.key}`;\r\n keyup = `keyup${this.key}`;\r\n keydown = `keydown${this.key}`;\r\n}\r\n\r\nclass Css {\r\n /**\r\n * The outer element for the widget.\r\n */\r\n widget = `${NAME}-widget`;\r\n\r\n /**\r\n * Hold the previous, next and switcher divs\r\n */\r\n calendarHeader = 'calendar-header';\r\n\r\n /**\r\n * The element for the action to change the calendar view. E.g. month -> year.\r\n */\r\n switch = 'picker-switch';\r\n\r\n /**\r\n * The elements for all the toolbar options\r\n */\r\n toolbar = 'toolbar';\r\n\r\n /**\r\n * Disables the hover and rounding affect.\r\n */\r\n noHighlight = 'no-highlight';\r\n\r\n /**\r\n * Applied to the widget element when the side by side option is in use.\r\n */\r\n sideBySide = 'timepicker-sbs';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> July\r\n */\r\n previous = 'previous';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> September\r\n */\r\n next = 'next';\r\n\r\n /**\r\n * Applied to any action that would violate any restriction options. ALso applied\r\n * to an input field if the disabled function is called.\r\n */\r\n disabled = 'disabled';\r\n\r\n /**\r\n * Applied to any date that is less than requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n old = 'old';\r\n\r\n /**\r\n * Applied to any date that is greater than of requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n new = 'new';\r\n\r\n /**\r\n * Applied to any date that is currently selected.\r\n */\r\n active = 'active';\r\n\r\n //#region date element\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n dateContainer = 'date-container';\r\n\r\n /**\r\n * The outer element for the decades view.\r\n */\r\n decadesContainer = `${this.dateContainer}-decades`;\r\n\r\n /**\r\n * Applied to elements within the decades container, e.g. 2020, 2030\r\n */\r\n decade = 'decade';\r\n\r\n /**\r\n * The outer element for the years view.\r\n */\r\n yearsContainer = `${this.dateContainer}-years`;\r\n\r\n /**\r\n * Applied to elements within the years container, e.g. 2021, 2021\r\n */\r\n year = 'year';\r\n\r\n /**\r\n * The outer element for the month view.\r\n */\r\n monthsContainer = `${this.dateContainer}-months`;\r\n\r\n /**\r\n * Applied to elements within the month container, e.g. January, February\r\n */\r\n month = 'month';\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n daysContainer = `${this.dateContainer}-days`;\r\n\r\n /**\r\n * Applied to elements within the day container, e.g. 1, 2..31\r\n */\r\n day = 'day';\r\n\r\n /**\r\n * If display.calendarWeeks is enabled, a column displaying the week of year\r\n * is shown. This class is applied to each cell in that column.\r\n */\r\n calendarWeeks = 'cw';\r\n\r\n /**\r\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\r\n */\r\n dayOfTheWeek = 'dow';\r\n\r\n /**\r\n * Applied to the current date on the calendar view.\r\n */\r\n today = 'today';\r\n\r\n /**\r\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\r\n */\r\n weekend = 'weekend';\r\n\r\n //#endregion\r\n\r\n //#region time element\r\n\r\n /**\r\n * The outer element for all time related elements.\r\n */\r\n timeContainer = 'time-container';\r\n\r\n /**\r\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\r\n */\r\n separator = 'separator';\r\n\r\n /**\r\n * The outer element for the clock view.\r\n */\r\n clockContainer = `${this.timeContainer}-clock`;\r\n\r\n /**\r\n * The outer element for the hours selection view.\r\n */\r\n hourContainer = `${this.timeContainer}-hour`;\r\n\r\n /**\r\n * The outer element for the minutes selection view.\r\n */\r\n minuteContainer = `${this.timeContainer}-minute`;\r\n\r\n /**\r\n * The outer element for the seconds selection view.\r\n */\r\n secondContainer = `${this.timeContainer}-second`;\r\n\r\n /**\r\n * Applied to each element in the hours selection view.\r\n */\r\n hour = 'hour';\r\n\r\n /**\r\n * Applied to each element in the minutes selection view.\r\n */\r\n minute = 'minute';\r\n\r\n /**\r\n * Applied to each element in the seconds selection view.\r\n */\r\n second = 'second';\r\n\r\n /**\r\n * Applied AM/PM toggle button.\r\n */\r\n toggleMeridiem = 'toggleMeridiem';\r\n\r\n //#endregion\r\n\r\n //#region collapse\r\n\r\n /**\r\n * Applied the element of the current view mode, e.g. calendar or clock.\r\n */\r\n show = 'show';\r\n\r\n /**\r\n * Applied to the currently showing view mode during a transition\r\n * between calendar and clock views\r\n */\r\n collapsing = 'td-collapsing';\r\n\r\n /**\r\n * Applied to the currently hidden view mode.\r\n */\r\n collapse = 'td-collapse';\r\n\r\n //#endregion\r\n\r\n /**\r\n * Applied to the widget when the option display.inline is enabled.\r\n */\r\n inline = 'inline';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is light.\r\n */\r\n lightTheme = 'light';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is dark.\r\n */\r\n darkTheme = 'dark';\r\n\r\n /**\r\n * Used for detecting if the system color preference is dark mode\r\n */\r\n isDarkPreferredQuery = '(prefers-color-scheme: dark)';\r\n}\r\n\r\nexport default class Namespace {\r\n static NAME = NAME;\r\n // noinspection JSUnusedGlobalSymbols\r\n static dataKey = dataKey;\r\n\r\n static events = new Events();\r\n\r\n static css = new Css();\r\n\r\n static errorMessages = new ErrorMessages();\r\n}\r\n","export declare type Constructable = new (...args: any[]) => T;\r\n\r\nclass ServiceLocator {\r\n private cache: Map, unknown | Symbol> = new Map();\r\n\r\n locate(identifier: Constructable): T {\r\n const service = this.cache.get(identifier);\r\n if (service) return service as T;\r\n const value = new identifier();\r\n this.cache.set(identifier, value);\r\n return value;\r\n }\r\n}\r\nexport const setupServiceLocator = () => {\r\n serviceLocator = new ServiceLocator();\r\n}\r\n\r\nexport let serviceLocator: ServiceLocator;\r\n","import { Unit } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\n\nconst CalendarModes: {\n name: keyof ViewMode;\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 default CalendarModes;\n","import {DateTime} from \"../datetime\";\r\nimport CalendarModes from \"./calendar-modes\";\r\nimport ViewMode from \"./view-mode\";\r\nimport Options from \"./options\";\r\n\r\nexport class OptionsStore {\r\n options: Options;\r\n element: HTMLElement;\r\n viewDate = new DateTime();\r\n input: HTMLInputElement;\r\n unset: boolean;\r\n private _currentCalendarViewMode = 0;\r\n get currentCalendarViewMode() {\r\n return this._currentCalendarViewMode;\r\n }\r\n\r\n set currentCalendarViewMode(value) {\r\n this._currentCalendarViewMode = value;\r\n this.currentView = CalendarModes[value].name;\r\n }\r\n\r\n /**\r\n * When switching back to the calendar from the clock,\r\n * this sets currentView to the correct calendar view.\r\n */\r\n refreshCurrentView() {\r\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\r\n }\r\n\r\n minimumCalendarViewMode = 0;\r\n currentView: keyof ViewMode = 'calendar';\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\n\r\n/**\r\n * Main class for date validation rules based on the options provided.\r\n */\r\nexport default class Validation {\r\n private optionsStore: OptionsStore;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n }\r\n\r\n /**\r\n * Checks to see if the target date is valid based on the rules provided in the options.\r\n * Granularity can be provided to check portions of the date instead of the whole.\r\n * @param targetDate\r\n * @param granularity\r\n */\r\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\r\n if (\r\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\r\n this._isInDisabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\r\n !this._isInEnabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n granularity !== Unit.month &&\r\n granularity !== Unit.year &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\r\n targetDate.weekDay\r\n ) !== -1\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.optionsStore.options.restrictions.minDate &&\r\n targetDate.isBefore(\r\n this.optionsStore.options.restrictions.minDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.maxDate &&\r\n targetDate.isAfter(\r\n this.optionsStore.options.restrictions.maxDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n granularity === Unit.hours ||\r\n granularity === Unit.minutes ||\r\n granularity === Unit.seconds\r\n ) {\r\n if (\r\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\r\n this._isInDisabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\r\n !this._isInEnabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0\r\n ) {\r\n for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) {\r\n if (\r\n targetDate.isBetween(\r\n disabledTimeIntervals.from,\r\n disabledTimeIntervals.to\r\n )\r\n )\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledDates ||\r\n this.optionsStore.options.restrictions.disabledDates.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.disabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledDates ||\r\n this.optionsStore.options.restrictions.enabledDates.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.enabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledHours ||\r\n this.optionsStore.options.restrictions.disabledHours.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.disabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledHours ||\r\n this.optionsStore.options.restrictions.enabledHours.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.enabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n}\r\n","import { Unit } from '../datetime';\r\nimport ActionTypes from './action-types';\r\nimport { BaseEvent } from './event-types';\r\n\r\nexport type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all';\r\n\r\nexport class EventEmitter {\r\n private subscribers: ((value?: T) => void)[] = [];\r\n\r\n subscribe(callback: (value: T) => void) {\r\n this.subscribers.push(callback);\r\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\r\n }\r\n\r\n unsubscribe(index: number) {\r\n this.subscribers.splice(index, 1);\r\n }\r\n\r\n emit(value?: T) {\r\n this.subscribers.forEach((callback) => {\r\n callback(value);\r\n });\r\n }\r\n\r\n destroy() {\r\n this.subscribers = null;\r\n this.subscribers = [];\r\n }\r\n}\r\n\r\nexport class EventEmitters {\r\n triggerEvent = new EventEmitter();\r\n viewUpdate = new EventEmitter();\r\n updateDisplay = new EventEmitter();\r\n action = new EventEmitter<{ e: any; action?: ActionTypes }>();\r\n\r\n destroy() {\r\n this.triggerEvent.destroy();\r\n this.viewUpdate.destroy();\r\n this.updateDisplay.destroy();\r\n this.action.destroy();\r\n }\r\n}\r\n","import Options from './options';\r\nimport { DateTime } from '../datetime';\r\n\r\nconst DefaultOptions: Options = {\r\n restrictions: {\r\n minDate: undefined,\r\n maxDate: undefined,\r\n disabledDates: [],\r\n enabledDates: [],\r\n daysOfWeekDisabled: [],\r\n disabledTimeIntervals: [],\r\n disabledHours: [],\r\n enabledHours: []\r\n },\r\n display: {\r\n icons: {\r\n type: 'icons',\r\n time: 'fa-solid fa-clock',\r\n date: 'fa-solid fa-calendar',\r\n up: 'fa-solid fa-arrow-up',\r\n down: 'fa-solid fa-arrow-down',\r\n previous: 'fa-solid fa-chevron-left',\r\n next: 'fa-solid fa-chevron-right',\r\n today: 'fa-solid fa-calendar-check',\r\n clear: 'fa-solid fa-trash',\r\n close: 'fa-solid fa-xmark'\r\n },\r\n sideBySide: false,\r\n calendarWeeks: false,\r\n viewMode: 'calendar',\r\n toolbarPlacement: 'bottom',\r\n keepOpen: false,\r\n buttons: {\r\n today: false,\r\n clear: false,\r\n close: false\r\n },\r\n components: {\r\n calendar: true,\r\n date: true,\r\n month: true,\r\n year: true,\r\n decades: true,\r\n clock: true,\r\n hours: true,\r\n minutes: true,\r\n seconds: false,\r\n useTwentyfourHour: undefined\r\n },\r\n inline: false,\r\n theme: 'auto'\r\n },\r\n stepping: 1,\r\n useCurrent: true,\r\n defaultDate: undefined,\r\n localization: {\r\n today: 'Go to today',\r\n clear: 'Clear selection',\r\n close: 'Close the picker',\r\n selectMonth: 'Select Month',\r\n previousMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n selectYear: 'Select Year',\r\n previousYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n selectDecade: 'Select Decade',\r\n previousDecade: 'Previous Decade',\r\n nextDecade: 'Next Decade',\r\n previousCentury: 'Previous Century',\r\n nextCentury: 'Next Century',\r\n pickHour: 'Pick Hour',\r\n incrementHour: 'Increment Hour',\r\n decrementHour: 'Decrement Hour',\r\n pickMinute: 'Pick Minute',\r\n incrementMinute: 'Increment Minute',\r\n decrementMinute: 'Decrement Minute',\r\n pickSecond: 'Pick Second',\r\n incrementSecond: 'Increment Second',\r\n decrementSecond: 'Decrement Second',\r\n toggleMeridiem: 'Toggle Meridiem',\r\n selectTime: 'Select Time',\r\n selectDate: 'Select Date',\r\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\r\n locale: 'default',\r\n startOfTheWeek: 0,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n dateFormats: {\r\n LTS: 'h:mm:ss T',\r\n LT: 'h:mm T',\r\n L: 'MM/dd/yyyy',\r\n LL: 'MMMM d, yyyy',\r\n LLL: 'MMMM d, yyyy h:mm T',\r\n LLLL: 'dddd, MMMM d, yyyy h:mm T',\r\n },\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n ordinal: (n) => n,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n format: 'L'\r\n },\r\n keepInvalid: false,\r\n debug: false,\r\n allowInputToggle: false,\r\n viewDate: new DateTime(),\r\n multipleDates: false,\r\n multipleDatesSeparator: '; ',\r\n promptTimeOnDateChange: false,\r\n promptTimeOnDateChangeTransitionDelay: 200,\r\n meta: {},\r\n container: undefined\r\n};\r\n\r\nexport default DefaultOptions;\r\n","import Namespace from './namespace';\r\nimport { DateTime } from '../datetime';\r\nimport DefaultOptions from './default-options';\r\nimport Options, { FormatLocalization } from './options';\r\n\r\nexport class OptionConverter {\r\n\r\n private static ignoreProperties = ['meta', 'dayViewHeaderFormat',\r\n 'container', 'dateForms', 'ordinal'];\r\n\r\n static deepCopy(input): Options {\r\n const o = {};\r\n\r\n Object.keys(input).forEach((key) => {\r\n const inputElement = input[key];\r\n o[key] = inputElement;\r\n if (typeof inputElement !== 'object' ||\r\n inputElement instanceof HTMLElement ||\r\n inputElement instanceof Element ||\r\n inputElement instanceof Date) return;\r\n if (!Array.isArray(inputElement)) {\r\n o[key] = OptionConverter.deepCopy(inputElement);\r\n }\r\n });\r\n\r\n return o;\r\n }\r\n\r\n private static isValue = a => a != null; // everything except undefined + null\r\n\r\n /**\r\n * Finds value out of an object based on a string, period delimited, path\r\n * @param paths\r\n * @param obj\r\n */\r\n static objectPath(paths: string, obj) {\r\n if (paths.charAt(0) === '.')\r\n paths = paths.slice(1);\r\n if (!paths) return obj;\r\n return paths.split('.')\r\n .reduce((value, key) => (OptionConverter.isValue(value) || OptionConverter.isValue(value[key]) ?\r\n value[key] :\r\n undefined), obj);\r\n }\r\n\r\n /**\r\n * The spread operator caused sub keys to be missing after merging.\r\n * This is to fix that issue by using spread on the child objects first.\r\n * Also handles complex options like disabledDates\r\n * @param provided An option from new providedOptions\r\n * @param copyTo Destination object. This was added to prevent reference copies\r\n * @param path\r\n * @param localization\r\n */\r\n static spread(provided, copyTo, path = '', localization: FormatLocalization) {\r\n const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);\r\n\r\n const unsupportedOptions = Object.keys(provided).filter(\r\n (x) => !Object.keys(defaultOptions).includes(x)\r\n );\r\n\r\n if (unsupportedOptions.length > 0) {\r\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\r\n\r\n const errors = unsupportedOptions.map((x) => {\r\n let error = `\"${path}.${x}\" in not a known option.`;\r\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\r\n if (didYouMean) error += ` Did you mean \"${didYouMean}\"?`;\r\n return error;\r\n });\r\n Namespace.errorMessages.unexpectedOptions(errors);\r\n }\r\n\r\n Object.keys(provided).filter(key => key !== '__proto__' && key !== 'constructor').forEach((key) => {\r\n path += `.${key}`;\r\n if (path.charAt(0) === '.') path = path.slice(1);\r\n\r\n const defaultOptionValue = defaultOptions[key];\r\n let providedType = typeof provided[key];\r\n let defaultType = typeof defaultOptionValue;\r\n let value = provided[key];\r\n\r\n if (value === undefined || value === null) {\r\n copyTo[key] = value;\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n return;\r\n }\r\n\r\n if (typeof defaultOptionValue === 'object' &&\r\n !Array.isArray(provided[key]) &&\r\n !(defaultOptionValue instanceof Date || OptionConverter.ignoreProperties.includes(key))) {\r\n OptionConverter.spread(provided[key], copyTo[key], path, localization);\r\n } else {\r\n copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization);\r\n }\r\n\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n });\r\n }\r\n\r\n static processKey(key, value, providedType, defaultType, path, localization: FormatLocalization) {\r\n switch (key) {\r\n case 'defaultDate': {\r\n const dateTime = this.dateConversion(value, 'defaultDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'defaultDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'viewDate': {\r\n const dateTime = this.dateConversion(value, 'viewDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'viewDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'minDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.minDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.minDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'maxDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.maxDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.maxDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'disabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.disabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.disabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'enabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.enabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.enabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'daysOfWeekDisabled':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.daysOfWeekDisabled',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 6).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.daysOfWeekDisabled',\r\n 0,\r\n 6\r\n );\r\n return value;\r\n case 'enabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.enabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.disabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledTimeIntervals':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n key,\r\n providedType,\r\n 'array of { from: DateTime|Date, to: DateTime|Date }'\r\n );\r\n }\r\n const valueObject = value as { from: any; to: any }[];\r\n for (let i = 0; i < valueObject.length; i++) {\r\n Object.keys(valueObject[i]).forEach((vk) => {\r\n const subOptionName = `${key}[${i}].${vk}`;\r\n let d = valueObject[i][vk];\r\n const dateTime = this.dateConversion(d, subOptionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n subOptionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization.locale);\r\n valueObject[i][vk] = dateTime;\r\n });\r\n }\r\n return valueObject;\r\n case 'toolbarPlacement':\r\n case 'type':\r\n case 'viewMode':\r\n case 'theme':\r\n const optionValues = {\r\n toolbarPlacement: ['top', 'bottom', 'default'],\r\n type: ['icons', 'sprites'],\r\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\r\n theme: ['light', 'dark', 'auto']\r\n };\r\n const keyOptions = optionValues[key];\r\n if (!keyOptions.includes(value))\r\n Namespace.errorMessages.unexpectedOptionValue(\r\n path.substring(1),\r\n value,\r\n keyOptions\r\n );\r\n\r\n return value;\r\n case 'meta':\r\n case 'dayViewHeaderFormat':\r\n return value;\r\n case 'container':\r\n if (\r\n value &&\r\n !(\r\n value instanceof HTMLElement ||\r\n value instanceof Element ||\r\n value?.appendChild\r\n )\r\n ) {\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n typeof value,\r\n 'HTMLElement'\r\n );\r\n }\r\n return value;\r\n case 'useTwentyfourHour':\r\n if (value === undefined || providedType === 'boolean') return value;\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n break;\r\n default:\r\n switch (defaultType) {\r\n case 'boolean':\r\n return value === 'true' || value === true;\r\n case 'number':\r\n return +value;\r\n case 'string':\r\n return value.toString();\r\n case 'object':\r\n return {};\r\n case 'function':\r\n return value;\r\n default:\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n }\r\n }\r\n }\r\n\r\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\r\n const newConfig = OptionConverter.deepCopy(mergeTo);\r\n //see if the options specify a locale\r\n const localization =\r\n mergeTo.localization?.locale !== 'default'\r\n ? mergeTo.localization\r\n : providedOptions?.localization || DefaultOptions.localization;\r\n\r\n OptionConverter.spread(providedOptions, newConfig, '', localization);\r\n\r\n return newConfig;\r\n }\r\n\r\n static _dataToOptions(element, options: Options): Options {\r\n const eData = JSON.parse(JSON.stringify(element.dataset));\r\n\r\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\r\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\r\n\r\n if (\r\n !eData ||\r\n Object.keys(eData).length === 0 ||\r\n eData.constructor !== DOMStringMap\r\n )\r\n return options;\r\n let dataOptions = {} as Options;\r\n\r\n // because dataset returns camelCase including the 'td' key the option\r\n // key won't align\r\n const objectToNormalized = (object) => {\r\n const lowered = {};\r\n Object.keys(object).forEach((x) => {\r\n lowered[x.toLowerCase()] = x;\r\n });\r\n\r\n return lowered;\r\n };\r\n\r\n const rabbitHole = (\r\n split: string[],\r\n index: number,\r\n optionSubgroup: {},\r\n value: any\r\n ) => {\r\n // first round = display { ... }\r\n const normalizedOptions = objectToNormalized(optionSubgroup);\r\n\r\n const keyOption = normalizedOptions[split[index].toLowerCase()];\r\n const internalObject = {};\r\n\r\n if (keyOption === undefined) return internalObject;\r\n\r\n // if this is another object, continue down the rabbit hole\r\n if (optionSubgroup[keyOption].constructor === Object) {\r\n index++;\r\n internalObject[keyOption] = rabbitHole(\r\n split,\r\n index,\r\n optionSubgroup[keyOption],\r\n value\r\n );\r\n } else {\r\n internalObject[keyOption] = value;\r\n }\r\n return internalObject;\r\n };\r\n const optionsLower = objectToNormalized(options);\r\n\r\n Object.keys(eData)\r\n .filter((x) => x.startsWith(Namespace.dataKey))\r\n .map((x) => x.substring(2))\r\n .forEach((key) => {\r\n let keyOption = optionsLower[key.toLowerCase()];\r\n\r\n // dataset merges dashes to camelCase... yay\r\n // i.e. key = display_components_seconds\r\n if (key.includes('_')) {\r\n // [display, components, seconds]\r\n const split = key.split('_');\r\n // display\r\n keyOption = optionsLower[split[0].toLowerCase()];\r\n if (\r\n keyOption !== undefined &&\r\n options[keyOption].constructor === Object\r\n ) {\r\n dataOptions[keyOption] = rabbitHole(\r\n split,\r\n 1,\r\n options[keyOption],\r\n eData[`td${key}`]\r\n );\r\n }\r\n }\r\n // or key = multipleDate\r\n else if (keyOption !== undefined) {\r\n dataOptions[keyOption] = eData[`td${key}`];\r\n }\r\n });\r\n\r\n return this._mergeOptions(dataOptions, options);\r\n }\r\n\r\n /**\r\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\r\n * @param d If a string will attempt creating a date from it.\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n * @private\r\n */\r\n static _dateTypeCheck(d: any, localization: FormatLocalization): DateTime | null {\r\n if (d.constructor.name === DateTime.name) return d;\r\n if (d.constructor.name === Date.name) {\r\n return DateTime.convert(d);\r\n }\r\n if (typeof d === typeof '') {\r\n const dateTime = DateTime.fromString(d, localization);\r\n if (JSON.stringify(dateTime) === 'null') {\r\n return null;\r\n }\r\n return dateTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of Date or DateTime\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n * @param localization\r\n */\r\n static _typeCheckDateArray(\r\n optionName: string,\r\n value,\r\n providedType: string,\r\n localization: FormatLocalization\r\n ) {\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of DateTime or Date'\r\n );\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n let d = value[i];\r\n const dateTime = this.dateConversion(d, optionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization?.locale ?? 'default');\r\n value[i] = dateTime;\r\n }\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of numbers\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckNumberArray(\r\n optionName: string,\r\n value,\r\n providedType: string\r\n ) {\r\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of numbers'\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to convert `d` to a DateTime object\r\n * @param d value to convert\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n */\r\n static dateConversion(d: any, optionName: string, localization: FormatLocalization): DateTime {\r\n if (typeof d === typeof '' && optionName !== 'input') {\r\n Namespace.errorMessages.dateString();\r\n }\r\n\r\n const converted = this._dateTypeCheck(d, localization);\r\n\r\n if (!converted) {\r\n Namespace.errorMessages.failedToParseDate(\r\n optionName,\r\n d,\r\n optionName === 'input'\r\n );\r\n }\r\n return converted;\r\n }\r\n\r\n private static _flattenDefaults: string[];\r\n\r\n private static getFlattenDefaultOptions(): string[] {\r\n if (this._flattenDefaults) return this._flattenDefaults;\r\n const deepKeys = (t, pre = []) => {\r\n if (Array.isArray(t)) return [];\r\n if (Object(t) === t) {\r\n return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));\r\n } else {\r\n return pre.join('.');\r\n }\r\n };\r\n\r\n this._flattenDefaults = deepKeys(DefaultOptions);\r\n\r\n return this._flattenDefaults;\r\n }\r\n\r\n /**\r\n * Some options conflict like min/max date. Verify that these kinds of options\r\n * are set correctly.\r\n * @param config\r\n */\r\n static _validateConflicts(config: Options) {\r\n if (\r\n config.display.sideBySide &&\r\n (!config.display.components.clock ||\r\n !(\r\n config.display.components.hours ||\r\n config.display.components.minutes ||\r\n config.display.components.seconds\r\n ))\r\n ) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'Cannot use side by side mode without the clock components'\r\n );\r\n }\r\n\r\n if (config.restrictions.minDate && config.restrictions.maxDate) {\r\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'minDate is after maxDate'\r\n );\r\n }\r\n\r\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'maxDate is before minDate'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\r\nimport Validation from './validation';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\n\r\nexport default class Dates {\r\n private _dates: DateTime[] = [];\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n }\r\n\r\n /**\r\n * Returns the array of selected dates\r\n */\r\n get picked(): DateTime[] {\r\n return this._dates;\r\n }\r\n\r\n /**\r\n * Returns the last picked value.\r\n */\r\n get lastPicked(): DateTime {\r\n return this._dates[this.lastPickedIndex];\r\n }\r\n\r\n /**\r\n * Returns the length of picked dates -1 or 0 if none are selected.\r\n */\r\n get lastPickedIndex(): number {\r\n if (this._dates.length === 0) return 0;\r\n return this._dates.length - 1;\r\n }\r\n\r\n /**\r\n * Formats a DateTime object to a string. Used when setting the input value.\r\n * @param date\r\n */\r\n formatInput(date: DateTime): string {\r\n const components = this.optionsStore.options.display.components;\r\n if (!date) return '';\r\n return date.format({\r\n year: components.calendar && components.year ? 'numeric' : undefined,\r\n month: components.calendar && components.month ? '2-digit' : undefined,\r\n day: components.calendar && components.date ? '2-digit' : undefined,\r\n hour:\r\n components.clock && components.hours\r\n ? components.useTwentyfourHour\r\n ? '2-digit'\r\n : 'numeric'\r\n : undefined,\r\n minute: components.clock && components.minutes ? '2-digit' : undefined,\r\n second: components.clock && components.seconds ? '2-digit' : undefined,\r\n hour12: !components.useTwentyfourHour,\r\n });\r\n }\r\n \r\n /**\r\n * parse the value into a DateTime object.\r\n * this can be overwritten to supply your own parsing.\r\n */\r\n parseInput(value:any): DateTime {\r\n return OptionConverter.dateConversion(value, 'input', this.optionsStore.options.localization);\r\n }\r\n\r\n /**\r\n * Tries to convert the provided value to a DateTime object.\r\n * If value is null|undefined then clear the value of the provided index (or 0).\r\n * @param value Value to convert or null|undefined\r\n * @param index When using multidates this is the index in the array\r\n */\r\n setFromInput(value: any, index?: number) {\r\n if (!value) {\r\n this.setValue(undefined, index);\r\n return;\r\n }\r\n const converted = this.parseInput(value);\r\n if (converted) {\r\n converted.setLocale(this.optionsStore.options.localization.locale);\r\n this.setValue(converted, index);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a new DateTime to selected dates array\r\n * @param date\r\n */\r\n add(date: DateTime): void {\r\n this._dates.push(date);\r\n }\r\n\r\n /**\r\n * Returns true if the `targetDate` is part of the selected dates array.\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return (\r\n this._dates\r\n .map((x) => x.format(format))\r\n .find((x) => x === innerDateFormatted) !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the index at which `targetDate` is in the array.\r\n * This is used for updating or removing a date when multi-date is used\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\r\n if (!unit) return this._dates.indexOf(targetDate);\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\r\n }\r\n\r\n /**\r\n * Clears all selected dates.\r\n */\r\n clear() {\r\n this.optionsStore.unset = true;\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate: this.lastPicked,\r\n isClear: true,\r\n isValid: true,\r\n } as ChangeEvent);\r\n this._dates = [];\r\n }\r\n\r\n /**\r\n * Find the \"book end\" years given a `year` and a `factor`\r\n * @param factor e.g. 100 for decades\r\n * @param year e.g. 2021\r\n */\r\n static getStartEndYear(\r\n factor: number,\r\n year: number\r\n ): [number, number, number] {\r\n const step = factor / 10,\r\n startYear = Math.floor(year / factor) * factor,\r\n endYear = startYear + step * 9,\r\n focusValue = Math.floor(year / step) * step;\r\n return [startYear, endYear, focusValue];\r\n }\r\n\r\n /**\r\n * Attempts to either clear or set the `target` date at `index`.\r\n * If the `target` is null then the date will be cleared.\r\n * If multi-date is being used then it will be removed from the array.\r\n * If `target` is valid and multi-date is used then if `index` is\r\n * provided the date at that index will be replaced, otherwise it is appended.\r\n * @param target\r\n * @param index\r\n */\r\n setValue(target?: DateTime, index?: number): void {\r\n const noIndex = typeof index === 'undefined',\r\n isClear = !target && noIndex;\r\n let oldDate = this.optionsStore.unset ? null : this._dates[index];\r\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\r\n oldDate = this.lastPicked;\r\n }\r\n\r\n const updateInput = () => {\r\n if (!this.optionsStore.input) return;\r\n\r\n let newValue = this.formatInput(target);\r\n if (this.optionsStore.options.multipleDates) {\r\n newValue = this._dates\r\n .map((d) => this.formatInput(d))\r\n .join(this.optionsStore.options.multipleDatesSeparator);\r\n }\r\n if (this.optionsStore.input.value != newValue)\r\n this.optionsStore.input.value = newValue;\r\n };\r\n\r\n if (target && oldDate?.isSame(target)) {\r\n updateInput();\r\n return;\r\n }\r\n\r\n // case of calling setValue(null)\r\n if (!target) {\r\n if (\r\n !this.optionsStore.options.multipleDates ||\r\n this._dates.length === 1 ||\r\n isClear\r\n ) {\r\n this.optionsStore.unset = true;\r\n this._dates = [];\r\n } else {\r\n this._dates.splice(index, 1);\r\n }\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n\r\n this._eventEmitters.updateDisplay.emit('all');\r\n return;\r\n }\r\n\r\n index = index || 0;\r\n target = target.clone;\r\n\r\n // minute stepping is being used, force the minute to the closest value\r\n if (this.optionsStore.options.stepping !== 1) {\r\n target.minutes =\r\n Math.round(target.minutes / this.optionsStore.options.stepping) *\r\n this.optionsStore.options.stepping;\r\n target.seconds = 0;\r\n }\r\n\r\n if (this.validation.isValid(target)) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this.optionsStore.unset = false;\r\n this._eventEmitters.updateDisplay.emit('all');\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.keepInvalid) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: false,\r\n } as ChangeEvent);\r\n }\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.error,\r\n reason: Namespace.errorMessages.failedToSetInvalidDate,\r\n date: target,\r\n oldDate,\r\n } as FailEvent);\r\n }\r\n}\r\n","enum ActionTypes {\n next = 'next',\n previous = 'previous',\n changeCalendarView = 'changeCalendarView',\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 toggleMeridiem = 'toggleMeridiem',\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\nexport default ActionTypes;\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport Dates from \"../../dates\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `date`\r\n */\r\nexport default class DateDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.daysContainer);\r\n\r\n container.append(...this._daysOfTheWeek());\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\r\n container.appendChild(div);\r\n }\r\n\r\n for (let i = 0; i < 42; i++) {\r\n if (i !== 0 && i % 7 === 0) {\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n container.appendChild(div);\r\n }\r\n }\r\n\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDay);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.daysContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"calendar\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.daysContainer,\r\n this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n )\r\n );\r\n\r\n this.optionsStore.options.display.components.month\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\r\n Unit.month\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\r\n Unit.month\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.month)\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .manipulate(12, Unit.hours);\r\n\r\n container\r\n .querySelectorAll(\r\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\r\n )\r\n .forEach((containerClone: HTMLElement) => {\r\n if (\r\n this.optionsStore.options.display.calendarWeeks &&\r\n containerClone.classList.contains(Namespace.css.calendarWeeks)\r\n ) {\r\n if (containerClone.innerText === \"#\") return;\r\n containerClone.innerText = `${innerDate.week}`;\r\n return;\r\n }\r\n\r\n let classes: string[] = [];\r\n classes.push(Namespace.css.day);\r\n\r\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.old);\r\n }\r\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.new);\r\n }\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.date)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.date)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n if (innerDate.isSame(new DateTime(), Unit.date)) {\r\n classes.push(Namespace.css.today);\r\n }\r\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\r\n classes.push(Namespace.css.weekend);\r\n }\r\n\r\n paint(Unit.date, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\r\n );\r\n containerClone.setAttribute(\"data-day\", `${innerDate.date}`);\r\n containerClone.innerText = innerDate.format({ day: \"numeric\" });\r\n innerDate.manipulate(1, Unit.date);\r\n });\r\n }\r\n\r\n /***\r\n * Generates an html row that contains the days of the week.\r\n * @private\r\n */\r\n private _daysOfTheWeek(): HTMLElement[] {\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .startOf(Unit.date);\r\n const row = [];\r\n document.createElement(\"div\");\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = \"#\";\r\n row.push(htmlDivElement);\r\n }\r\n\r\n for (let i = 0; i < 7; i++) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.dayOfTheWeek,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = innerDate.format({ weekday: \"short\" });\r\n innerDate.manipulate(1, Unit.date);\r\n row.push(htmlDivElement);\r\n }\r\n\r\n return row;\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { Paint } from '../index';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `month`\r\n */\r\nexport default class MonthDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.monthsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMonth);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.monthsContainer\r\n )[0];\r\n\r\n if(this.optionsStore.currentView === 'months') {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.monthsContainer,\r\n this.optionsStore.viewDate.format({ year: 'numeric' })\r\n );\r\n\r\n this.optionsStore.options.display.components.year\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\r\n Unit.year\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\r\n Unit.year\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n let classes = [];\r\n classes.push(Namespace.css.month);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.month)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.month)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.month, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${index}`);\r\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\r\n innerDate.manipulate(1, Unit.month);\r\n });\r\n }\r\n}\r\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Dates from \"../../dates\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `year`\r\n */\r\nexport default class YearDisplay {\r\n private _startYear: DateTime;\r\n private _endYear: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.yearsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectYear);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year);\r\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.yearsContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"years\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.yearsContainer,\r\n `${this._startYear.format({ year: \"numeric\" })}-${this._endYear.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.optionsStore.options.display.components.decades\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(this._startYear, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endYear, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.year)\r\n .manipulate(-1, Unit.year);\r\n\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.year);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.year)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.year)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.year, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\"data-value\", `${innerDate.year}`);\r\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\r\n\r\n innerDate.manipulate(1, Unit.year);\r\n });\r\n }\r\n}\r\n","import Dates from \"../../dates\";\r\nimport { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class DecadeDisplay {\r\n private _startDecade: DateTime;\r\n private _endDecade: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker() {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.decadesContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDecade);\r\n container.appendChild(div);\r\n }\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n const [start, end] = Dates.getStartEndYear(\r\n 100,\r\n this.optionsStore.viewDate.year\r\n );\r\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._startDecade.year = start;\r\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._endDecade.year = end;\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.decadesContainer\r\n )[0];\r\n\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n if (this.optionsStore.currentView === 'decades') {\r\n switcher.setAttribute(\r\n Namespace.css.decadesContainer,\r\n `${this._startDecade.format({ year: \"numeric\" })}-${this._endDecade.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.validation.isValid(this._startDecade, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endDecade, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n const pickedYears = this.dates.picked.map((x) => x.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n if (index === 0) {\r\n containerClone.classList.add(Namespace.css.old);\r\n if (this._startDecade.year - 10 < 0) {\r\n containerClone.textContent = \" \";\r\n previous.classList.add(Namespace.css.disabled);\r\n containerClone.classList.add(Namespace.css.disabled);\r\n containerClone.setAttribute(\"data-value\", ``);\r\n return;\r\n } else {\r\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: \"numeric\" });\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n return;\r\n }\r\n }\r\n\r\n let classes = [];\r\n classes.push(Namespace.css.decade);\r\n const startDecadeYear = this._startDecade.year;\r\n const endDecadeYear = this._startDecade.year + 9;\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\r\n .length > 0\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n\r\n paint(\"decade\", this._startDecade, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n containerClone.innerText = `${this._startDecade.format({ year: \"numeric\" })}`;\r\n\r\n this._startDecade.manipulate(10, Unit.year);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates the clock display\r\n */\r\nexport default class TimeDisplay {\r\n private _gridColumns = '';\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the clock display\r\n * @private\r\n */\r\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.clockContainer);\r\n\r\n container.append(...this._grid(iconTag));\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the various elements with in the clock display\r\n * like the current hour and if the manipulation icons are enabled.\r\n * @private\r\n */\r\n _update(widget: HTMLElement): void {\r\n const timesDiv = (\r\n widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0]\r\n );\r\n const lastPicked = (\r\n this.dates.lastPicked || this.optionsStore.viewDate\r\n ).clone;\r\n\r\n timesDiv\r\n .querySelectorAll('.disabled')\r\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.hours}]`\r\n ).innerText = this.optionsStore.options.display.components.useTwentyfourHour\r\n ? lastPicked.hoursFormatted\r\n : lastPicked.twelveHoursFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.minutes}]`\r\n ).innerText = lastPicked.minutesFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.seconds}]`\r\n ).innerText = lastPicked.secondsFormatted;\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n const toggle = timesDiv.querySelector(\r\n `[data-action=${ActionTypes.toggleMeridiem}]`\r\n );\r\n\r\n toggle.innerText = lastPicked.meridiem();\r\n\r\n if (\r\n !this.validation.isValid(\r\n lastPicked.clone.manipulate(\r\n lastPicked.hours >= 12 ? -12 : 12,\r\n Unit.hours\r\n )\r\n )\r\n ) {\r\n toggle.classList.add(Namespace.css.disabled);\r\n } else {\r\n toggle.classList.remove(Namespace.css.disabled);\r\n }\r\n }\r\n\r\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\r\n }\r\n\r\n /**\r\n * Creates the table for the clock display depending on what options are selected.\r\n * @private\r\n */\r\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\r\n this._gridColumns = '';\r\n const top = [],\r\n middle = [],\r\n bottom = [],\r\n separator = document.createElement('div'),\r\n upIcon = iconTag(\r\n this.optionsStore.options.display.icons.up\r\n ),\r\n downIcon = iconTag(\r\n this.optionsStore.options.display.icons.down\r\n );\r\n\r\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\r\n const separatorColon = separator.cloneNode(true);\r\n separatorColon.innerHTML = ':';\r\n\r\n const getSeparator = (colon = false): HTMLElement => {\r\n return colon\r\n ? separatorColon.cloneNode(true)\r\n : separator.cloneNode(true);\r\n };\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showHours);\r\n divElement.setAttribute('data-time-component', Unit.hours);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n this._gridColumns += 'a';\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.hours) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\r\n divElement.setAttribute('data-time-component', Unit.minutes);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.minutes) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\r\n divElement.setAttribute('data-time-component', Unit.seconds);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n this._gridColumns += ' a';\r\n let divElement = getSeparator();\r\n top.push(divElement);\r\n\r\n let button = document.createElement('button');\r\n button.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.toggleMeridiem\r\n );\r\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\r\n button.setAttribute('tabindex', '-1');\r\n if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function?\r\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\r\n }\r\n else button.classList.add(Namespace.css.toggleMeridiem);\r\n\r\n divElement = document.createElement('div');\r\n divElement.classList.add(Namespace.css.noHighlight);\r\n divElement.appendChild(button);\r\n middle.push(divElement);\r\n\r\n divElement = getSeparator();\r\n bottom.push(divElement);\r\n }\r\n\r\n this._gridColumns = this._gridColumns.trim();\r\n\r\n return [...top, ...middle, ...bottom];\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `hours`\r\n */\r\nexport default class HourDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.hourContainer);\r\n\r\n for (\r\n let i = 0;\r\n i <\r\n (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12);\r\n i++\r\n ) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectHour);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.hourContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.hour);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.hours)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.hours, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\r\n containerClone.innerText = this.optionsStore.options.display.components\r\n .useTwentyfourHour\r\n ? innerDate.hoursFormatted\r\n : innerDate.twelveHoursFormatted;\r\n innerDate.manipulate(1, Unit.hours);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `minutes`\r\n */\r\nexport default class MinuteDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.minuteContainer);\r\n\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n for (let i = 0; i < 60 / step; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMinute);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.minuteContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.minute);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.minutes, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${innerDate.minutes}`\r\n );\r\n containerClone.innerText = innerDate.minutesFormatted;\r\n innerDate.manipulate(step, Unit.minutes);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class secondDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.secondContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectSecond);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.secondContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.second);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.seconds, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\r\n containerClone.innerText = innerDate.secondsFormatted;\r\n innerDate.manipulate(5, Unit.seconds);\r\n });\r\n }\r\n}\r\n","import Namespace from '../utilities/namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n static 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 * Skips any animation or timeouts and immediately set the element to show.\r\n * @param target\r\n */\r\n static showImmediately(target: HTMLElement) {\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 }\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.showImmediately(target);\r\n 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 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 * Skips any animation or timeouts and immediately set the element to hide.\r\n * @param target\r\n */\r\n static hideImmediately(target: HTMLElement) {\r\n if (!target) return;\r\n target.classList.remove(Namespace.css.collapsing, Namespace.css.show);\r\n target.classList.add(Namespace.css.collapse);\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.hideImmediately(target);\r\n 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 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 static 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 } =\r\n window.getComputedStyle(element);\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 DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport Namespace from '../utilities/namespace';\r\nimport { HideEvent } from '../utilities/event-types';\r\nimport Collapse from './collapse';\r\nimport Validation from '../validation';\r\nimport Dates from '../dates';\r\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\r\nimport { serviceLocator } from '../utilities/service-locator';\r\nimport ActionTypes from '../utilities/action-types';\r\nimport CalendarModes from '../utilities/calendar-modes';\r\nimport { OptionsStore } from '../utilities/optionsStore';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _widget: HTMLElement;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n dateDisplay: DateDisplay;\r\n monthDisplay: MonthDisplay;\r\n yearDisplay: YearDisplay;\r\n decadeDisplay: DecadeDisplay;\r\n timeDisplay: TimeDisplay;\r\n hourDisplay: HourDisplay;\r\n minuteDisplay: MinuteDisplay;\r\n secondDisplay: SecondDisplay;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.dates = serviceLocator.locate(Dates);\r\n\r\n this.dateDisplay = serviceLocator.locate(DateDisplay);\r\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\r\n this.yearDisplay = serviceLocator.locate(YearDisplay);\r\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\r\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\r\n this.hourDisplay = serviceLocator.locate(HourDisplay);\r\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\r\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this._widget = undefined;\r\n\r\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\r\n this._update(result);\r\n });\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: ViewUpdateValues): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this.secondDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.minutes:\r\n this.minuteDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.hours:\r\n this.hourDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.date:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.month:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.year:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this.timeDisplay._update(this.widget);\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n // noinspection JSUnusedLocalSymbols\r\n /**\r\n * Allows developers to add/remove classes from an element.\r\n * @param _unit\r\n * @param _date\r\n * @param _classes\r\n * @param _element\r\n */\r\n paint(\r\n _unit: Unit | 'decade',\r\n _date: DateTime,\r\n _classes: string[],\r\n _element: HTMLElement\r\n ) {\r\n // implemented in plugin\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (this.dates.picked.length == 0) {\r\n if (\r\n this.optionsStore.options.useCurrent &&\r\n !this.optionsStore.options.defaultDate\r\n ) {\r\n const date = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n if (!this.optionsStore.options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (\r\n this.optionsStore.options.restrictions.maxDate?.isBefore(date)\r\n ) {\r\n direction = -1;\r\n }\r\n while (!this.validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this.dates.setValue(date);\r\n }\r\n\r\n if (this.optionsStore.options.defaultDate) {\r\n this.dates.setValue(this.optionsStore.options.defaultDate);\r\n }\r\n }\r\n\r\n this._buildWidget();\r\n this._updateTheme();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this.optionsStore.currentView = 'clock';\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n // otherwise return to the calendar view\r\n if (!this.optionsStore.currentCalendarViewMode) {\r\n this.optionsStore.currentCalendarViewMode =\r\n this.optionsStore.minimumCalendarViewMode;\r\n }\r\n\r\n if (\r\n !onlyClock &&\r\n this.optionsStore.options.display.viewMode !== 'clock'\r\n ) {\r\n if (this._hasTime) {\r\n if(!this.optionsStore.options.display.sideBySide) {\r\n Collapse.hideImmediately(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n } else {\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n }\r\n }\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.dateContainer}`)\r\n );\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this.optionsStore.options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this.optionsStore.options?.container || document.body;\r\n container.appendChild(this.widget);\r\n this.createPopup(this.optionsStore.element, this.widget, {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start',\r\n }).then();\r\n } else {\r\n this.optionsStore.element.appendChild(this.widget);\r\n }\r\n\r\n if (this.optionsStore.options.display.viewMode == 'clock') {\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\r\n this.timeDisplay._update(this.widget);\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this.optionsStore.options.display.inline) {\r\n this.updatePopup();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n async createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise {\r\n let createPopperFunction;\r\n if((window as any)?.Popper) {\r\n createPopperFunction = (window as any)?.Popper?.createPopper;\r\n }\r\n else {\r\n const { createPopper } = await import('@popperjs/core');\r\n createPopperFunction = createPopper;\r\n }\r\n if(createPopperFunction){\r\n this._popperInstance = createPopperFunction(element, widget, options);\r\n }\r\n }\r\n\r\n updatePopup(): void {\r\n this._popperInstance?.update();\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\r\n );\r\n if (this.optionsStore.currentCalendarViewMode == max) return;\r\n this.optionsStore.currentCalendarViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.daysContainer:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n this._eventEmitters.viewUpdate.emit();\r\n }\r\n\r\n /**\r\n * Changes the theme. E.g. light, dark or auto\r\n * @param theme the theme name\r\n * @private\r\n */\r\n _updateTheme(theme?: 'light' | 'dark' | 'auto'): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (theme) {\r\n if (this.optionsStore.options.display.theme === theme) return;\r\n this.optionsStore.options.display.theme = theme;\r\n }\r\n\r\n this.widget.classList.remove('light', 'dark');\r\n this.widget.classList.add(this._getThemeClass());\r\n\r\n if (this.optionsStore.options.display.theme === 'auto') {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .addEventListener('change', () => this._updateTheme());\r\n } else {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .removeEventListener('change', () => this._updateTheme());\r\n }\r\n }\r\n\r\n _getThemeClass(): string {\r\n const currentTheme = this.optionsStore.options.display.theme || 'auto';\r\n\r\n const isDarkMode =\r\n window.matchMedia &&\r\n window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;\r\n\r\n switch (currentTheme) {\r\n case 'light':\r\n return Namespace.css.lightTheme;\r\n case 'dark':\r\n return Namespace.css.darkTheme;\r\n case 'auto':\r\n return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;\r\n }\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList,\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextMonth\r\n );\r\n switcher.innerText = this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n );\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.hide,\r\n date: this.optionsStore.unset\r\n ? null\r\n : this.dates.lastPicked\r\n ? this.dates.lastPicked.clone\r\n : void 0,\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this.getHeadTemplate(),\r\n this.decadeDisplay.getPicker(),\r\n this.yearDisplay.getPicker(),\r\n this.monthDisplay.getPicker(),\r\n this.dateDisplay.getPicker()\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\r\n timeView.appendChild(this.hourDisplay.getPicker());\r\n timeView.appendChild(this.minuteDisplay.getPicker());\r\n timeView.appendChild(this.secondDisplay.getPicker());\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this.getToolbarElements());\r\n\r\n if (this.optionsStore.options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.clock &&\r\n (this.optionsStore.options.display.components.hours ||\r\n this.optionsStore.options.display.components.minutes ||\r\n this.optionsStore.options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.calendar &&\r\n (this.optionsStore.options.display.components.year ||\r\n this.optionsStore.options.display.components.month ||\r\n this.optionsStore.options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n getToolbarElements(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this.optionsStore.options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this.optionsStore.options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this.optionsStore.options.display.viewMode === 'clock') {\r\n title = this.optionsStore.options.localization.selectDate;\r\n icon = this.optionsStore.options.display.icons.date;\r\n } else {\r\n title = this.optionsStore.options.localization.selectTime;\r\n icon = this.optionsStore.options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this.optionsStore.options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this.optionsStore.options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n getHeadTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.next)\r\n );\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then a svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement | SVGElement {\r\n if (this.optionsStore.options.display.icons.type === 'sprites') {\r\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\r\n\r\n const icon = document.createElementNS(\r\n 'http://www.w3.org/2000/svg',\r\n 'use'\r\n );\r\n icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility\r\n icon.setAttribute('href', iconClass);\r\n svg.appendChild(icon);\r\n\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n icon.classList.add(...iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this.optionsStore.options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._eventEmitters.action.emit({ e: e });\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n\r\nexport type Paint = (\r\n unit: Unit | 'decade',\r\n innerDate: DateTime,\r\n classes: string[],\r\n element: HTMLElement\r\n) => void;\r\n","import { DateTime, Unit } from \"./datetime\";\r\nimport Collapse from \"./display/collapse\";\r\nimport Namespace from \"./utilities/namespace\";\r\nimport Dates from \"./dates\";\r\nimport Validation from \"./validation\";\r\nimport Display from \"./display\";\r\nimport { EventEmitters } from \"./utilities/event-emitter\";\r\nimport { serviceLocator } from \"./utilities/service-locator.js\";\r\nimport ActionTypes from \"./utilities/action-types\";\r\nimport CalendarModes from \"./utilities/calendar-modes\";\r\nimport { OptionsStore } from \"./utilities/optionsStore\";\r\n\r\n/**\r\n *\r\n */\r\nexport default class Actions {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n private display: Display;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.display = serviceLocator.locate(Display);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n\r\n this._eventEmitters.action.subscribe((result) => {\r\n this.do(result.e, result.action);\r\n });\r\n }\r\n\r\n /**\r\n * Performs the selected `action`. See ActionTypes\r\n * @param e This is normally a click event\r\n * @param action If not provided, then look for a [data-action]\r\n */\r\n do(e: any, action?: ActionTypes) {\r\n const currentTarget = e?.currentTarget;\r\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\r\n return false;\r\n action = action || currentTarget?.dataset?.action;\r\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\r\n .clone;\r\n\r\n switch (action) {\r\n case ActionTypes.next:\r\n case ActionTypes.previous:\r\n this.handleNextPrevious(action);\r\n break;\r\n case ActionTypes.changeCalendarView:\r\n this.display._showMode(1);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.selectMonth:\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n const value = +currentTarget.dataset.value;\r\n switch (action) {\r\n case ActionTypes.selectMonth:\r\n this.optionsStore.viewDate.month = value;\r\n break;\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n this.optionsStore.viewDate.year = value;\r\n break;\r\n }\r\n\r\n if (\r\n this.optionsStore.currentCalendarViewMode ===\r\n this.optionsStore.minimumCalendarViewMode\r\n ) {\r\n this.dates.setValue(\r\n this.optionsStore.viewDate,\r\n this.dates.lastPickedIndex\r\n );\r\n if (!this.optionsStore.options.display.inline) {\r\n this.display.hide();\r\n }\r\n } else {\r\n this.display._showMode(-1);\r\n }\r\n break;\r\n case ActionTypes.selectDay:\r\n const day = this.optionsStore.viewDate.clone;\r\n if (currentTarget.classList.contains(Namespace.css.old)) {\r\n day.manipulate(-1, Unit.month);\r\n }\r\n if (currentTarget.classList.contains(Namespace.css.new)) {\r\n day.manipulate(1, Unit.month);\r\n }\r\n\r\n day.date = +currentTarget.dataset.day;\r\n let index = 0;\r\n if (this.optionsStore.options.multipleDates) {\r\n index = this.dates.pickedIndex(day, Unit.date);\r\n if (index !== -1) {\r\n this.dates.setValue(null, index); //deselect multi-date\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex + 1);\r\n }\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex);\r\n }\r\n\r\n if (\r\n !this.display._hasTime &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline &&\r\n !this.optionsStore.options.multipleDates\r\n ) {\r\n this.display.hide();\r\n }\r\n break;\r\n case ActionTypes.selectHour:\r\n let hour = +currentTarget.dataset.value;\r\n if (\r\n lastPicked.hours >= 12 &&\r\n !this.optionsStore.options.display.components.useTwentyfourHour\r\n )\r\n hour += 12;\r\n lastPicked.hours = hour;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectMinute:\r\n lastPicked.minutes = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectSecond:\r\n lastPicked.seconds = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.incrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours);\r\n break;\r\n case ActionTypes.incrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping\r\n );\r\n break;\r\n case ActionTypes.incrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds);\r\n break;\r\n case ActionTypes.decrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\r\n break;\r\n case ActionTypes.decrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping * -1\r\n );\r\n break;\r\n case ActionTypes.decrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\r\n break;\r\n case ActionTypes.toggleMeridiem:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.hours,\r\n this.dates.lastPicked.hours >= 12 ? -12 : 12\r\n );\r\n break;\r\n case ActionTypes.togglePicker:\r\n if (\r\n currentTarget.getAttribute('title') ===\r\n this.optionsStore.options.localization.selectDate\r\n ) {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectTime\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.time\r\n ).outerHTML;\r\n\r\n this.display._updateCalendarHeader();\r\n this.optionsStore.refreshCurrentView();\r\n } else {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDate\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.date\r\n ).outerHTML;\r\n if (this.display._hasTime) {\r\n this.handleShowClockContainers(ActionTypes.showClock);\r\n this.display._update('clock');\r\n }\r\n }\r\n\r\n this.display.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\r\n )\r\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\r\n this._eventEmitters.viewUpdate.emit();\r\n break;\r\n case ActionTypes.showClock:\r\n case ActionTypes.showHours:\r\n case ActionTypes.showMinutes:\r\n case ActionTypes.showSeconds:\r\n //make sure the clock is actually displaying\r\n if (!this.optionsStore.options.display.sideBySide && this.optionsStore.currentView !== 'clock') {\r\n //hide calendar\r\n Collapse.hideImmediately(this.display.widget.querySelector(`div.${Namespace.css.dateContainer}`));\r\n //show clock\r\n Collapse.showImmediately(this.display.widget.querySelector(`div.${Namespace.css.timeContainer}`));\r\n }\r\n this.handleShowClockContainers(action);\r\n break;\r\n case ActionTypes.clear:\r\n this.dates.setValue(null);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.close:\r\n this.display.hide();\r\n break;\r\n case ActionTypes.today:\r\n const today = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.viewDate = today;\r\n if (this.validation.isValid(today, Unit.date))\r\n this.dates.setValue(today, this.dates.lastPickedIndex);\r\n break;\r\n }\r\n }\r\n\r\n private handleShowClockContainers(action: ActionTypes) {\r\n if (!this.display._hasTime) {\r\n Namespace.errorMessages.throwError('Cannot show clock containers when time is disabled.');\r\n return;\r\n }\r\n\r\n this.optionsStore.currentView = 'clock';\r\n this.display.widget\r\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\r\n .forEach(\r\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\r\n );\r\n\r\n let classToUse = '';\r\n switch (action) {\r\n case ActionTypes.showClock:\r\n classToUse = Namespace.css.clockContainer;\r\n this.display._update('clock');\r\n break;\r\n case ActionTypes.showHours:\r\n classToUse = Namespace.css.hourContainer;\r\n this.display._update(Unit.hours);\r\n break;\r\n case ActionTypes.showMinutes:\r\n classToUse = Namespace.css.minuteContainer;\r\n this.display._update(Unit.minutes);\r\n break;\r\n case ActionTypes.showSeconds:\r\n classToUse = Namespace.css.secondContainer;\r\n this.display._update(Unit.seconds);\r\n break;\r\n }\r\n\r\n ((\r\n this.display.widget.getElementsByClassName(classToUse)[0]\r\n )).style.display = 'grid';\r\n }\r\n\r\n private handleNextPrevious(action: ActionTypes) {\r\n const {unit, step} =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n if (action === ActionTypes.next)\r\n this.optionsStore.viewDate.manipulate(step, unit);\r\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\r\n this._eventEmitters.viewUpdate.emit();\r\n\r\n this.display._showMode();\r\n }\r\n\r\n /**\r\n * After setting the value it will either show the clock or hide the widget.\r\n * @param e\r\n */\r\n private hideOrClock(e) {\r\n if (\r\n this.optionsStore.options.display.components.useTwentyfourHour &&\r\n !this.optionsStore.options.display.components.minutes &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline\r\n ) {\r\n this.display.hide();\r\n } else {\r\n this.do(e, ActionTypes.showClock);\r\n }\r\n }\r\n\r\n /**\r\n * Common function to manipulate {@link lastPicked} by `unit`.\r\n * @param lastPicked\r\n * @param unit\r\n * @param value Value to change by\r\n */\r\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\r\n const newDate = lastPicked.manipulate(value, unit);\r\n if (this.validation.isValid(newDate, unit)) {\r\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\r\n }\r\n }\r\n}\r\n","import Display from './display/index';\r\nimport Dates from './dates';\r\nimport Actions from './actions';\r\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport Options from './utilities/options';\r\nimport {\r\n BaseEvent,\r\n ChangeEvent,\r\n ViewUpdateEvent,\r\n} from './utilities/event-types';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {\r\n serviceLocator,\r\n setupServiceLocator,\r\n} from './utilities/service-locator';\r\nimport CalendarModes from './utilities/calendar-modes';\r\nimport DefaultOptions from './utilities/default-options';\r\nimport ActionTypes from './utilities/action-types';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\nimport { ErrorMessages } from './utilities/errors';\r\n\r\n/**\r\n * A robust and powerful date/time picker component.\r\n */\r\nclass TempusDominus {\r\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\r\n private _isDisabled = false;\r\n private _toggle: HTMLElement;\r\n private _currentPromptTimeTimeout: any;\r\n private actions: Actions;\r\n private optionsStore: OptionsStore;\r\n private _eventEmitters: EventEmitters;\r\n display: Display;\r\n dates: Dates;\r\n\r\n constructor(element: HTMLElement, options: Options = {} as Options) {\r\n setupServiceLocator();\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.display = serviceLocator.locate(Display);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.actions = serviceLocator.locate(Actions);\r\n\r\n if (!element) {\r\n Namespace.errorMessages.mustProvideElement();\r\n }\r\n\r\n this.optionsStore.element = element;\r\n this._initializeOptions(options, DefaultOptions, true);\r\n this.optionsStore.viewDate.setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.unset = true;\r\n\r\n this._initializeInput();\r\n this._initializeToggle();\r\n\r\n if (this.optionsStore.options.display.inline) this.display.show();\r\n\r\n this._eventEmitters.triggerEvent.subscribe((e) => {\r\n this._triggerEvent(e);\r\n });\r\n\r\n this._eventEmitters.viewUpdate.subscribe(() => {\r\n this._viewUpdate();\r\n });\r\n }\r\n\r\n get viewDate() {\r\n return this.optionsStore.viewDate;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\r\n * @param options\r\n * @param reset\r\n * @public\r\n */\r\n updateOptions(options, reset = false): void {\r\n if (reset) this._initializeOptions(options, DefaultOptions);\r\n else this._initializeOptions(options, this.optionsStore.options);\r\n this.display._rebuild();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\r\n * @public\r\n */\r\n toggle(): void {\r\n if (this._isDisabled) return;\r\n this.display.toggle();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Shows the picker unless the picker is disabled.\r\n * @public\r\n */\r\n show(): void {\r\n if (this._isDisabled) return;\r\n this.display.show();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker unless the picker is disabled.\r\n * @public\r\n */\r\n hide(): void {\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Disables the picker and the target input field.\r\n * @public\r\n */\r\n disable(): void {\r\n this._isDisabled = true;\r\n // todo this might be undesired. If a dev disables the input field to\r\n // only allow using the picker, this will break that.\r\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Enables the picker and the target input field.\r\n * @public\r\n */\r\n enable(): void {\r\n this._isDisabled = false;\r\n this.optionsStore.input?.removeAttribute('disabled');\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Clears all the selected dates\r\n * @public\r\n */\r\n clear(): void {\r\n this.optionsStore.input.value = '';\r\n this.dates.clear();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\r\n * @param eventTypes See Namespace.Events\r\n * @param callbacks Function to call when event is triggered\r\n * @public\r\n */\r\n subscribe(\r\n eventTypes: string | string[],\r\n callbacks: (event: any) => void | ((event: any) => void)[]\r\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\r\n if (typeof eventTypes === 'string') {\r\n eventTypes = [eventTypes];\r\n }\r\n let callBackArray: any[];\r\n if (!Array.isArray(callbacks)) {\r\n callBackArray = [callbacks];\r\n } else {\r\n callBackArray = callbacks;\r\n }\r\n\r\n if (eventTypes.length !== callBackArray.length) {\r\n Namespace.errorMessages.subscribeMismatch();\r\n }\r\n\r\n const returnArray = [];\r\n\r\n for (let i = 0; i < eventTypes.length; i++) {\r\n const eventType = eventTypes[i];\r\n if (!Array.isArray(this._subscribers[eventType])) {\r\n this._subscribers[eventType] = [];\r\n }\r\n\r\n this._subscribers[eventType].push(callBackArray[i]);\r\n\r\n returnArray.push({\r\n unsubscribe: this._unsubscribe.bind(\r\n this,\r\n eventType,\r\n this._subscribers[eventType].length - 1\r\n ),\r\n });\r\n\r\n if (eventTypes.length === 1) {\r\n return returnArray[0];\r\n }\r\n }\r\n\r\n return returnArray;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker and removes event listeners\r\n */\r\n dispose() {\r\n this.display.hide();\r\n // this will clear the document click event listener\r\n this.display._dispose();\r\n this.optionsStore.input?.removeEventListener(\r\n 'change',\r\n this._inputChangeEvent\r\n );\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input?.removeEventListener(\r\n 'click',\r\n this._toggleClickEvent\r\n );\r\n }\r\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\r\n this._subscribers = {};\r\n }\r\n\r\n /**\r\n * Updates the options to use the provided language.\r\n * THe language file must be loaded first.\r\n * @param language\r\n */\r\n locale(language: string) {\r\n let asked = loadedLocales[language];\r\n if (!asked) return;\r\n this.updateOptions({\r\n localization: asked,\r\n });\r\n }\r\n\r\n /**\r\n * Triggers an event like ChangeEvent when the picker has updated the value\r\n * of a selected date.\r\n * @param event Accepts a BaseEvent object.\r\n * @private\r\n */\r\n private _triggerEvent(event: BaseEvent) {\r\n event.viewMode = this.optionsStore.currentView;\r\n\r\n const isChangeEvent = event.type === Namespace.events.change;\r\n if (isChangeEvent) {\r\n const { date, oldDate, isClear } = event as ChangeEvent;\r\n if (\r\n (date && oldDate && date.isSame(oldDate)) ||\r\n (!isClear && !date && !oldDate)\r\n ) {\r\n return;\r\n }\r\n this._handleAfterChangeEvent(event as ChangeEvent);\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent('change', { detail: event as any })\r\n );\r\n }\r\n\r\n this.optionsStore.element.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n if ((window as any).jQuery) {\r\n const $ = (window as any).jQuery;\r\n\r\n if (isChangeEvent && this.optionsStore.input) {\r\n $(this.optionsStore.input).trigger(event);\r\n } else {\r\n $(this.optionsStore.element).trigger(event);\r\n }\r\n }\r\n\r\n this._publish(event);\r\n }\r\n\r\n private _publish(event: BaseEvent) {\r\n // return if event is not subscribed\r\n if (!Array.isArray(this._subscribers[event.type])) {\r\n return;\r\n }\r\n\r\n // Trigger callback for each subscriber\r\n this._subscribers[event.type].forEach((callback) => {\r\n callback(event);\r\n });\r\n }\r\n\r\n /**\r\n * Fires a ViewUpdate event when, for example, the month view is changed.\r\n * @private\r\n */\r\n private _viewUpdate() {\r\n this._triggerEvent({\r\n type: Namespace.events.update,\r\n viewDate: this.optionsStore.viewDate.clone,\r\n } as ViewUpdateEvent);\r\n }\r\n\r\n private _unsubscribe(eventName, index) {\r\n this._subscribers[eventName].splice(index, 1);\r\n }\r\n\r\n /**\r\n * Merges two Option objects together and validates options type\r\n * @param config new Options\r\n * @param mergeTo Options to merge into\r\n * @param includeDataset When true, the elements data-td attributes will be included in the\r\n * @private\r\n */\r\n private _initializeOptions(\r\n config: Options,\r\n mergeTo: Options,\r\n includeDataset = false\r\n ): void {\r\n let newConfig = OptionConverter.deepCopy(config);\r\n newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);\r\n if (includeDataset)\r\n newConfig = OptionConverter._dataToOptions(\r\n this.optionsStore.element,\r\n newConfig\r\n );\r\n\r\n OptionConverter._validateConflicts(newConfig);\r\n\r\n newConfig.viewDate = newConfig.viewDate.setLocale(newConfig.localization.locale);\r\n\r\n if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {\r\n this.optionsStore.viewDate = newConfig.viewDate;\r\n }\r\n\r\n /**\r\n * Sets the minimum view allowed by the picker. For example the case of only\r\n * allowing year and month to be selected but not date.\r\n */\r\n if (newConfig.display.components.year) {\r\n this.optionsStore.minimumCalendarViewMode = 2;\r\n }\r\n if (newConfig.display.components.month) {\r\n this.optionsStore.minimumCalendarViewMode = 1;\r\n }\r\n if (newConfig.display.components.date) {\r\n this.optionsStore.minimumCalendarViewMode = 0;\r\n }\r\n\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n this.optionsStore.currentCalendarViewMode\r\n );\r\n\r\n // Update view mode if needed\r\n if (\r\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\r\n newConfig.display.viewMode\r\n ) {\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),\r\n this.optionsStore.minimumCalendarViewMode\r\n );\r\n }\r\n\r\n if (this.display?.isVisible) {\r\n this.display._update('all');\r\n }\r\n\r\n if (newConfig.display.components.useTwentyfourHour === undefined) {\r\n newConfig.display.components.useTwentyfourHour = !!!newConfig.viewDate.parts()?.dayPeriod;\r\n }\r\n\r\n\r\n this.optionsStore.options = newConfig;\r\n }\r\n\r\n /**\r\n * Checks if an input field is being used, attempts to locate one and sets an\r\n * event listener if found.\r\n * @private\r\n */\r\n private _initializeInput() {\r\n if (this.optionsStore.element.tagName == 'INPUT') {\r\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\r\n } else {\r\n let query = this.optionsStore.element.dataset.tdTargetInput;\r\n if (query == undefined || query == 'nearest') {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector('input');\r\n } else {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector(query);\r\n }\r\n }\r\n\r\n if (!this.optionsStore.input) return;\r\n\r\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n if (this.optionsStore.input.value) {\r\n this._inputChangeEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to locate a toggle for the picker and sets an event listener\r\n * @private\r\n */\r\n private _initializeToggle() {\r\n if (this.optionsStore.options.display.inline) return;\r\n let query = this.optionsStore.element.dataset.tdTargetToggle;\r\n if (query == 'nearest') {\r\n query = '[data-td-toggle=\"datetimepicker\"]';\r\n }\r\n this._toggle =\r\n query == undefined\r\n ? this.optionsStore.element\r\n : this.optionsStore.element.querySelector(query);\r\n this._toggle.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n /**\r\n * If the option is enabled this will render the clock view after a date pick.\r\n * @param e change event\r\n * @private\r\n */\r\n private _handleAfterChangeEvent(e: ChangeEvent) {\r\n if (\r\n // options is disabled\r\n !this.optionsStore.options.promptTimeOnDateChange ||\r\n this.optionsStore.options.display.inline ||\r\n this.optionsStore.options.display.sideBySide ||\r\n // time is disabled\r\n !this.display._hasTime ||\r\n // clock component is already showing\r\n this.display.widget\r\n ?.getElementsByClassName(Namespace.css.show)[0]\r\n .classList.contains(Namespace.css.timeContainer)\r\n )\r\n return;\r\n\r\n // First time ever. If useCurrent option is set to true (default), do nothing\r\n // because the first date is selected automatically.\r\n // or date didn't change (time did) or date changed because time did.\r\n if (\r\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\r\n (e.oldDate && e.date?.isSame(e.oldDate))\r\n ) {\r\n return;\r\n }\r\n\r\n clearTimeout(this._currentPromptTimeTimeout);\r\n this._currentPromptTimeTimeout = setTimeout(() => {\r\n if (this.display.widget) {\r\n this._eventEmitters.action.emit({\r\n e: {\r\n currentTarget: this.display.widget.querySelector(\r\n `.${Namespace.css.switch} div`\r\n ),\r\n },\r\n action: ActionTypes.togglePicker,\r\n });\r\n }\r\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\r\n }\r\n\r\n /**\r\n * Event for when the input field changes. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _inputChangeEvent = (event?: any) => {\r\n const internallyTriggered = event?.detail;\r\n if (internallyTriggered) return;\r\n\r\n const setViewDate = () => {\r\n if (this.dates.lastPicked)\r\n this.optionsStore.viewDate = this.dates.lastPicked.clone;\r\n };\r\n\r\n const value = this.optionsStore.input.value;\r\n if (this.optionsStore.options.multipleDates) {\r\n try {\r\n const valueSplit = value.split(\r\n this.optionsStore.options.multipleDatesSeparator\r\n );\r\n for (let i = 0; i < valueSplit.length; i++) {\r\n this.dates.setFromInput(valueSplit[i], i);\r\n }\r\n setViewDate();\r\n } catch {\r\n console.warn(\r\n 'TD: Something went wrong trying to set the multipleDates values from the input field.'\r\n );\r\n }\r\n } else {\r\n this.dates.setFromInput(value, 0);\r\n setViewDate();\r\n }\r\n };\r\n\r\n /**\r\n * Event for when the toggle is clicked. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _toggleClickEvent = () => {\r\n if ((this.optionsStore.element as any)?.disabled || this.optionsStore.input?.disabled) return\r\n this.toggle();\r\n };\r\n}\r\n\r\n/**\r\n * Whenever a locale is loaded via a plugin then store it here based on the\r\n * locale name. E.g. loadedLocales['ru']\r\n */\r\nconst loadedLocales = {};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a locale plugin.\r\n * @param l locale object for localization options\r\n */\r\nconst loadLocale = (l) => {\r\n if (loadedLocales[l.name]) return;\r\n loadedLocales[l.name] = l.localization;\r\n};\r\n\r\n/**\r\n * A sets the global localization options to the provided locale name.\r\n * `loadLocale` MUST be called first.\r\n * @param l\r\n */\r\nconst locale = (l: string) => {\r\n let asked = loadedLocales[l];\r\n if (!asked) return;\r\n DefaultOptions.localization = asked;\r\n};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a plugin to extend or override picker defaults.\r\n * @param plugin\r\n * @param option\r\n */\r\nconst extend = function (plugin, option) {\r\n if (!plugin) return tempusDominus;\r\n if (!plugin.installed) {\r\n // install plugin only once\r\n plugin(option, { TempusDominus, Dates, Display, DateTime, ErrorMessages }, tempusDominus);\r\n plugin.installed = true;\r\n }\r\n return tempusDominus;\r\n};\r\n\r\nconst version = '6.1.3';\r\n\r\nconst tempusDominus = {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version\r\n};\r\n\r\nexport {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version,\r\n DateTimeFormatOptions\r\n}\r\n"],"names":["ActionTypes","SecondDisplay"],"mappings":";;;;;IAAY,KAOX;AAPD,CAAA,UAAY,IAAI,EAAA;AACd,IAAA,IAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,IAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,IAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,IAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,IAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,IAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACf,CAAC,EAPW,IAAI,KAAJ,IAAI,GAOf,EAAA,CAAA,CAAA,CAAA;AAED,MAAM,gBAAgB,GAAG;AACvB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM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QAAA,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;AACzB,KAAA;AACD,IAAA,OAAO,aAAa,CAAC;AACvB,EAAE;AAEI,MAAA,OAAO,GAAG,QAAQ;AAExB,MAAM,aAAa,GAAG;IACpB,aAAa;IACb,MAAM;IACN,UAAU;IACV,MAAM;IACN,SAAS;IACT,cAAc;IACd,QAAQ;IACR,IAAI;IACJ,OAAO;CACR;;;;"} \ No newline at end of file diff --git a/dist/js/tempus-dominus.esm.min.js b/dist/js/tempus-dominus.esm.min.js index cb1e3ca4c..0a107d3c6 100644 --- a/dist/js/tempus-dominus.esm.min.js +++ b/dist/js/tempus-dominus.esm.min.js @@ -1,6 +1,6 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ -function t(t,e,s,i){return new(s||(s=Promise))((function(o,a){function n(t){try{d(i.next(t))}catch(t){a(t)}}function r(t){try{d(i.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,r)}d((i=i.apply(t,e||[])).next())}))}var e;!function(t){t.seconds="seconds",t.minutes="minutes",t.hours="hours",t.date="date",t.month="month",t.year="year"}(e||(e={}));const s={month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},i={hour:"2-digit",hour12:!1},o=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}};class a extends Date{constructor(){super(...arguments),this.locale="default",this.nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],this.leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335]}setLocale(t){return this.locale=t,this}static convert(t,e="default"){if(!t)throw new Error("A date is required");return new a(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocale(e)}static fromString(t,e){return new a(t)}get clone(){return new a(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocale(this.locale)}startOf(t,s=0){if(void 0===this[t])throw new Error(`Unit '${t}' is not valid`);switch(t){case"seconds":this.setMilliseconds(0);break;case"minutes":this.setSeconds(0,0);break;case"hours":this.setMinutes(0,0,0);break;case"date":this.setHours(0,0,0,0);break;case"weekDay":if(this.startOf(e.date),this.weekDay===s)break;let t=this.weekDay;0!==s&&0===this.weekDay&&(t=8-s),this.manipulate(s-t,e.date);break;case"month":this.startOf(e.date),this.setDate(1);break;case"year":this.startOf(e.date),this.setMonth(0,1)}return this}endOf(t,s=0){if(void 0===this[t])throw new Error(`Unit '${t}' is not valid`);switch(t){case"seconds":this.setMilliseconds(999);break;case"minutes":this.setSeconds(59,999);break;case"hours":this.setMinutes(59,59,999);break;case"date":this.setHours(23,59,59,999);break;case"weekDay":this.endOf(e.date),this.manipulate(6+s-this.weekDay,e.date);break;case"month":this.endOf(e.date),this.manipulate(1,e.month),this.setDate(0);break;case"year":this.endOf(e.date),this.manipulate(1,e.year),this.setDate(0)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}format(t,e=this.locale){return new Intl.DateTimeFormat(e,t).format(this)}isBefore(t,e){if(!e)return this.valueOf()t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this.clone.startOf(e).valueOf()>t.clone.startOf(e).valueOf()}isSame(t,e){if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=a.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1];return(o?this.isAfter(t,s):!this.isBefore(t,s))&&(a?this.isBefore(e,s):!this.isAfter(e,s))||(o?this.isBefore(t,s):!this.isAfter(t,s))&&(a?this.isAfter(e,s):!this.isBefore(e,s))}parts(t=this.locale,e={dateStyle:"full",timeStyle:"long"}){const s={};return new Intl.DateTimeFormat(t,e).formatToParts(this).filter((t=>"literal"!==t.type)).forEach((t=>s[t.type]=t.value)),s}get seconds(){return this.getSeconds()}set seconds(t){this.setSeconds(t)}get secondsFormatted(){return this.parts(void 0,s).second}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.parts(void 0,s).minute}get hours(){return this.getHours()}set hours(t){this.setHours(t)}get hoursFormatted(){return this.parts(void 0,i).hour}get twelveHoursFormatted(){return this.parts(void 0,s).hour}meridiem(t=this.locale){var e;return null===(e=new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0}).formatToParts(this).find((t=>"dayPeriod"===t.type)))||void 0===e?void 0:e.value}get date(){return this.getDate()}set date(t){this.setDate(t)}get dateFormatted(){return this.parts(void 0,s).day}get weekDay(){return this.getDay()}get month(){return this.getMonth()}set month(t){const e=new Date(this.year,t+1);e.setDate(0);const s=e.getDate();this.date>s&&(this.date=s),this.setMonth(t)}get monthFormatted(){return this.parts(void 0,s).month}get year(){return this.getFullYear()}set year(t){this.setFullYear(t)}get week(){const t=this.computeOrdinal(),e=this.getUTCDay();let s=Math.floor((t-e+10)/7);return s<1?s=this.weeksInWeekYear(this.year-1):s>this.weeksInWeekYear(this.year)&&(s=1),s}weeksInWeekYear(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,i=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===i?53:52}get isLeapYear(){return this.year%4==0&&(this.year%100!=0||this.year%400==0)}computeOrdinal(){return this.date+(this.isLeapYear?this.leapLadder:this.nonLeapLadder)[this.month]}}class n extends Error{}class r{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const e=new n(`${this.base} Unexpected option: ${t} does not match a known option.`);throw e.code=1,e}unexpectedOptions(t){const e=new n(`${this.base}: ${t.join(", ")}`);throw e.code=1,e}unexpectedOptionValue(t,e,s){const i=new n(`${this.base} Unexpected option value: ${t} does not accept a value of "${e}". Valid values are: ${s.join(", ")}`);throw i.code=2,i}typeMismatch(t,e,s){const i=new n(`${this.base} Mismatch types: ${t} has a type of ${e} instead of the required ${s}`);throw i.code=3,i}numbersOutOfRage(t,e,s){const i=new n(`${this.base} ${t} expected an array of number between ${e} and ${s}.`);throw i.code=4,i}failedToParseDate(t,e,s=!1){const i=new n(`${this.base} Could not correctly parse "${e}" to a date for ${t}.`);if(i.code=5,!s)throw i;console.warn(i)}mustProvideElement(){const t=new n(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new n(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const e=new n(`${this.base} A configuration value conflicts with another rule. ${t}`);throw e.code=8,e}customDateFormatError(t){const e=new n(`${this.base} customDateFormat: ${t}`);throw e.code=9,e}dateString(){console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`)}throwError(t){const e=new n(`${this.base} ${t}`);throw e.code=9,e}}const d="tempus-dominus";class l{}l.NAME=d,l.dataKey="td",l.events=new class{constructor(){this.key=".td",this.change=`change${this.key}`,this.update=`update${this.key}`,this.error=`error${this.key}`,this.show=`show${this.key}`,this.hide=`hide${this.key}`,this.blur=`blur${this.key}`,this.focus=`focus${this.key}`,this.keyup=`keyup${this.key}`,this.keydown=`keydown${this.key}`}},l.css=new class{constructor(){this.widget=`${d}-widget`,this.calendarHeader="calendar-header",this.switch="picker-switch",this.toolbar="toolbar",this.noHighlight="no-highlight",this.sideBySide="timepicker-sbs",this.previous="previous",this.next="next",this.disabled="disabled",this.old="old",this.new="new",this.active="active",this.dateContainer="date-container",this.decadesContainer=`${this.dateContainer}-decades`,this.decade="decade",this.yearsContainer=`${this.dateContainer}-years`,this.year="year",this.monthsContainer=`${this.dateContainer}-months`,this.month="month",this.daysContainer=`${this.dateContainer}-days`,this.day="day",this.calendarWeeks="cw",this.dayOfTheWeek="dow",this.today="today",this.weekend="weekend",this.timeContainer="time-container",this.separator="separator",this.clockContainer=`${this.timeContainer}-clock`,this.hourContainer=`${this.timeContainer}-hour`,this.minuteContainer=`${this.timeContainer}-minute`,this.secondContainer=`${this.timeContainer}-second`,this.hour="hour",this.minute="minute",this.second="second",this.toggleMeridiem="toggleMeridiem",this.show="show",this.collapsing="td-collapsing",this.collapse="td-collapse",this.inline="inline",this.lightTheme="light",this.darkTheme="dark",this.isDarkPreferredQuery="(prefers-color-scheme: dark)"}},l.errorMessages=new r;class c{constructor(){this.cache=new Map}locate(t){const e=this.cache.get(t);if(e)return e;const s=new t;return this.cache.set(t,s),s}}let h;const p=[{name:"calendar",className:l.css.daysContainer,unit:e.month,step:1},{name:"months",className:l.css.monthsContainer,unit:e.year,step:1},{name:"years",className:l.css.yearsContainer,unit:e.year,step:10},{name:"decades",className:l.css.decadesContainer,unit:e.year,step:100}];class u{constructor(){this.viewDate=new a,this._currentCalendarViewMode=0,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=p[t].name}refreshCurrentView(){this.currentView=p[this.currentCalendarViewMode].name}}class m{constructor(){this.optionsStore=h.locate(u)}isValid(t,s){var i;if(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(t))return!1;if(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(t))return!1;if(s!==e.month&&s!==e.year&&(null===(i=this.optionsStore.options.restrictions.daysOfWeekDisabled)||void 0===i?void 0:i.length)>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(t.weekDay))return!1;if(this.optionsStore.options.restrictions.minDate&&t.isBefore(this.optionsStore.options.restrictions.minDate,s))return!1;if(this.optionsStore.options.restrictions.maxDate&&t.isAfter(this.optionsStore.options.restrictions.maxDate,s))return!1;if(s===e.hours||s===e.minutes||s===e.seconds){if(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(t))return!1;if(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(t))return!1;if(this.optionsStore.options.restrictions.disabledTimeIntervals.length>0)for(let e of this.optionsStore.options.restrictions.disabledTimeIntervals)if(t.isBetween(e.from,e.to))return!1}return!0}_isInDisabledDates(t){if(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)return!1;const s=t.format(o(e.date));return this.optionsStore.options.restrictions.disabledDates.map((t=>t.format(o(e.date)))).find((t=>t===s))}_isInEnabledDates(t){if(!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length)return!0;const s=t.format(o(e.date));return this.optionsStore.options.restrictions.enabledDates.map((t=>t.format(o(e.date)))).find((t=>t===s))}_isInDisabledHours(t){if(!this.optionsStore.options.restrictions.disabledHours||0===this.optionsStore.options.restrictions.disabledHours.length)return!1;const e=t.hours;return this.optionsStore.options.restrictions.disabledHours.find((t=>t===e))}_isInEnabledHours(t){if(!this.optionsStore.options.restrictions.enabledHours||0===this.optionsStore.options.restrictions.enabledHours.length)return!0;const e=t.hours;return this.optionsStore.options.restrictions.enabledHours.find((t=>t===e))}}class y{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),this.unsubscribe.bind(this,this.subscribers.length-1)}unsubscribe(t){this.subscribers.splice(t,1)}emit(t){this.subscribers.forEach((e=>{e(t)}))}destroy(){this.subscribers=null,this.subscribers=[]}}class v{constructor(){this.triggerEvent=new y,this.viewUpdate=new y,this.updateDisplay=new y,this.action=new y}destroy(){this.triggerEvent.destroy(),this.viewUpdate.destroy(),this.updateDisplay.destroy(),this.action.destroy()}}const g={restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},display:{icons:{type:"icons",time:"fa-solid fa-clock",date:"fa-solid fa-calendar",up:"fa-solid fa-arrow-up",down:"fa-solid fa-arrow-down",previous:"fa-solid fa-chevron-left",next:"fa-solid fa-chevron-right",today:"fa-solid fa-calendar-check",clear:"fa-solid fa-trash",close:"fa-solid fa-xmark"},sideBySide:!1,calendarWeeks:!1,viewMode:"calendar",toolbarPlacement:"bottom",keepOpen:!1,buttons:{today:!1,clear:!1,close:!1},components:{calendar:!0,date:!0,month:!0,year:!0,decades:!0,clock:!0,hours:!0,minutes:!0,seconds:!1,useTwentyfourHour:void 0},inline:!1,theme:"auto"},stepping:1,useCurrent:!0,defaultDate:void 0,localization:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",previousMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",previousYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",previousDecade:"Previous Decade",nextDecade:"Next Decade",previousCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",toggleMeridiem:"Toggle Meridiem",selectTime:"Select Time",selectDate:"Select Date",dayViewHeaderFormat:{month:"long",year:"2-digit"},locale:"default",startOfTheWeek:0,dateFormats:{LTS:"h:mm:ss T",LT:"h:mm T",L:"MM/dd/yyyy",LL:"MMMM d, yyyy",LLL:"MMMM d, yyyy h:mm T",LLLL:"dddd, MMMM d, yyyy h:mm T"},ordinal:t=>t,format:"L"},keepInvalid:!1,debug:!1,allowInputToggle:!1,viewDate:new a,multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,meta:{},container:void 0};class S{static deepCopy(t){const e={};return Object.keys(t).forEach((s=>{const i=t[s];e[s]=i,"object"!=typeof i||i instanceof HTMLElement||i instanceof Element||i instanceof Date||Array.isArray(i)||(e[s]=S.deepCopy(i))})),e}static objectPath(t,e){return"."===t.charAt(0)&&(t=t.slice(1)),t?t.split(".").reduce(((t,e)=>S.isValue(t)||S.isValue(t[e])?t[e]:void 0),e):e}static spread(t,e,s="",i){const o=S.objectPath(s,g),a=Object.keys(t).filter((t=>!Object.keys(o).includes(t)));if(a.length>0){const t=S.getFlattenDefaultOptions(),e=a.map((e=>{let i=`"${s}.${e}" in not a known option.`,o=t.find((t=>t.includes(e)));return o&&(i+=` Did you mean "${o}"?`),i}));l.errorMessages.unexpectedOptions(e)}Object.keys(t).filter((t=>"__proto__"!==t&&"constructor"!==t)).forEach((a=>{"."===(s+=`.${a}`).charAt(0)&&(s=s.slice(1));const n=o[a];let r=typeof t[a],d=typeof n,l=t[a];if(null==l)return e[a]=l,void(s=s.substring(0,s.lastIndexOf(`.${a}`)));"object"!=typeof n||Array.isArray(t[a])||n instanceof Date||S.ignoreProperties.includes(a)?e[a]=S.processKey(a,l,r,d,s,i):S.spread(t[a],e[a],s,i),s=s.substring(0,s.lastIndexOf(`.${a}`))}))}static processKey(t,e,s,i,o,a){switch(t){case"defaultDate":{const t=this.dateConversion(e,"defaultDate",a);if(void 0!==t)return t.setLocale(a.locale),t;l.errorMessages.typeMismatch("defaultDate",s,"DateTime or Date");break}case"viewDate":{const t=this.dateConversion(e,"viewDate",a);if(void 0!==t)return t.setLocale(a.locale),t;l.errorMessages.typeMismatch("viewDate",s,"DateTime or Date");break}case"minDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.minDate",a);if(void 0!==t)return t.setLocale(a.locale),t;l.errorMessages.typeMismatch("restrictions.minDate",s,"DateTime or Date");break}case"maxDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.maxDate",a);if(void 0!==t)return t.setLocale(a.locale),t;l.errorMessages.typeMismatch("restrictions.maxDate",s,"DateTime or Date");break}case"disabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.disabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&l.errorMessages.numbersOutOfRage("restrictions.disabledHours",0,23),e);case"enabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.enabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&l.errorMessages.numbersOutOfRage("restrictions.enabledHours",0,23),e);case"daysOfWeekDisabled":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.daysOfWeekDisabled",e,s),e.filter((t=>t<0||t>6)).length>0&&l.errorMessages.numbersOutOfRage("restrictions.daysOfWeekDisabled",0,6),e);case"enabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.enabledDates",e,s,a),e);case"disabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.disabledDates",e,s,a),e);case"disabledTimeIntervals":if(void 0===e)return[];Array.isArray(e)||l.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const n=e;for(let e=0;e{const i=`${t}[${e}].${s}`;let o=n[e][s];const r=this.dateConversion(o,i,a);r||l.errorMessages.typeMismatch(i,typeof o,"DateTime or Date"),r.setLocale(a.locale),n[e][s]=r}));return n;case"toolbarPlacement":case"type":case"viewMode":case"theme":const r={toolbarPlacement:["top","bottom","default"],type:["icons","sprites"],viewMode:["clock","calendar","months","years","decades"],theme:["light","dark","auto"]}[t];return r.includes(e)||l.errorMessages.unexpectedOptionValue(o.substring(1),e,r),e;case"meta":case"dayViewHeaderFormat":return e;case"container":return e&&!(e instanceof HTMLElement||e instanceof Element||(null==e?void 0:e.appendChild))&&l.errorMessages.typeMismatch(o.substring(1),typeof e,"HTMLElement"),e;case"useTwentyfourHour":if(void 0===e||"boolean"===s)return e;l.errorMessages.typeMismatch(o,s,i);break;default:switch(i){case"boolean":return"true"===e||!0===e;case"number":return+e;case"string":return e.toString();case"object":return{};case"function":return e;default:l.errorMessages.typeMismatch(o,s,i)}}}static _mergeOptions(t,e){var s;const i=S.deepCopy(e),o="default"!==(null===(s=e.localization)||void 0===s?void 0:s.locale)?e.localization:(null==t?void 0:t.localization)||g.localization;return S.spread(t,i,"",o),i}static _dataToOptions(t,e){const s=JSON.parse(JSON.stringify(t.dataset));if((null==s?void 0:s.tdTargetInput)&&delete s.tdTargetInput,(null==s?void 0:s.tdTargetToggle)&&delete s.tdTargetToggle,!s||0===Object.keys(s).length||s.constructor!==DOMStringMap)return e;let i={};const o=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},a=(t,e,s,i)=>{const n=o(s)[t[e].toLowerCase()],r={};return void 0===n||(s[n].constructor===Object?(e++,r[n]=a(t,e,s[n],i)):r[n]=i),r},n=o(e);return Object.keys(s).filter((t=>t.startsWith(l.dataKey))).map((t=>t.substring(2))).forEach((t=>{let o=n[t.toLowerCase()];if(t.includes("_")){const r=t.split("_");o=n[r[0].toLowerCase()],void 0!==o&&e[o].constructor===Object&&(i[o]=a(r,1,e[o],s[`td${t}`]))}else void 0!==o&&(i[o]=s[`td${t}`])})),this._mergeOptions(i,e)}static _dateTypeCheck(t,e){if(t.constructor.name===a.name)return t;if(t.constructor.name===Date.name)return a.convert(t);if("string"==typeof t){const s=a.fromString(t,e);return"null"===JSON.stringify(s)?null:s}return null}static _typeCheckDateArray(t,e,s,i){var o;Array.isArray(e)||l.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||l.errorMessages.typeMismatch(t,s,"array of numbers")}static dateConversion(t,e,s){"string"==typeof t&&"input"!==e&&l.errorMessages.dateString();const i=this._dateTypeCheck(t,s);return i||l.errorMessages.failedToParseDate(e,t,"input"===e),i}static getFlattenDefaultOptions(){if(this._flattenDefaults)return this._flattenDefaults;const t=(e,s=[])=>Array.isArray(e)?[]:Object(e)===e?Object.entries(e).flatMap((([e,i])=>t(i,[...s,e]))):s.join(".");return this._flattenDefaults=t(g),this._flattenDefaults}static _validateConflicts(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||l.errorMessages.conflictingConfiguration("Cannot use side by side mode without the clock components"),t.restrictions.minDate&&t.restrictions.maxDate&&(t.restrictions.minDate.isAfter(t.restrictions.maxDate)&&l.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&l.errorMessages.conflictingConfiguration("maxDate is before minDate"))}}S.ignoreProperties=["meta","dayViewHeaderFormat","container","dateForms","ordinal"],S.isValue=t=>null!=t;class w{constructor(){this._dates=[],this.optionsStore=h.locate(u),this.validation=h.locate(m),this._eventEmitters=h.locate(v)}get picked(){return this._dates}get lastPicked(){return this._dates[this.lastPickedIndex]}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){const e=this.optionsStore.options.display.components;return t?t.format({year:e.calendar&&e.year?"numeric":void 0,month:e.calendar&&e.month?"2-digit":void 0,day:e.calendar&&e.date?"2-digit":void 0,hour:e.clock&&e.hours?e.useTwentyfourHour?"2-digit":"numeric":void 0,minute:e.clock&&e.minutes?"2-digit":void 0,second:e.clock&&e.seconds?"2-digit":void 0,hour12:!e.useTwentyfourHour}):""}parseInput(t){return S.dateConversion(t,"input",this.optionsStore.options.localization)}setFromInput(t,e){if(!t)return void this.setValue(void 0,e);const s=this.parseInput(t);s&&(s.setLocale(this.optionsStore.options.localization.locale),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!e)return void 0!==this._dates.find((e=>e===t));const s=o(e);let i=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===i))}pickedIndex(t,e){if(!e)return this._dates.indexOf(t);const s=o(e);let i=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(i)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:l.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[]}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}setValue(t,e){const s=void 0===e,i=!t&&s;let o=this.optionsStore.unset?null:this._dates[e];!o&&!this.optionsStore.unset&&s&&i&&(o=this.lastPicked);const a=()=>{if(!this.optionsStore.input)return;let e=this.formatInput(t);this.optionsStore.options.multipleDates&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)};if(t&&(null==o?void 0:o.isSame(t)))a();else{if(!t)return!this.optionsStore.options.multipleDates||1===this._dates.length||i?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),a(),this._eventEmitters.triggerEvent.emit({type:l.events.change,date:void 0,oldDate:o,isClear:i,isValid:!0}),void this._eventEmitters.updateDisplay.emit("all");if(e=e||0,t=t.clone,1!==this.optionsStore.options.stepping&&(t.minutes=Math.round(t.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,t.seconds=0),this.validation.isValid(t))return this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),void this._eventEmitters.triggerEvent.emit({type:l.events.change,date:t,oldDate:o,isClear:i,isValid:!0});this.optionsStore.options.keepInvalid&&(this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this._eventEmitters.triggerEvent.emit({type:l.events.change,date:t,oldDate:o,isClear:i,isValid:!1})),this._eventEmitters.triggerEvent.emit({type:l.events.error,reason:l.errorMessages.failedToSetInvalidDate,date:t,oldDate:o})}}}var f;!function(t){t.next="next",t.previous="previous",t.changeCalendarView="changeCalendarView",t.selectMonth="selectMonth",t.selectYear="selectYear",t.selectDecade="selectDecade",t.selectDay="selectDay",t.selectHour="selectHour",t.selectMinute="selectMinute",t.selectSecond="selectSecond",t.incrementHours="incrementHours",t.incrementMinutes="incrementMinutes",t.incrementSeconds="incrementSeconds",t.decrementHours="decrementHours",t.decrementMinutes="decrementMinutes",t.decrementSeconds="decrementSeconds",t.toggleMeridiem="toggleMeridiem",t.togglePicker="togglePicker",t.showClock="showClock",t.showHours="showHours",t.showMinutes="showMinutes",t.showSeconds="showSeconds",t.clear="clear",t.close="close",t.today="today"}(f||(f={}));var b=f;class D{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");if(t.classList.add(l.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(l.css.calendarWeeks,l.css.noHighlight),t.appendChild(e)}for(let e=0;e<42;e++){if(0!==e&&e%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(l.css.calendarWeeks,l.css.noHighlight),t.appendChild(e)}const s=document.createElement("div");s.setAttribute("data-action",b.selectDay),t.appendChild(s)}return t}_update(t,s){const i=t.getElementsByClassName(l.css.daysContainer)[0];if("calendar"===this.optionsStore.currentView){const[t,s,o]=i.parentElement.getElementsByClassName(l.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(l.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.optionsStore.options.display.components.month?s.classList.remove(l.css.disabled):s.classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.month),e.month)?t.classList.remove(l.css.disabled):t.classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.month),e.month)?o.classList.remove(l.css.disabled):o.classList.add(l.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(e.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,e.hours);i.querySelectorAll(`[data-action="${b.selectDay}"], .${l.css.calendarWeeks}`).forEach((t=>{if(this.optionsStore.options.display.calendarWeeks&&t.classList.contains(l.css.calendarWeeks)){if("#"===t.innerText)return;return void(t.innerText=`${o.week}`)}let i=[];i.push(l.css.day),o.isBefore(this.optionsStore.viewDate,e.month)&&i.push(l.css.old),o.isAfter(this.optionsStore.viewDate,e.month)&&i.push(l.css.new),!this.optionsStore.unset&&this.dates.isPicked(o,e.date)&&i.push(l.css.active),this.validation.isValid(o,e.date)||i.push(l.css.disabled),o.isSame(new a,e.date)&&i.push(l.css.today),0!==o.weekDay&&6!==o.weekDay||i.push(l.css.weekend),s(e.date,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.year}-${o.monthFormatted}-${o.dateFormatted}`),t.setAttribute("data-day",`${o.date}`),t.innerText=o.format({day:"numeric"}),o.manipulate(1,e.date)}))}_daysOfTheWeek(){let t=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(e.date);const s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(l.css.calendarWeeks,l.css.noHighlight),t.innerText="#",s.push(t)}for(let i=0;i<7;i++){const i=document.createElement("div");i.classList.add(l.css.dayOfTheWeek,l.css.noHighlight),i.innerText=t.format({weekday:"short"}),t.manipulate(1,e.date),s.push(i)}return s}}class k{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(l.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectMonth),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(l.css.monthsContainer)[0];if("months"===this.optionsStore.currentView){const[t,s,o]=i.parentElement.getElementsByClassName(l.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(l.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.optionsStore.options.display.components.year?s.classList.remove(l.css.disabled):s.classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.year),e.year)?t.classList.remove(l.css.disabled):t.classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.year),e.year)?o.classList.remove(l.css.disabled):o.classList.add(l.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(e.year);i.querySelectorAll(`[data-action="${b.selectMonth}"]`).forEach(((t,i)=>{let a=[];a.push(l.css.month),!this.optionsStore.unset&&this.dates.isPicked(o,e.month)&&a.push(l.css.active),this.validation.isValid(o,e.month)||a.push(l.css.disabled),s(e.month,o,a,t),t.classList.remove(...t.classList),t.classList.add(...a),t.setAttribute("data-value",`${i}`),t.innerText=`${o.format({month:"short"})}`,o.manipulate(1,e.month)}))}}class _{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(l.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectYear),t.appendChild(e)}return t}_update(t,s){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,e.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,e.year);const i=t.getElementsByClassName(l.css.yearsContainer)[0];if("years"===this.optionsStore.currentView){const[t,s,o]=i.parentElement.getElementsByClassName(l.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(l.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.optionsStore.options.display.components.decades?s.classList.remove(l.css.disabled):s.classList.add(l.css.disabled),this.validation.isValid(this._startYear,e.year)?t.classList.remove(l.css.disabled):t.classList.add(l.css.disabled),this.validation.isValid(this._endYear,e.year)?o.classList.remove(l.css.disabled):o.classList.add(l.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(e.year).manipulate(-1,e.year);i.querySelectorAll(`[data-action="${b.selectYear}"]`).forEach((t=>{let i=[];i.push(l.css.year),!this.optionsStore.unset&&this.dates.isPicked(o,e.year)&&i.push(l.css.active),this.validation.isValid(o,e.year)||i.push(l.css.disabled),s(e.year,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.year}`),t.innerText=o.format({year:"numeric"}),o.manipulate(1,e.year)}))}}class C{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(l.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectDecade),t.appendChild(e)}return t}_update(t,s){const[i,o]=w.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(e.year),this._startDecade.year=i,this._endDecade=this.optionsStore.viewDate.clone.startOf(e.year),this._endDecade.year=o;const a=t.getElementsByClassName(l.css.decadesContainer)[0],[n,r,d]=a.parentElement.getElementsByClassName(l.css.calendarHeader)[0].getElementsByTagName("div");"decades"===this.optionsStore.currentView&&(r.setAttribute(l.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,e.year)?n.classList.remove(l.css.disabled):n.classList.add(l.css.disabled),this.validation.isValid(this._endDecade,e.year)?d.classList.remove(l.css.disabled):d.classList.add(l.css.disabled));const c=this.dates.picked.map((t=>t.year));a.querySelectorAll(`[data-action="${b.selectDecade}"]`).forEach(((t,i)=>{if(0===i)return t.classList.add(l.css.old),this._startDecade.year-10<0?(t.textContent=" ",n.classList.add(l.css.disabled),t.classList.add(l.css.disabled),void t.setAttribute("data-value","")):(t.innerText=this._startDecade.clone.manipulate(-10,e.year).format({year:"numeric"}),void t.setAttribute("data-value",`${this._startDecade.year}`));let o=[];o.push(l.css.decade);const a=this._startDecade.year,r=this._startDecade.year+9;!this.optionsStore.unset&&c.filter((t=>t>=a&&t<=r)).length>0&&o.push(l.css.active),s("decade",this._startDecade,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${this._startDecade.year}`),t.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,e.year)}))}}class E{constructor(){this._gridColumns="",this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(t){const e=document.createElement("div");return e.classList.add(l.css.clockContainer),e.append(...this._grid(t)),e}_update(t){const s=t.getElementsByClassName(l.css.clockContainer)[0],i=(this.dates.lastPicked||this.optionsStore.viewDate).clone;if(s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(l.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.hours),e.hours)||s.querySelector(`[data-action=${b.incrementHours}]`).classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.hours),e.hours)||s.querySelector(`[data-action=${b.decrementHours}]`).classList.add(l.css.disabled),s.querySelector(`[data-time-component=${e.hours}]`).innerText=this.optionsStore.options.display.components.useTwentyfourHour?i.hoursFormatted:i.twelveHoursFormatted),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.minutes),e.minutes)||s.querySelector(`[data-action=${b.incrementMinutes}]`).classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.minutes),e.minutes)||s.querySelector(`[data-action=${b.decrementMinutes}]`).classList.add(l.css.disabled),s.querySelector(`[data-time-component=${e.minutes}]`).innerText=i.minutesFormatted),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.seconds),e.seconds)||s.querySelector(`[data-action=${b.incrementSeconds}]`).classList.add(l.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.seconds),e.seconds)||s.querySelector(`[data-action=${b.decrementSeconds}]`).classList.add(l.css.disabled),s.querySelector(`[data-time-component=${e.seconds}]`).innerText=i.secondsFormatted),!this.optionsStore.options.display.components.useTwentyfourHour){const t=s.querySelector(`[data-action=${b.toggleMeridiem}]`);t.innerText=i.meridiem(),this.validation.isValid(i.clone.manipulate(i.hours>=12?-12:12,e.hours))?t.classList.remove(l.css.disabled):t.classList.add(l.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(t){this._gridColumns="";const s=[],i=[],o=[],a=document.createElement("div"),n=t(this.optionsStore.options.display.icons.up),r=t(this.optionsStore.options.display.icons.down);a.classList.add(l.css.separator,l.css.noHighlight);const d=a.cloneNode(!0);d.innerHTML=":";const c=(t=!1)=>t?d.cloneNode(!0):a.cloneNode(!0);if(this.optionsStore.options.display.components.hours){let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementHour),t.setAttribute("data-action",b.incrementHours),t.appendChild(n.cloneNode(!0)),s.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickHour),t.setAttribute("data-action",b.showHours),t.setAttribute("data-time-component",e.hours),i.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementHour),t.setAttribute("data-action",b.decrementHours),t.appendChild(r.cloneNode(!0)),o.push(t),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(c()),i.push(c(!0)),o.push(c()),this._gridColumns+=" a");let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementMinute),t.setAttribute("data-action",b.incrementMinutes),t.appendChild(n.cloneNode(!0)),s.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickMinute),t.setAttribute("data-action",b.showMinutes),t.setAttribute("data-time-component",e.minutes),i.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementMinute),t.setAttribute("data-action",b.decrementMinutes),t.appendChild(r.cloneNode(!0)),o.push(t)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(c()),i.push(c(!0)),o.push(c()),this._gridColumns+=" a");let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementSecond),t.setAttribute("data-action",b.incrementSeconds),t.appendChild(n.cloneNode(!0)),s.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickSecond),t.setAttribute("data-action",b.showSeconds),t.setAttribute("data-time-component",e.seconds),i.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementSecond),t.setAttribute("data-action",b.decrementSeconds),t.appendChild(r.cloneNode(!0)),o.push(t)}if(!this.optionsStore.options.display.components.useTwentyfourHour){this._gridColumns+=" a";let t=c();s.push(t);let e=document.createElement("button");e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",b.toggleMeridiem),e.setAttribute("tabindex","-1"),l.css.toggleMeridiem.includes(",")?e.classList.add(...l.css.toggleMeridiem.split(",")):e.classList.add(l.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(l.css.noHighlight),t.appendChild(e),i.push(t),t=c(),o.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...i,...o]}}class M{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(l.css.hourContainer);for(let e=0;e<(this.optionsStore.options.display.components.useTwentyfourHour?24:12);e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectHour),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(l.css.hourContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(e.date);i.querySelectorAll(`[data-action="${b.selectHour}"]`).forEach((t=>{let i=[];i.push(l.css.hour),this.validation.isValid(o,e.hours)||i.push(l.css.disabled),s(e.hours,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.hours}`),t.innerText=this.optionsStore.options.display.components.useTwentyfourHour?o.hoursFormatted:o.twelveHoursFormatted,o.manipulate(1,e.hours)}))}}class L{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(l.css.minuteContainer);let e=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;for(let s=0;s<60/e;s++){const e=document.createElement("div");e.setAttribute("data-action",b.selectMinute),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(l.css.minuteContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(e.hours),a=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;i.querySelectorAll(`[data-action="${b.selectMinute}"]`).forEach((t=>{let i=[];i.push(l.css.minute),this.validation.isValid(o,e.minutes)||i.push(l.css.disabled),s(e.minutes,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.minutes}`),t.innerText=o.minutesFormatted,o.manipulate(a,e.minutes)}))}}class T{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(l.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectSecond),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(l.css.secondContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(e.minutes);i.querySelectorAll(`[data-action="${b.selectSecond}"]`).forEach((t=>{let i=[];i.push(l.css.second),this.validation.isValid(o,e.seconds)||i.push(l.css.disabled),s(e.seconds,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.seconds}`),t.innerText=o.secondsFormatted,o.manipulate(5,e.seconds)}))}}class A{static toggle(t){t.classList.contains(l.css.show)?this.hide(t):this.show(t)}static showImmediately(t){t.classList.remove(l.css.collapsing),t.classList.add(l.css.collapse,l.css.show),t.style.height=""}static show(t){if(t.classList.contains(l.css.collapsing)||t.classList.contains(l.css.show))return;t.style.height="0",t.classList.remove(l.css.collapse),t.classList.add(l.css.collapsing),setTimeout((()=>{A.showImmediately(t)}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hideImmediately(t){t&&(t.classList.remove(l.css.collapsing,l.css.show),t.classList.add(l.css.collapse))}static hide(t){if(t.classList.contains(l.css.collapsing)||!t.classList.contains(l.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(l.css.collapse,l.css.show),t.classList.add(l.css.collapsing),t.style.height="",setTimeout((()=>{A.hideImmediately(t)}),this.getTransitionDurationFromElement(t))}}A.getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),o=Number.parseFloat(s);return i||o?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0};class ${constructor(){this._isVisible=!1,this._documentClickEvent=t=>{var e;this.optionsStore.options.debug||window.debug||!this._isVisible||t.composedPath().includes(this.widget)||(null===(e=t.composedPath())||void 0===e?void 0:e.includes(this.optionsStore.element))||this.hide()},this._actionsClickEvent=t=>{this._eventEmitters.action.emit({e:t})},this.optionsStore=h.locate(u),this.validation=h.locate(m),this.dates=h.locate(w),this.dateDisplay=h.locate(D),this.monthDisplay=h.locate(k),this.yearDisplay=h.locate(_),this.decadeDisplay=h.locate(C),this.timeDisplay=h.locate(E),this.hourDisplay=h.locate(M),this.minuteDisplay=h.locate(L),this.secondDisplay=h.locate(T),this._eventEmitters=h.locate(v),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get isVisible(){return this._isVisible}_update(t){if(this.widget)switch(t){case e.seconds:this.secondDisplay._update(this.widget,this.paint);break;case e.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case e.hours:this.hourDisplay._update(this.widget,this.paint);break;case e.date:this.dateDisplay._update(this.widget,this.paint);break;case e.month:this.monthDisplay._update(this.widget,this.paint);break;case e.year:this.yearDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(e.hours),this._update(e.minutes),this._update(e.seconds);break;case"calendar":this._update(e.date),this._update(e.year),this._update(e.month),this.decadeDisplay._update(this.widget,this.paint),this._updateCalendarHeader();break;case"all":this._hasTime&&this._update("clock"),this._hasDate&&this._update("calendar")}}paint(t,e,s,i){}show(){var t,s;if(null==this.widget){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const s=(new a).setLocale(this.optionsStore.options.localization.locale);if(!this.optionsStore.options.keepInvalid){let i=0,o=1;for((null===(t=this.optionsStore.options.restrictions.maxDate)||void 0===t?void 0:t.isBefore(s))&&(o=-1);!(this.validation.isValid(s)||(s.manipulate(o,e.date),i>31));)i++}this.dates.setValue(s)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}this._buildWidget(),this._updateTheme();const i=this._hasTime&&!this._hasDate;if(i&&(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:b.showClock})),this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),i||"clock"===this.optionsStore.options.display.viewMode||(this._hasTime&&(this.optionsStore.options.display.sideBySide?A.show(this.widget.querySelector(`div.${l.css.timeContainer}`)):A.hideImmediately(this.widget.querySelector(`div.${l.css.timeContainer}`))),A.show(this.widget.querySelector(`div.${l.css.dateContainer}`))),this._hasDate&&this._showMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{((null===(s=this.optionsStore.options)||void 0===s?void 0:s.container)||document.body).appendChild(this.widget),this.createPopup(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?"bottom-end":"bottom-start"}).then()}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:b.showClock}),this.widget.querySelectorAll("[data-action]").forEach((t=>t.addEventListener("click",this._actionsClickEvent))),this._hasTime&&this.optionsStore.options.display.sideBySide&&(this.timeDisplay._update(this.widget),this.widget.getElementsByClassName(l.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(l.css.show),this.optionsStore.options.display.inline||(this.updatePopup(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:l.events.show}),this._isVisible=!0}createPopup(e,s,i){return t(this,void 0,void 0,(function*(){const{createPopper:t}=yield import("@popperjs/core");this._popperInstance=t(e,s,i)}))}updatePopup(){var t;null===(t=this._popperInstance)||void 0===t||t.update()}_showMode(t){if(!this.widget)return;if(t){const e=Math.max(this.optionsStore.minimumCalendarViewMode,Math.min(3,this.optionsStore.currentCalendarViewMode+t));if(this.optionsStore.currentCalendarViewMode==e)return;this.optionsStore.currentCalendarViewMode=e}this.widget.querySelectorAll(`.${l.css.dateContainer} > div:not(.${l.css.calendarHeader}), .${l.css.timeContainer} > div:not(.${l.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=p[this.optionsStore.currentCalendarViewMode];let s=this.widget.querySelector(`.${e.className}`);switch(e.className){case l.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case l.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case l.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case l.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this._updateCalendarHeader(),this._eventEmitters.viewUpdate.emit()}_updateTheme(t){if(this.widget){if(t){if(this.optionsStore.options.display.theme===t)return;this.optionsStore.options.display.theme=t}this.widget.classList.remove("light","dark"),this.widget.classList.add(this._getThemeClass()),"auto"===this.optionsStore.options.display.theme?window.matchMedia(l.css.isDarkPreferredQuery).addEventListener("change",(()=>this._updateTheme())):window.matchMedia(l.css.isDarkPreferredQuery).removeEventListener("change",(()=>this._updateTheme()))}}_getThemeClass(){const t=this.optionsStore.options.display.theme||"auto",e=window.matchMedia&&window.matchMedia(l.css.isDarkPreferredQuery).matches;switch(t){case"light":return l.css.lightTheme;case"dark":return l.css.darkTheme;case"auto":return e?l.css.darkTheme:l.css.lightTheme}}_updateCalendarHeader(){const t=[...this.widget.querySelector(`.${l.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(l.css.dateContainer))),[e,s,i]=this.widget.getElementsByClassName(l.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case l.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),i.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case l.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),i.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case l.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),i.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case l.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),i.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.innerText=this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(l.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:l.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?this.dates.lastPicked.clone:void 0}),this._isVisible=!1),document.removeEventListener("click",this._documentClickEvent))}toggle(){return this._isVisible?this.hide():this.show()}_dispose(){document.removeEventListener("click",this._documentClickEvent),this.widget&&(this.widget.querySelectorAll("[data-action]").forEach((t=>t.removeEventListener("click",this._actionsClickEvent))),this.widget.parentNode.removeChild(this.widget),this._widget=void 0)}_buildWidget(){const t=document.createElement("div");t.classList.add(l.css.widget);const e=document.createElement("div");e.classList.add(l.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const s=document.createElement("div");s.classList.add(l.css.timeContainer),s.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),s.appendChild(this.hourDisplay.getPicker()),s.appendChild(this.minuteDisplay.getPicker()),s.appendChild(this.secondDisplay.getPicker());const i=document.createElement("div");if(i.classList.add(l.css.toolbar),i.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(l.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){t.classList.add(l.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");return o.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),o.appendChild(e),o.appendChild(s),t.appendChild(o),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),void(this._widget=t)}"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),this._hasDate&&(this._hasTime&&(e.classList.add(l.css.collapse),"clock"!==this.optionsStore.options.display.viewMode&&e.classList.add(l.css.show)),t.appendChild(e)),this._hasTime&&(this._hasDate&&(s.classList.add(l.css.collapse),"clock"===this.optionsStore.options.display.viewMode&&s.classList.add(l.css.show)),t.appendChild(s)),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");o.classList.add("arrow"),o.setAttribute("data-popper-arrow",""),t.appendChild(o),this._widget=t}get _hasTime(){return this.optionsStore.options.display.components.clock&&(this.optionsStore.options.display.components.hours||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.components.seconds)}get _hasDate(){return this.optionsStore.options.display.components.calendar&&(this.optionsStore.options.display.components.year||this.optionsStore.options.display.components.month||this.optionsStore.options.display.components.date)}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",b.today),e.setAttribute("title",this.optionsStore.options.localization.today),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)),t.push(e)}if(!this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){let e,s;"clock"===this.optionsStore.options.display.viewMode?(e=this.optionsStore.options.localization.selectDate,s=this.optionsStore.options.display.icons.date):(e=this.optionsStore.options.localization.selectTime,s=this.optionsStore.options.display.icons.time);const i=document.createElement("div");i.setAttribute("data-action",b.togglePicker),i.setAttribute("title",e),i.appendChild(this._iconTag(s)),t.push(i)}if(this.optionsStore.options.display.buttons.clear){const e=document.createElement("div");e.setAttribute("data-action",b.clear),e.setAttribute("title",this.optionsStore.options.localization.clear),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)),t.push(e)}if(this.optionsStore.options.display.buttons.close){const e=document.createElement("div");e.setAttribute("data-action",b.close),e.setAttribute("title",this.optionsStore.options.localization.close),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)),t.push(e)}return t}getHeadTemplate(){const t=document.createElement("div");t.classList.add(l.css.calendarHeader);const e=document.createElement("div");e.classList.add(l.css.previous),e.setAttribute("data-action",b.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(l.css.switch),s.setAttribute("data-action",b.changeCalendarView);const i=document.createElement("div");return i.classList.add(l.css.next),i.setAttribute("data-action",b.next),i.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,i),t}_iconTag(t){if("sprites"===this.optionsStore.options.display.icons.type){const e=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","use");return s.setAttribute("xlink:href",t),s.setAttribute("href",t),e.appendChild(s),e}const e=document.createElement("i");return e.classList.add(...t.split(" ")),e}_rebuild(){const t=this._isVisible;t&&this.hide(),this._dispose(),t&&this.show()}}class O{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m),this.display=h.locate($),this._eventEmitters=h.locate(v),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(t,s){var i,o;const n=null==t?void 0:t.currentTarget;if(null===(i=null==n?void 0:n.classList)||void 0===i?void 0:i.contains(l.css.disabled))return!1;s=s||(null===(o=null==n?void 0:n.dataset)||void 0===o?void 0:o.action);const r=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case b.next:case b.previous:this.handleNextPrevious(s);break;case b.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case b.selectMonth:case b.selectYear:case b.selectDecade:const i=+n.dataset.value;switch(s){case b.selectMonth:this.optionsStore.viewDate.month=i;break;case b.selectYear:case b.selectDecade:this.optionsStore.viewDate.year=i}this.optionsStore.currentCalendarViewMode===this.optionsStore.minimumCalendarViewMode?(this.dates.setValue(this.optionsStore.viewDate,this.dates.lastPickedIndex),this.optionsStore.options.display.inline||this.display.hide()):this.display._showMode(-1);break;case b.selectDay:const o=this.optionsStore.viewDate.clone;n.classList.contains(l.css.old)&&o.manipulate(-1,e.month),n.classList.contains(l.css.new)&&o.manipulate(1,e.month),o.date=+n.dataset.day;let d=0;this.optionsStore.options.multipleDates?(d=this.dates.pickedIndex(o,e.date),-1!==d?this.dates.setValue(null,d):this.dates.setValue(o,this.dates.lastPickedIndex+1)):this.dates.setValue(o,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.display.hide();break;case b.selectHour:let c=+n.dataset.value;r.hours>=12&&!this.optionsStore.options.display.components.useTwentyfourHour&&(c+=12),r.hours=c,this.dates.setValue(r,this.dates.lastPickedIndex),this.hideOrClock(t);break;case b.selectMinute:r.minutes=+n.dataset.value,this.dates.setValue(r,this.dates.lastPickedIndex),this.hideOrClock(t);break;case b.selectSecond:r.seconds=+n.dataset.value,this.dates.setValue(r,this.dates.lastPickedIndex),this.hideOrClock(t);break;case b.incrementHours:this.manipulateAndSet(r,e.hours);break;case b.incrementMinutes:this.manipulateAndSet(r,e.minutes,this.optionsStore.options.stepping);break;case b.incrementSeconds:this.manipulateAndSet(r,e.seconds);break;case b.decrementHours:this.manipulateAndSet(r,e.hours,-1);break;case b.decrementMinutes:this.manipulateAndSet(r,e.minutes,-1*this.optionsStore.options.stepping);break;case b.decrementSeconds:this.manipulateAndSet(r,e.seconds,-1);break;case b.toggleMeridiem:this.manipulateAndSet(r,e.hours,this.dates.lastPicked.hours>=12?-12:12);break;case b.togglePicker:n.getAttribute("title")===this.optionsStore.options.localization.selectDate?(n.setAttribute("title",this.optionsStore.options.localization.selectTime),n.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(n.setAttribute("title",this.optionsStore.options.localization.selectDate),n.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.handleShowClockContainers(b.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${l.css.dateContainer}, .${l.css.timeContainer}`).forEach((t=>A.toggle(t))),this._eventEmitters.viewUpdate.emit();break;case b.showClock:case b.showHours:case b.showMinutes:case b.showSeconds:this.optionsStore.options.display.sideBySide||"clock"===this.optionsStore.currentView||(A.hideImmediately(this.display.widget.querySelector(`div.${l.css.dateContainer}`)),A.showImmediately(this.display.widget.querySelector(`div.${l.css.timeContainer}`))),this.handleShowClockContainers(s);break;case b.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case b.close:this.display.hide();break;case b.today:const h=(new a).setLocale(this.optionsStore.options.localization.locale);this.optionsStore.viewDate=h,this.validation.isValid(h,e.date)&&this.dates.setValue(h,this.dates.lastPickedIndex)}}handleShowClockContainers(t){if(!this.display._hasTime)return void l.errorMessages.throwError("Cannot show clock containers when time is disabled.");this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${l.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let s="";switch(t){case b.showClock:s=l.css.clockContainer,this.display._update("clock");break;case b.showHours:s=l.css.hourContainer,this.display._update(e.hours);break;case b.showMinutes:s=l.css.minuteContainer,this.display._update(e.minutes);break;case b.showSeconds:s=l.css.secondContainer,this.display._update(e.seconds)}this.display.widget.getElementsByClassName(s)[0].style.display="grid"}handleNextPrevious(t){const{unit:e,step:s}=p[this.optionsStore.currentCalendarViewMode];t===b.next?this.optionsStore.viewDate.manipulate(s,e):this.optionsStore.viewDate.manipulate(-1*s,e),this._eventEmitters.viewUpdate.emit(),this.display._showMode()}hideOrClock(t){!this.optionsStore.options.display.components.useTwentyfourHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,b.showClock):this.display.hide()}manipulateAndSet(t,e,s=1){const i=t.manipulate(s,e);this.validation.isValid(i,e)&&this.dates.setValue(i,this.dates.lastPickedIndex)}}class V{constructor(t,e={}){this._subscribers={},this._isDisabled=!1,this._inputChangeEvent=t=>{if(null==t?void 0:t.detail)return;const e=()=>{this.dates.lastPicked&&(this.optionsStore.viewDate=this.dates.lastPicked.clone)},s=this.optionsStore.input.value;if(this.optionsStore.options.multipleDates)try{const t=s.split(this.optionsStore.options.multipleDatesSeparator);for(let e=0;e{var t,e;(null===(t=this.optionsStore.element)||void 0===t?void 0:t.disabled)||(null===(e=this.optionsStore.input)||void 0===e?void 0:e.disabled)||this.toggle()},h=new c,this._eventEmitters=h.locate(v),this.optionsStore=h.locate(u),this.display=h.locate($),this.dates=h.locate(w),this.actions=h.locate(O),t||l.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,g,!0),this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale),this.optionsStore.unset=!0,this._initializeInput(),this._initializeToggle(),this.optionsStore.options.display.inline&&this.display.show(),this._eventEmitters.triggerEvent.subscribe((t=>{this._triggerEvent(t)})),this._eventEmitters.viewUpdate.subscribe((()=>{this._viewUpdate()}))}get viewDate(){return this.optionsStore.viewDate}updateOptions(t,e=!1){e?this._initializeOptions(t,g):this._initializeOptions(t,this.optionsStore.options),this.display._rebuild()}toggle(){this._isDisabled||this.display.toggle()}show(){this._isDisabled||this.display.show()}hide(){this.display.hide()}disable(){var t;this._isDisabled=!0,null===(t=this.optionsStore.input)||void 0===t||t.setAttribute("disabled","disabled"),this.display.hide()}enable(){var t;this._isDisabled=!1,null===(t=this.optionsStore.input)||void 0===t||t.removeAttribute("disabled")}clear(){this.optionsStore.input.value="",this.dates.clear()}subscribe(t,e){let s;"string"==typeof t&&(t=[t]),s=Array.isArray(e)?e:[e],t.length!==s.length&&l.errorMessages.subscribeMismatch();const i=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:l.events.update,viewDate:this.optionsStore.viewDate.clone})}_unsubscribe(t,e){this._subscribers[t].splice(e,1)}_initializeOptions(t,e,s=!1){var i,o;let a=S.deepCopy(t);a=S._mergeOptions(a,e),s&&(a=S._dataToOptions(this.optionsStore.element,a)),S._validateConflicts(a),a.viewDate=a.viewDate.setLocale(a.localization.locale),this.optionsStore.viewDate.isSame(a.viewDate)||(this.optionsStore.viewDate=a.viewDate),a.display.components.year&&(this.optionsStore.minimumCalendarViewMode=2),a.display.components.month&&(this.optionsStore.minimumCalendarViewMode=1),a.display.components.date&&(this.optionsStore.minimumCalendarViewMode=0),this.optionsStore.currentCalendarViewMode=Math.max(this.optionsStore.minimumCalendarViewMode,this.optionsStore.currentCalendarViewMode),p[this.optionsStore.currentCalendarViewMode].name!==a.display.viewMode&&(this.optionsStore.currentCalendarViewMode=Math.max(p.findIndex((t=>t.name===a.display.viewMode)),this.optionsStore.minimumCalendarViewMode)),(null===(i=this.display)||void 0===i?void 0:i.isVisible)&&this.display._update("all"),void 0===a.display.components.useTwentyfourHour&&(a.display.components.useTwentyfourHour=!(null===(o=a.viewDate.parts())||void 0===o?void 0:o.dayPeriod)),this.optionsStore.options=a}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{let t=this.optionsStore.element.dataset.tdTargetInput;this.optionsStore.input=null==t||"nearest"==t?this.optionsStore.element.querySelector("input"):this.optionsStore.element.querySelector(t)}this.optionsStore.input&&(this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&this.optionsStore.input.addEventListener("click",this._toggleClickEvent),this.optionsStore.input.value&&this._inputChangeEvent())}_initializeToggle(){if(this.optionsStore.options.display.inline)return;let t=this.optionsStore.element.dataset.tdTargetToggle;"nearest"==t&&(t='[data-td-toggle="datetimepicker"]'),this._toggle=null==t?this.optionsStore.element:this.optionsStore.element.querySelector(t),this._toggle.addEventListener("click",this._toggleClickEvent)}_handleAfterChangeEvent(t){var e,s;!this.optionsStore.options.promptTimeOnDateChange||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||(null===(e=this.display.widget)||void 0===e?void 0:e.getElementsByClassName(l.css.show)[0].classList.contains(l.css.timeContainer))||!t.oldDate&&this.optionsStore.options.useCurrent||t.oldDate&&(null===(s=t.date)||void 0===s?void 0:s.isSame(t.oldDate))||(clearTimeout(this._currentPromptTimeTimeout),this._currentPromptTimeTimeout=setTimeout((()=>{this.display.widget&&this._eventEmitters.action.emit({e:{currentTarget:this.display.widget.querySelector(`.${l.css.switch} div`)},action:b.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const H={},x=t=>{H[t.name]||(H[t.name]=t.localization)},P=t=>{let e=H[t];e&&(g.localization=e)},I=function(t,e){return t?(t.installed||(t(e,{TempusDominus:V,Dates:w,Display:$,DateTime:a,ErrorMessages:r},z),t.installed=!0),z):z},N="6.1.2",z={TempusDominus:V,extend:I,loadLocale:x,locale:P,Namespace:l,DefaultOptions:g,DateTime:a,Unit:e,version:"6.1.2"};export{a as DateTime,g as DefaultOptions,l as Namespace,V as TempusDominus,e as Unit,I as extend,x as loadLocale,P as locale,N as version}; +var t;!function(t){t.seconds="seconds",t.minutes="minutes",t.hours="hours",t.date="date",t.month="month",t.year="year"}(t||(t={}));const e={month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},s={hour:"2-digit",hour12:!1},i=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}};class o extends Date{constructor(){super(...arguments),this.locale="default",this.nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],this.leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335]}setLocale(t){return this.locale=t,this}static convert(t,e="default"){if(!t)throw new Error("A date is required");return new o(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocale(e)}static fromString(t,e){return new o(t)}get clone(){return new o(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocale(this.locale)}startOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(0);break;case"minutes":this.setSeconds(0,0);break;case"hours":this.setMinutes(0,0,0);break;case"date":this.setHours(0,0,0,0);break;case"weekDay":if(this.startOf(t.date),this.weekDay===s)break;let e=this.weekDay;0!==s&&0===this.weekDay&&(e=8-s),this.manipulate(s-e,t.date);break;case"month":this.startOf(t.date),this.setDate(1);break;case"year":this.startOf(t.date),this.setMonth(0,1)}return this}endOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(999);break;case"minutes":this.setSeconds(59,999);break;case"hours":this.setMinutes(59,59,999);break;case"date":this.setHours(23,59,59,999);break;case"weekDay":this.endOf(t.date),this.manipulate(6+s-this.weekDay,t.date);break;case"month":this.endOf(t.date),this.manipulate(1,t.month),this.setDate(0);break;case"year":this.endOf(t.date),this.manipulate(1,t.year),this.setDate(0)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}format(t,e=this.locale){return new Intl.DateTimeFormat(e,t).format(this)}isBefore(t,e){if(!e)return this.valueOf()t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this.clone.startOf(e).valueOf()>t.clone.startOf(e).valueOf()}isSame(t,e){if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=o.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1];return(o?this.isAfter(t,s):!this.isBefore(t,s))&&(a?this.isBefore(e,s):!this.isAfter(e,s))||(o?this.isBefore(t,s):!this.isAfter(t,s))&&(a?this.isAfter(e,s):!this.isBefore(e,s))}parts(t=this.locale,e={dateStyle:"full",timeStyle:"long"}){const s={};return new Intl.DateTimeFormat(t,e).formatToParts(this).filter((t=>"literal"!==t.type)).forEach((t=>s[t.type]=t.value)),s}get seconds(){return this.getSeconds()}set seconds(t){this.setSeconds(t)}get secondsFormatted(){return this.parts(void 0,e).second}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.parts(void 0,e).minute}get hours(){return this.getHours()}set hours(t){this.setHours(t)}get hoursFormatted(){return this.parts(void 0,s).hour}get twelveHoursFormatted(){return this.parts(void 0,e).hour}meridiem(t=this.locale){return new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0}).formatToParts(this).find((t=>"dayPeriod"===t.type))?.value}get date(){return this.getDate()}set date(t){this.setDate(t)}get dateFormatted(){return this.parts(void 0,e).day}get weekDay(){return this.getDay()}get month(){return this.getMonth()}set month(t){const e=new Date(this.year,t+1);e.setDate(0);const s=e.getDate();this.date>s&&(this.date=s),this.setMonth(t)}get monthFormatted(){return this.parts(void 0,e).month}get year(){return this.getFullYear()}set year(t){this.setFullYear(t)}get week(){const t=this.computeOrdinal(),e=this.getUTCDay();let s=Math.floor((t-e+10)/7);return s<1?s=this.weeksInWeekYear(this.year-1):s>this.weeksInWeekYear(this.year)&&(s=1),s}weeksInWeekYear(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,i=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===i?53:52}get isLeapYear(){return this.year%4==0&&(this.year%100!=0||this.year%400==0)}computeOrdinal(){return this.date+(this.isLeapYear?this.leapLadder:this.nonLeapLadder)[this.month]}}class a extends Error{}class n{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const e=new a(`${this.base} Unexpected option: ${t} does not match a known option.`);throw e.code=1,e}unexpectedOptions(t){const e=new a(`${this.base}: ${t.join(", ")}`);throw e.code=1,e}unexpectedOptionValue(t,e,s){const i=new a(`${this.base} Unexpected option value: ${t} does not accept a value of "${e}". Valid values are: ${s.join(", ")}`);throw i.code=2,i}typeMismatch(t,e,s){const i=new a(`${this.base} Mismatch types: ${t} has a type of ${e} instead of the required ${s}`);throw i.code=3,i}numbersOutOfRage(t,e,s){const i=new a(`${this.base} ${t} expected an array of number between ${e} and ${s}.`);throw i.code=4,i}failedToParseDate(t,e,s=!1){const i=new a(`${this.base} Could not correctly parse "${e}" to a date for ${t}.`);if(i.code=5,!s)throw i;console.warn(i)}mustProvideElement(){const t=new a(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new a(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const e=new a(`${this.base} A configuration value conflicts with another rule. ${t}`);throw e.code=8,e}customDateFormatError(t){const e=new a(`${this.base} customDateFormat: ${t}`);throw e.code=9,e}dateString(){console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`)}throwError(t){const e=new a(`${this.base} ${t}`);throw e.code=9,e}}const r="tempus-dominus";class d{}d.NAME=r,d.dataKey="td",d.events=new class{constructor(){this.key=".td",this.change=`change${this.key}`,this.update=`update${this.key}`,this.error=`error${this.key}`,this.show=`show${this.key}`,this.hide=`hide${this.key}`,this.blur=`blur${this.key}`,this.focus=`focus${this.key}`,this.keyup=`keyup${this.key}`,this.keydown=`keydown${this.key}`}},d.css=new class{constructor(){this.widget=`${r}-widget`,this.calendarHeader="calendar-header",this.switch="picker-switch",this.toolbar="toolbar",this.noHighlight="no-highlight",this.sideBySide="timepicker-sbs",this.previous="previous",this.next="next",this.disabled="disabled",this.old="old",this.new="new",this.active="active",this.dateContainer="date-container",this.decadesContainer=`${this.dateContainer}-decades`,this.decade="decade",this.yearsContainer=`${this.dateContainer}-years`,this.year="year",this.monthsContainer=`${this.dateContainer}-months`,this.month="month",this.daysContainer=`${this.dateContainer}-days`,this.day="day",this.calendarWeeks="cw",this.dayOfTheWeek="dow",this.today="today",this.weekend="weekend",this.timeContainer="time-container",this.separator="separator",this.clockContainer=`${this.timeContainer}-clock`,this.hourContainer=`${this.timeContainer}-hour`,this.minuteContainer=`${this.timeContainer}-minute`,this.secondContainer=`${this.timeContainer}-second`,this.hour="hour",this.minute="minute",this.second="second",this.toggleMeridiem="toggleMeridiem",this.show="show",this.collapsing="td-collapsing",this.collapse="td-collapse",this.inline="inline",this.lightTheme="light",this.darkTheme="dark",this.isDarkPreferredQuery="(prefers-color-scheme: dark)"}},d.errorMessages=new n;class c{constructor(){this.cache=new Map}locate(t){const e=this.cache.get(t);if(e)return e;const s=new t;return this.cache.set(t,s),s}}let l;const h=[{name:"calendar",className:d.css.daysContainer,unit:t.month,step:1},{name:"months",className:d.css.monthsContainer,unit:t.year,step:1},{name:"years",className:d.css.yearsContainer,unit:t.year,step:10},{name:"decades",className:d.css.decadesContainer,unit:t.year,step:100}];class p{constructor(){this.viewDate=new o,this._currentCalendarViewMode=0,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=h[t].name}refreshCurrentView(){this.currentView=h[this.currentCalendarViewMode].name}}class u{constructor(){this.optionsStore=l.locate(p)}isValid(e,s){if(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(e))return!1;if(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(e))return!1;if(s!==t.month&&s!==t.year&&this.optionsStore.options.restrictions.daysOfWeekDisabled?.length>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(e.weekDay))return!1;if(this.optionsStore.options.restrictions.minDate&&e.isBefore(this.optionsStore.options.restrictions.minDate,s))return!1;if(this.optionsStore.options.restrictions.maxDate&&e.isAfter(this.optionsStore.options.restrictions.maxDate,s))return!1;if(s===t.hours||s===t.minutes||s===t.seconds){if(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(e))return!1;if(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(e))return!1;if(this.optionsStore.options.restrictions.disabledTimeIntervals.length>0)for(let t of this.optionsStore.options.restrictions.disabledTimeIntervals)if(e.isBetween(t.from,t.to))return!1}return!0}_isInDisabledDates(e){if(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)return!1;const s=e.format(i(t.date));return this.optionsStore.options.restrictions.disabledDates.map((e=>e.format(i(t.date)))).find((t=>t===s))}_isInEnabledDates(e){if(!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length)return!0;const s=e.format(i(t.date));return this.optionsStore.options.restrictions.enabledDates.map((e=>e.format(i(t.date)))).find((t=>t===s))}_isInDisabledHours(t){if(!this.optionsStore.options.restrictions.disabledHours||0===this.optionsStore.options.restrictions.disabledHours.length)return!1;const e=t.hours;return this.optionsStore.options.restrictions.disabledHours.find((t=>t===e))}_isInEnabledHours(t){if(!this.optionsStore.options.restrictions.enabledHours||0===this.optionsStore.options.restrictions.enabledHours.length)return!0;const e=t.hours;return this.optionsStore.options.restrictions.enabledHours.find((t=>t===e))}}class m{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),this.unsubscribe.bind(this,this.subscribers.length-1)}unsubscribe(t){this.subscribers.splice(t,1)}emit(t){this.subscribers.forEach((e=>{e(t)}))}destroy(){this.subscribers=null,this.subscribers=[]}}class y{constructor(){this.triggerEvent=new m,this.viewUpdate=new m,this.updateDisplay=new m,this.action=new m}destroy(){this.triggerEvent.destroy(),this.viewUpdate.destroy(),this.updateDisplay.destroy(),this.action.destroy()}}const g={restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},display:{icons:{type:"icons",time:"fa-solid fa-clock",date:"fa-solid fa-calendar",up:"fa-solid fa-arrow-up",down:"fa-solid fa-arrow-down",previous:"fa-solid fa-chevron-left",next:"fa-solid fa-chevron-right",today:"fa-solid fa-calendar-check",clear:"fa-solid fa-trash",close:"fa-solid fa-xmark"},sideBySide:!1,calendarWeeks:!1,viewMode:"calendar",toolbarPlacement:"bottom",keepOpen:!1,buttons:{today:!1,clear:!1,close:!1},components:{calendar:!0,date:!0,month:!0,year:!0,decades:!0,clock:!0,hours:!0,minutes:!0,seconds:!1,useTwentyfourHour:void 0},inline:!1,theme:"auto"},stepping:1,useCurrent:!0,defaultDate:void 0,localization:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",previousMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",previousYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",previousDecade:"Previous Decade",nextDecade:"Next Decade",previousCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",toggleMeridiem:"Toggle Meridiem",selectTime:"Select Time",selectDate:"Select Date",dayViewHeaderFormat:{month:"long",year:"2-digit"},locale:"default",startOfTheWeek:0,dateFormats:{LTS:"h:mm:ss T",LT:"h:mm T",L:"MM/dd/yyyy",LL:"MMMM d, yyyy",LLL:"MMMM d, yyyy h:mm T",LLLL:"dddd, MMMM d, yyyy h:mm T"},ordinal:t=>t,format:"L"},keepInvalid:!1,debug:!1,allowInputToggle:!1,viewDate:new o,multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,meta:{},container:void 0};class v{static deepCopy(t){const e={};return Object.keys(t).forEach((s=>{const i=t[s];e[s]=i,"object"!=typeof i||i instanceof HTMLElement||i instanceof Element||i instanceof Date||Array.isArray(i)||(e[s]=v.deepCopy(i))})),e}static objectPath(t,e){return"."===t.charAt(0)&&(t=t.slice(1)),t?t.split(".").reduce(((t,e)=>v.isValue(t)||v.isValue(t[e])?t[e]:void 0),e):e}static spread(t,e,s="",i){const o=v.objectPath(s,g),a=Object.keys(t).filter((t=>!Object.keys(o).includes(t)));if(a.length>0){const t=v.getFlattenDefaultOptions(),e=a.map((e=>{let i=`"${s}.${e}" in not a known option.`,o=t.find((t=>t.includes(e)));return o&&(i+=` Did you mean "${o}"?`),i}));d.errorMessages.unexpectedOptions(e)}Object.keys(t).filter((t=>"__proto__"!==t&&"constructor"!==t)).forEach((a=>{"."===(s+=`.${a}`).charAt(0)&&(s=s.slice(1));const n=o[a];let r=typeof t[a],d=typeof n,c=t[a];if(null==c)return e[a]=c,void(s=s.substring(0,s.lastIndexOf(`.${a}`)));"object"!=typeof n||Array.isArray(t[a])||n instanceof Date||v.ignoreProperties.includes(a)?e[a]=v.processKey(a,c,r,d,s,i):v.spread(t[a],e[a],s,i),s=s.substring(0,s.lastIndexOf(`.${a}`))}))}static processKey(t,e,s,i,o,a){switch(t){case"defaultDate":{const t=this.dateConversion(e,"defaultDate",a);if(void 0!==t)return t.setLocale(a.locale),t;d.errorMessages.typeMismatch("defaultDate",s,"DateTime or Date");break}case"viewDate":{const t=this.dateConversion(e,"viewDate",a);if(void 0!==t)return t.setLocale(a.locale),t;d.errorMessages.typeMismatch("viewDate",s,"DateTime or Date");break}case"minDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.minDate",a);if(void 0!==t)return t.setLocale(a.locale),t;d.errorMessages.typeMismatch("restrictions.minDate",s,"DateTime or Date");break}case"maxDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.maxDate",a);if(void 0!==t)return t.setLocale(a.locale),t;d.errorMessages.typeMismatch("restrictions.maxDate",s,"DateTime or Date");break}case"disabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.disabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&d.errorMessages.numbersOutOfRage("restrictions.disabledHours",0,23),e);case"enabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.enabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&d.errorMessages.numbersOutOfRage("restrictions.enabledHours",0,23),e);case"daysOfWeekDisabled":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.daysOfWeekDisabled",e,s),e.filter((t=>t<0||t>6)).length>0&&d.errorMessages.numbersOutOfRage("restrictions.daysOfWeekDisabled",0,6),e);case"enabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.enabledDates",e,s,a),e);case"disabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.disabledDates",e,s,a),e);case"disabledTimeIntervals":if(void 0===e)return[];Array.isArray(e)||d.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const n=e;for(let e=0;e{const i=`${t}[${e}].${s}`;let o=n[e][s];const r=this.dateConversion(o,i,a);r||d.errorMessages.typeMismatch(i,typeof o,"DateTime or Date"),r.setLocale(a.locale),n[e][s]=r}));return n;case"toolbarPlacement":case"type":case"viewMode":case"theme":const r={toolbarPlacement:["top","bottom","default"],type:["icons","sprites"],viewMode:["clock","calendar","months","years","decades"],theme:["light","dark","auto"]}[t];return r.includes(e)||d.errorMessages.unexpectedOptionValue(o.substring(1),e,r),e;case"meta":case"dayViewHeaderFormat":return e;case"container":return e&&!(e instanceof HTMLElement||e instanceof Element||e?.appendChild)&&d.errorMessages.typeMismatch(o.substring(1),typeof e,"HTMLElement"),e;case"useTwentyfourHour":if(void 0===e||"boolean"===s)return e;d.errorMessages.typeMismatch(o,s,i);break;default:switch(i){case"boolean":return"true"===e||!0===e;case"number":return+e;case"string":return e.toString();case"object":return{};case"function":return e;default:d.errorMessages.typeMismatch(o,s,i)}}}static _mergeOptions(t,e){const s=v.deepCopy(e),i="default"!==e.localization?.locale?e.localization:t?.localization||g.localization;return v.spread(t,s,"",i),s}static _dataToOptions(t,e){const s=JSON.parse(JSON.stringify(t.dataset));if(s?.tdTargetInput&&delete s.tdTargetInput,s?.tdTargetToggle&&delete s.tdTargetToggle,!s||0===Object.keys(s).length||s.constructor!==DOMStringMap)return e;let i={};const o=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},a=(t,e,s,i)=>{const n=o(s)[t[e].toLowerCase()],r={};return void 0===n||(s[n].constructor===Object?(e++,r[n]=a(t,e,s[n],i)):r[n]=i),r},n=o(e);return Object.keys(s).filter((t=>t.startsWith(d.dataKey))).map((t=>t.substring(2))).forEach((t=>{let o=n[t.toLowerCase()];if(t.includes("_")){const r=t.split("_");o=n[r[0].toLowerCase()],void 0!==o&&e[o].constructor===Object&&(i[o]=a(r,1,e[o],s[`td${t}`]))}else void 0!==o&&(i[o]=s[`td${t}`])})),this._mergeOptions(i,e)}static _dateTypeCheck(t,e){if(t.constructor.name===o.name)return t;if(t.constructor.name===Date.name)return o.convert(t);if("string"==typeof t){const s=o.fromString(t,e);return"null"===JSON.stringify(s)?null:s}return null}static _typeCheckDateArray(t,e,s,i){Array.isArray(e)||d.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||d.errorMessages.typeMismatch(t,s,"array of numbers")}static dateConversion(t,e,s){"string"==typeof t&&"input"!==e&&d.errorMessages.dateString();const i=this._dateTypeCheck(t,s);return i||d.errorMessages.failedToParseDate(e,t,"input"===e),i}static getFlattenDefaultOptions(){if(this._flattenDefaults)return this._flattenDefaults;const t=(e,s=[])=>Array.isArray(e)?[]:Object(e)===e?Object.entries(e).flatMap((([e,i])=>t(i,[...s,e]))):s.join(".");return this._flattenDefaults=t(g),this._flattenDefaults}static _validateConflicts(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||d.errorMessages.conflictingConfiguration("Cannot use side by side mode without the clock components"),t.restrictions.minDate&&t.restrictions.maxDate&&(t.restrictions.minDate.isAfter(t.restrictions.maxDate)&&d.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&d.errorMessages.conflictingConfiguration("maxDate is before minDate"))}}v.ignoreProperties=["meta","dayViewHeaderFormat","container","dateForms","ordinal"],v.isValue=t=>null!=t;class S{constructor(){this._dates=[],this.optionsStore=l.locate(p),this.validation=l.locate(u),this._eventEmitters=l.locate(y)}get picked(){return this._dates}get lastPicked(){return this._dates[this.lastPickedIndex]}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){const e=this.optionsStore.options.display.components;return t?t.format({year:e.calendar&&e.year?"numeric":void 0,month:e.calendar&&e.month?"2-digit":void 0,day:e.calendar&&e.date?"2-digit":void 0,hour:e.clock&&e.hours?e.useTwentyfourHour?"2-digit":"numeric":void 0,minute:e.clock&&e.minutes?"2-digit":void 0,second:e.clock&&e.seconds?"2-digit":void 0,hour12:!e.useTwentyfourHour}):""}parseInput(t){return v.dateConversion(t,"input",this.optionsStore.options.localization)}setFromInput(t,e){if(!t)return void this.setValue(void 0,e);const s=this.parseInput(t);s&&(s.setLocale(this.optionsStore.options.localization.locale),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!e)return void 0!==this._dates.find((e=>e===t));const s=i(e);let o=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===o))}pickedIndex(t,e){if(!e)return this._dates.indexOf(t);const s=i(e);let o=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(o)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:d.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[]}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}setValue(t,e){const s=void 0===e,i=!t&&s;let o=this.optionsStore.unset?null:this._dates[e];!o&&!this.optionsStore.unset&&s&&i&&(o=this.lastPicked);const a=()=>{if(!this.optionsStore.input)return;let e=this.formatInput(t);this.optionsStore.options.multipleDates&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)};if(t&&o?.isSame(t))a();else{if(!t)return!this.optionsStore.options.multipleDates||1===this._dates.length||i?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),a(),this._eventEmitters.triggerEvent.emit({type:d.events.change,date:void 0,oldDate:o,isClear:i,isValid:!0}),void this._eventEmitters.updateDisplay.emit("all");if(e=e||0,t=t.clone,1!==this.optionsStore.options.stepping&&(t.minutes=Math.round(t.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,t.seconds=0),this.validation.isValid(t))return this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),void this._eventEmitters.triggerEvent.emit({type:d.events.change,date:t,oldDate:o,isClear:i,isValid:!0});this.optionsStore.options.keepInvalid&&(this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this._eventEmitters.triggerEvent.emit({type:d.events.change,date:t,oldDate:o,isClear:i,isValid:!1})),this._eventEmitters.triggerEvent.emit({type:d.events.error,reason:d.errorMessages.failedToSetInvalidDate,date:t,oldDate:o})}}}var w;!function(t){t.next="next",t.previous="previous",t.changeCalendarView="changeCalendarView",t.selectMonth="selectMonth",t.selectYear="selectYear",t.selectDecade="selectDecade",t.selectDay="selectDay",t.selectHour="selectHour",t.selectMinute="selectMinute",t.selectSecond="selectSecond",t.incrementHours="incrementHours",t.incrementMinutes="incrementMinutes",t.incrementSeconds="incrementSeconds",t.decrementHours="decrementHours",t.decrementMinutes="decrementMinutes",t.decrementSeconds="decrementSeconds",t.toggleMeridiem="toggleMeridiem",t.togglePicker="togglePicker",t.showClock="showClock",t.showHours="showHours",t.showMinutes="showMinutes",t.showSeconds="showSeconds",t.clear="clear",t.close="close",t.today="today"}(w||(w={}));var b=w;class f{constructor(){this.optionsStore=l.locate(p),this.dates=l.locate(S),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");if(t.classList.add(d.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(d.css.calendarWeeks,d.css.noHighlight),t.appendChild(e)}for(let e=0;e<42;e++){if(0!==e&&e%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(d.css.calendarWeeks,d.css.noHighlight),t.appendChild(e)}const s=document.createElement("div");s.setAttribute("data-action",b.selectDay),t.appendChild(s)}return t}_update(e,s){const i=e.getElementsByClassName(d.css.daysContainer)[0];if("calendar"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(d.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(d.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.optionsStore.options.display.components.month?s.classList.remove(d.css.disabled):s.classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.month),t.month)?e.classList.remove(d.css.disabled):e.classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.month),t.month)?o.classList.remove(d.css.disabled):o.classList.add(d.css.disabled)}let a=this.optionsStore.viewDate.clone.startOf(t.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,t.hours);i.querySelectorAll(`[data-action="${b.selectDay}"], .${d.css.calendarWeeks}`).forEach((e=>{if(this.optionsStore.options.display.calendarWeeks&&e.classList.contains(d.css.calendarWeeks)){if("#"===e.innerText)return;return void(e.innerText=`${a.week}`)}let i=[];i.push(d.css.day),a.isBefore(this.optionsStore.viewDate,t.month)&&i.push(d.css.old),a.isAfter(this.optionsStore.viewDate,t.month)&&i.push(d.css.new),!this.optionsStore.unset&&this.dates.isPicked(a,t.date)&&i.push(d.css.active),this.validation.isValid(a,t.date)||i.push(d.css.disabled),a.isSame(new o,t.date)&&i.push(d.css.today),0!==a.weekDay&&6!==a.weekDay||i.push(d.css.weekend),s(t.date,a,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${a.year}-${a.monthFormatted}-${a.dateFormatted}`),e.setAttribute("data-day",`${a.date}`),e.innerText=a.format({day:"numeric"}),a.manipulate(1,t.date)}))}_daysOfTheWeek(){let e=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(t.date);const s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(d.css.calendarWeeks,d.css.noHighlight),t.innerText="#",s.push(t)}for(let i=0;i<7;i++){const i=document.createElement("div");i.classList.add(d.css.dayOfTheWeek,d.css.noHighlight),i.innerText=e.format({weekday:"short"}),e.manipulate(1,t.date),s.push(i)}return s}}class D{constructor(){this.optionsStore=l.locate(p),this.dates=l.locate(S),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(d.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectMonth),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(d.css.monthsContainer)[0];if("months"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(d.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(d.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.optionsStore.options.display.components.year?s.classList.remove(d.css.disabled):s.classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.year),t.year)?e.classList.remove(d.css.disabled):e.classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.year),t.year)?o.classList.remove(d.css.disabled):o.classList.add(d.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.year);i.querySelectorAll(`[data-action="${b.selectMonth}"]`).forEach(((e,i)=>{let a=[];a.push(d.css.month),!this.optionsStore.unset&&this.dates.isPicked(o,t.month)&&a.push(d.css.active),this.validation.isValid(o,t.month)||a.push(d.css.disabled),s(t.month,o,a,e),e.classList.remove(...e.classList),e.classList.add(...a),e.setAttribute("data-value",`${i}`),e.innerText=`${o.format({month:"short"})}`,o.manipulate(1,t.month)}))}}class k{constructor(){this.optionsStore=l.locate(p),this.dates=l.locate(S),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(d.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectYear),t.appendChild(e)}return t}_update(e,s){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,t.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,t.year);const i=e.getElementsByClassName(d.css.yearsContainer)[0];if("years"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(d.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(d.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.optionsStore.options.display.components.decades?s.classList.remove(d.css.disabled):s.classList.add(d.css.disabled),this.validation.isValid(this._startYear,t.year)?e.classList.remove(d.css.disabled):e.classList.add(d.css.disabled),this.validation.isValid(this._endYear,t.year)?o.classList.remove(d.css.disabled):o.classList.add(d.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.year).manipulate(-1,t.year);i.querySelectorAll(`[data-action="${b.selectYear}"]`).forEach((e=>{let i=[];i.push(d.css.year),!this.optionsStore.unset&&this.dates.isPicked(o,t.year)&&i.push(d.css.active),this.validation.isValid(o,t.year)||i.push(d.css.disabled),s(t.year,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.year}`),e.innerText=o.format({year:"numeric"}),o.manipulate(1,t.year)}))}}class _{constructor(){this.optionsStore=l.locate(p),this.dates=l.locate(S),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(d.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectDecade),t.appendChild(e)}return t}_update(e,s){const[i,o]=S.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(t.year),this._startDecade.year=i,this._endDecade=this.optionsStore.viewDate.clone.startOf(t.year),this._endDecade.year=o;const a=e.getElementsByClassName(d.css.decadesContainer)[0],[n,r,c]=a.parentElement.getElementsByClassName(d.css.calendarHeader)[0].getElementsByTagName("div");"decades"===this.optionsStore.currentView&&(r.setAttribute(d.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,t.year)?n.classList.remove(d.css.disabled):n.classList.add(d.css.disabled),this.validation.isValid(this._endDecade,t.year)?c.classList.remove(d.css.disabled):c.classList.add(d.css.disabled));const l=this.dates.picked.map((t=>t.year));a.querySelectorAll(`[data-action="${b.selectDecade}"]`).forEach(((e,i)=>{if(0===i)return e.classList.add(d.css.old),this._startDecade.year-10<0?(e.textContent=" ",n.classList.add(d.css.disabled),e.classList.add(d.css.disabled),void e.setAttribute("data-value","")):(e.innerText=this._startDecade.clone.manipulate(-10,t.year).format({year:"numeric"}),void e.setAttribute("data-value",`${this._startDecade.year}`));let o=[];o.push(d.css.decade);const a=this._startDecade.year,r=this._startDecade.year+9;!this.optionsStore.unset&&l.filter((t=>t>=a&&t<=r)).length>0&&o.push(d.css.active),s("decade",this._startDecade,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${this._startDecade.year}`),e.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,t.year)}))}}class C{constructor(){this._gridColumns="",this.optionsStore=l.locate(p),this.dates=l.locate(S),this.validation=l.locate(u)}getPicker(t){const e=document.createElement("div");return e.classList.add(d.css.clockContainer),e.append(...this._grid(t)),e}_update(e){const s=e.getElementsByClassName(d.css.clockContainer)[0],i=(this.dates.lastPicked||this.optionsStore.viewDate).clone;if(s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(d.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.hours),t.hours)||s.querySelector(`[data-action=${b.incrementHours}]`).classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.hours),t.hours)||s.querySelector(`[data-action=${b.decrementHours}]`).classList.add(d.css.disabled),s.querySelector(`[data-time-component=${t.hours}]`).innerText=this.optionsStore.options.display.components.useTwentyfourHour?i.hoursFormatted:i.twelveHoursFormatted),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.minutes),t.minutes)||s.querySelector(`[data-action=${b.incrementMinutes}]`).classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.minutes),t.minutes)||s.querySelector(`[data-action=${b.decrementMinutes}]`).classList.add(d.css.disabled),s.querySelector(`[data-time-component=${t.minutes}]`).innerText=i.minutesFormatted),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.seconds),t.seconds)||s.querySelector(`[data-action=${b.incrementSeconds}]`).classList.add(d.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.seconds),t.seconds)||s.querySelector(`[data-action=${b.decrementSeconds}]`).classList.add(d.css.disabled),s.querySelector(`[data-time-component=${t.seconds}]`).innerText=i.secondsFormatted),!this.optionsStore.options.display.components.useTwentyfourHour){const e=s.querySelector(`[data-action=${b.toggleMeridiem}]`);e.innerText=i.meridiem(),this.validation.isValid(i.clone.manipulate(i.hours>=12?-12:12,t.hours))?e.classList.remove(d.css.disabled):e.classList.add(d.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(e){this._gridColumns="";const s=[],i=[],o=[],a=document.createElement("div"),n=e(this.optionsStore.options.display.icons.up),r=e(this.optionsStore.options.display.icons.down);a.classList.add(d.css.separator,d.css.noHighlight);const c=a.cloneNode(!0);c.innerHTML=":";const l=(t=!1)=>t?c.cloneNode(!0):a.cloneNode(!0);if(this.optionsStore.options.display.components.hours){let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementHour),e.setAttribute("data-action",b.incrementHours),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickHour),e.setAttribute("data-action",b.showHours),e.setAttribute("data-time-component",t.hours),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementHour),e.setAttribute("data-action",b.decrementHours),e.appendChild(r.cloneNode(!0)),o.push(e),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(l()),i.push(l(!0)),o.push(l()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementMinute),e.setAttribute("data-action",b.incrementMinutes),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickMinute),e.setAttribute("data-action",b.showMinutes),e.setAttribute("data-time-component",t.minutes),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementMinute),e.setAttribute("data-action",b.decrementMinutes),e.appendChild(r.cloneNode(!0)),o.push(e)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(l()),i.push(l(!0)),o.push(l()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementSecond),e.setAttribute("data-action",b.incrementSeconds),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickSecond),e.setAttribute("data-action",b.showSeconds),e.setAttribute("data-time-component",t.seconds),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementSecond),e.setAttribute("data-action",b.decrementSeconds),e.appendChild(r.cloneNode(!0)),o.push(e)}if(!this.optionsStore.options.display.components.useTwentyfourHour){this._gridColumns+=" a";let t=l();s.push(t);let e=document.createElement("button");e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",b.toggleMeridiem),e.setAttribute("tabindex","-1"),d.css.toggleMeridiem.includes(",")?e.classList.add(...d.css.toggleMeridiem.split(",")):e.classList.add(d.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(d.css.noHighlight),t.appendChild(e),i.push(t),t=l(),o.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...i,...o]}}class E{constructor(){this.optionsStore=l.locate(p),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(d.css.hourContainer);for(let e=0;e<(this.optionsStore.options.display.components.useTwentyfourHour?24:12);e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectHour),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(d.css.hourContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.date);i.querySelectorAll(`[data-action="${b.selectHour}"]`).forEach((e=>{let i=[];i.push(d.css.hour),this.validation.isValid(o,t.hours)||i.push(d.css.disabled),s(t.hours,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.hours}`),e.innerText=this.optionsStore.options.display.components.useTwentyfourHour?o.hoursFormatted:o.twelveHoursFormatted,o.manipulate(1,t.hours)}))}}class M{constructor(){this.optionsStore=l.locate(p),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(d.css.minuteContainer);let e=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;for(let s=0;s<60/e;s++){const e=document.createElement("div");e.setAttribute("data-action",b.selectMinute),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(d.css.minuteContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.hours),a=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;i.querySelectorAll(`[data-action="${b.selectMinute}"]`).forEach((e=>{let i=[];i.push(d.css.minute),this.validation.isValid(o,t.minutes)||i.push(d.css.disabled),s(t.minutes,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.minutes}`),e.innerText=o.minutesFormatted,o.manipulate(a,t.minutes)}))}}class L{constructor(){this.optionsStore=l.locate(p),this.validation=l.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(d.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectSecond),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(d.css.secondContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.minutes);i.querySelectorAll(`[data-action="${b.selectSecond}"]`).forEach((e=>{let i=[];i.push(d.css.second),this.validation.isValid(o,t.seconds)||i.push(d.css.disabled),s(t.seconds,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.seconds}`),e.innerText=o.secondsFormatted,o.manipulate(5,t.seconds)}))}}class T{static toggle(t){t.classList.contains(d.css.show)?this.hide(t):this.show(t)}static showImmediately(t){t.classList.remove(d.css.collapsing),t.classList.add(d.css.collapse,d.css.show),t.style.height=""}static show(t){if(t.classList.contains(d.css.collapsing)||t.classList.contains(d.css.show))return;t.style.height="0",t.classList.remove(d.css.collapse),t.classList.add(d.css.collapsing),setTimeout((()=>{T.showImmediately(t)}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hideImmediately(t){t&&(t.classList.remove(d.css.collapsing,d.css.show),t.classList.add(d.css.collapse))}static hide(t){if(t.classList.contains(d.css.collapsing)||!t.classList.contains(d.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(d.css.collapse,d.css.show),t.classList.add(d.css.collapsing),t.style.height="",setTimeout((()=>{T.hideImmediately(t)}),this.getTransitionDurationFromElement(t))}}T.getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),o=Number.parseFloat(s);return i||o?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0};class A{constructor(){this._isVisible=!1,this._documentClickEvent=t=>{this.optionsStore.options.debug||window.debug||!this._isVisible||t.composedPath().includes(this.widget)||t.composedPath()?.includes(this.optionsStore.element)||this.hide()},this._actionsClickEvent=t=>{this._eventEmitters.action.emit({e:t})},this.optionsStore=l.locate(p),this.validation=l.locate(u),this.dates=l.locate(S),this.dateDisplay=l.locate(f),this.monthDisplay=l.locate(D),this.yearDisplay=l.locate(k),this.decadeDisplay=l.locate(_),this.timeDisplay=l.locate(C),this.hourDisplay=l.locate(E),this.minuteDisplay=l.locate(M),this.secondDisplay=l.locate(L),this._eventEmitters=l.locate(y),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get isVisible(){return this._isVisible}_update(e){if(this.widget)switch(e){case t.seconds:this.secondDisplay._update(this.widget,this.paint);break;case t.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case t.hours:this.hourDisplay._update(this.widget,this.paint);break;case t.date:this.dateDisplay._update(this.widget,this.paint);break;case t.month:this.monthDisplay._update(this.widget,this.paint);break;case t.year:this.yearDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(t.hours),this._update(t.minutes),this._update(t.seconds);break;case"calendar":this._update(t.date),this._update(t.year),this._update(t.month),this.decadeDisplay._update(this.widget,this.paint),this._updateCalendarHeader();break;case"all":this._hasTime&&this._update("clock"),this._hasDate&&this._update("calendar")}}paint(t,e,s,i){}show(){if(null==this.widget){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const e=(new o).setLocale(this.optionsStore.options.localization.locale);if(!this.optionsStore.options.keepInvalid){let s=0,i=1;for(this.optionsStore.options.restrictions.maxDate?.isBefore(e)&&(i=-1);!(this.validation.isValid(e)||(e.manipulate(i,t.date),s>31));)s++}this.dates.setValue(e)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}this._buildWidget(),this._updateTheme();const e=this._hasTime&&!this._hasDate;if(e&&(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:b.showClock})),this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),e||"clock"===this.optionsStore.options.display.viewMode||(this._hasTime&&(this.optionsStore.options.display.sideBySide?T.show(this.widget.querySelector(`div.${d.css.timeContainer}`)):T.hideImmediately(this.widget.querySelector(`div.${d.css.timeContainer}`))),T.show(this.widget.querySelector(`div.${d.css.dateContainer}`))),this._hasDate&&this._showMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{(this.optionsStore.options?.container||document.body).appendChild(this.widget),this.createPopup(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?"bottom-end":"bottom-start"}).then()}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:b.showClock}),this.widget.querySelectorAll("[data-action]").forEach((t=>t.addEventListener("click",this._actionsClickEvent))),this._hasTime&&this.optionsStore.options.display.sideBySide&&(this.timeDisplay._update(this.widget),this.widget.getElementsByClassName(d.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(d.css.show),this.optionsStore.options.display.inline||(this.updatePopup(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:d.events.show}),this._isVisible=!0}async createPopup(t,e,s){let i;if(window?.Popper)i=window?.Popper?.createPopper;else{const{createPopper:t}=await import("@popperjs/core");i=t}i&&(this._popperInstance=i(t,e,s))}updatePopup(){this._popperInstance?.update()}_showMode(t){if(!this.widget)return;if(t){const e=Math.max(this.optionsStore.minimumCalendarViewMode,Math.min(3,this.optionsStore.currentCalendarViewMode+t));if(this.optionsStore.currentCalendarViewMode==e)return;this.optionsStore.currentCalendarViewMode=e}this.widget.querySelectorAll(`.${d.css.dateContainer} > div:not(.${d.css.calendarHeader}), .${d.css.timeContainer} > div:not(.${d.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=h[this.optionsStore.currentCalendarViewMode];let s=this.widget.querySelector(`.${e.className}`);switch(e.className){case d.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case d.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case d.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case d.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this._updateCalendarHeader(),this._eventEmitters.viewUpdate.emit()}_updateTheme(t){if(this.widget){if(t){if(this.optionsStore.options.display.theme===t)return;this.optionsStore.options.display.theme=t}this.widget.classList.remove("light","dark"),this.widget.classList.add(this._getThemeClass()),"auto"===this.optionsStore.options.display.theme?window.matchMedia(d.css.isDarkPreferredQuery).addEventListener("change",(()=>this._updateTheme())):window.matchMedia(d.css.isDarkPreferredQuery).removeEventListener("change",(()=>this._updateTheme()))}}_getThemeClass(){const t=this.optionsStore.options.display.theme||"auto",e=window.matchMedia&&window.matchMedia(d.css.isDarkPreferredQuery).matches;switch(t){case"light":return d.css.lightTheme;case"dark":return d.css.darkTheme;case"auto":return e?d.css.darkTheme:d.css.lightTheme}}_updateCalendarHeader(){const t=[...this.widget.querySelector(`.${d.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(d.css.dateContainer))),[e,s,i]=this.widget.getElementsByClassName(d.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case d.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),i.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case d.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),i.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case d.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),i.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case d.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),i.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.innerText=this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(d.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:d.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?this.dates.lastPicked.clone:void 0}),this._isVisible=!1),document.removeEventListener("click",this._documentClickEvent))}toggle(){return this._isVisible?this.hide():this.show()}_dispose(){document.removeEventListener("click",this._documentClickEvent),this.widget&&(this.widget.querySelectorAll("[data-action]").forEach((t=>t.removeEventListener("click",this._actionsClickEvent))),this.widget.parentNode.removeChild(this.widget),this._widget=void 0)}_buildWidget(){const t=document.createElement("div");t.classList.add(d.css.widget);const e=document.createElement("div");e.classList.add(d.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const s=document.createElement("div");s.classList.add(d.css.timeContainer),s.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),s.appendChild(this.hourDisplay.getPicker()),s.appendChild(this.minuteDisplay.getPicker()),s.appendChild(this.secondDisplay.getPicker());const i=document.createElement("div");if(i.classList.add(d.css.toolbar),i.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(d.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){t.classList.add(d.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");return o.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),o.appendChild(e),o.appendChild(s),t.appendChild(o),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),void(this._widget=t)}"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),this._hasDate&&(this._hasTime&&(e.classList.add(d.css.collapse),"clock"!==this.optionsStore.options.display.viewMode&&e.classList.add(d.css.show)),t.appendChild(e)),this._hasTime&&(this._hasDate&&(s.classList.add(d.css.collapse),"clock"===this.optionsStore.options.display.viewMode&&s.classList.add(d.css.show)),t.appendChild(s)),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");o.classList.add("arrow"),o.setAttribute("data-popper-arrow",""),t.appendChild(o),this._widget=t}get _hasTime(){return this.optionsStore.options.display.components.clock&&(this.optionsStore.options.display.components.hours||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.components.seconds)}get _hasDate(){return this.optionsStore.options.display.components.calendar&&(this.optionsStore.options.display.components.year||this.optionsStore.options.display.components.month||this.optionsStore.options.display.components.date)}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",b.today),e.setAttribute("title",this.optionsStore.options.localization.today),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)),t.push(e)}if(!this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){let e,s;"clock"===this.optionsStore.options.display.viewMode?(e=this.optionsStore.options.localization.selectDate,s=this.optionsStore.options.display.icons.date):(e=this.optionsStore.options.localization.selectTime,s=this.optionsStore.options.display.icons.time);const i=document.createElement("div");i.setAttribute("data-action",b.togglePicker),i.setAttribute("title",e),i.appendChild(this._iconTag(s)),t.push(i)}if(this.optionsStore.options.display.buttons.clear){const e=document.createElement("div");e.setAttribute("data-action",b.clear),e.setAttribute("title",this.optionsStore.options.localization.clear),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)),t.push(e)}if(this.optionsStore.options.display.buttons.close){const e=document.createElement("div");e.setAttribute("data-action",b.close),e.setAttribute("title",this.optionsStore.options.localization.close),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)),t.push(e)}return t}getHeadTemplate(){const t=document.createElement("div");t.classList.add(d.css.calendarHeader);const e=document.createElement("div");e.classList.add(d.css.previous),e.setAttribute("data-action",b.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(d.css.switch),s.setAttribute("data-action",b.changeCalendarView);const i=document.createElement("div");return i.classList.add(d.css.next),i.setAttribute("data-action",b.next),i.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,i),t}_iconTag(t){if("sprites"===this.optionsStore.options.display.icons.type){const e=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","use");return s.setAttribute("xlink:href",t),s.setAttribute("href",t),e.appendChild(s),e}const e=document.createElement("i");return e.classList.add(...t.split(" ")),e}_rebuild(){const t=this._isVisible;t&&this.hide(),this._dispose(),t&&this.show()}}class ${constructor(){this.optionsStore=l.locate(p),this.dates=l.locate(S),this.validation=l.locate(u),this.display=l.locate(A),this._eventEmitters=l.locate(y),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(e,s){const i=e?.currentTarget;if(i?.classList?.contains(d.css.disabled))return!1;s=s||i?.dataset?.action;const a=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case b.next:case b.previous:this.handleNextPrevious(s);break;case b.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case b.selectMonth:case b.selectYear:case b.selectDecade:const n=+i.dataset.value;switch(s){case b.selectMonth:this.optionsStore.viewDate.month=n;break;case b.selectYear:case b.selectDecade:this.optionsStore.viewDate.year=n}this.optionsStore.currentCalendarViewMode===this.optionsStore.minimumCalendarViewMode?(this.dates.setValue(this.optionsStore.viewDate,this.dates.lastPickedIndex),this.optionsStore.options.display.inline||this.display.hide()):this.display._showMode(-1);break;case b.selectDay:const r=this.optionsStore.viewDate.clone;i.classList.contains(d.css.old)&&r.manipulate(-1,t.month),i.classList.contains(d.css.new)&&r.manipulate(1,t.month),r.date=+i.dataset.day;let c=0;this.optionsStore.options.multipleDates?(c=this.dates.pickedIndex(r,t.date),-1!==c?this.dates.setValue(null,c):this.dates.setValue(r,this.dates.lastPickedIndex+1)):this.dates.setValue(r,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.display.hide();break;case b.selectHour:let l=+i.dataset.value;a.hours>=12&&!this.optionsStore.options.display.components.useTwentyfourHour&&(l+=12),a.hours=l,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(e);break;case b.selectMinute:a.minutes=+i.dataset.value,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(e);break;case b.selectSecond:a.seconds=+i.dataset.value,this.dates.setValue(a,this.dates.lastPickedIndex),this.hideOrClock(e);break;case b.incrementHours:this.manipulateAndSet(a,t.hours);break;case b.incrementMinutes:this.manipulateAndSet(a,t.minutes,this.optionsStore.options.stepping);break;case b.incrementSeconds:this.manipulateAndSet(a,t.seconds);break;case b.decrementHours:this.manipulateAndSet(a,t.hours,-1);break;case b.decrementMinutes:this.manipulateAndSet(a,t.minutes,-1*this.optionsStore.options.stepping);break;case b.decrementSeconds:this.manipulateAndSet(a,t.seconds,-1);break;case b.toggleMeridiem:this.manipulateAndSet(a,t.hours,this.dates.lastPicked.hours>=12?-12:12);break;case b.togglePicker:i.getAttribute("title")===this.optionsStore.options.localization.selectDate?(i.setAttribute("title",this.optionsStore.options.localization.selectTime),i.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(i.setAttribute("title",this.optionsStore.options.localization.selectDate),i.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.handleShowClockContainers(b.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${d.css.dateContainer}, .${d.css.timeContainer}`).forEach((t=>T.toggle(t))),this._eventEmitters.viewUpdate.emit();break;case b.showClock:case b.showHours:case b.showMinutes:case b.showSeconds:this.optionsStore.options.display.sideBySide||"clock"===this.optionsStore.currentView||(T.hideImmediately(this.display.widget.querySelector(`div.${d.css.dateContainer}`)),T.showImmediately(this.display.widget.querySelector(`div.${d.css.timeContainer}`))),this.handleShowClockContainers(s);break;case b.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case b.close:this.display.hide();break;case b.today:const h=(new o).setLocale(this.optionsStore.options.localization.locale);this.optionsStore.viewDate=h,this.validation.isValid(h,t.date)&&this.dates.setValue(h,this.dates.lastPickedIndex)}}handleShowClockContainers(e){if(!this.display._hasTime)return void d.errorMessages.throwError("Cannot show clock containers when time is disabled.");this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${d.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let s="";switch(e){case b.showClock:s=d.css.clockContainer,this.display._update("clock");break;case b.showHours:s=d.css.hourContainer,this.display._update(t.hours);break;case b.showMinutes:s=d.css.minuteContainer,this.display._update(t.minutes);break;case b.showSeconds:s=d.css.secondContainer,this.display._update(t.seconds)}this.display.widget.getElementsByClassName(s)[0].style.display="grid"}handleNextPrevious(t){const{unit:e,step:s}=h[this.optionsStore.currentCalendarViewMode];t===b.next?this.optionsStore.viewDate.manipulate(s,e):this.optionsStore.viewDate.manipulate(-1*s,e),this._eventEmitters.viewUpdate.emit(),this.display._showMode()}hideOrClock(t){!this.optionsStore.options.display.components.useTwentyfourHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,b.showClock):this.display.hide()}manipulateAndSet(t,e,s=1){const i=t.manipulate(s,e);this.validation.isValid(i,e)&&this.dates.setValue(i,this.dates.lastPickedIndex)}}class O{constructor(t,e={}){this._subscribers={},this._isDisabled=!1,this._inputChangeEvent=t=>{const e=t?.detail;if(e)return;const s=()=>{this.dates.lastPicked&&(this.optionsStore.viewDate=this.dates.lastPicked.clone)},i=this.optionsStore.input.value;if(this.optionsStore.options.multipleDates)try{const t=i.split(this.optionsStore.options.multipleDatesSeparator);for(let e=0;e{this.optionsStore.element?.disabled||this.optionsStore.input?.disabled||this.toggle()},l=new c,this._eventEmitters=l.locate(y),this.optionsStore=l.locate(p),this.display=l.locate(A),this.dates=l.locate(S),this.actions=l.locate($),t||d.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,g,!0),this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale),this.optionsStore.unset=!0,this._initializeInput(),this._initializeToggle(),this.optionsStore.options.display.inline&&this.display.show(),this._eventEmitters.triggerEvent.subscribe((t=>{this._triggerEvent(t)})),this._eventEmitters.viewUpdate.subscribe((()=>{this._viewUpdate()}))}get viewDate(){return this.optionsStore.viewDate}updateOptions(t,e=!1){e?this._initializeOptions(t,g):this._initializeOptions(t,this.optionsStore.options),this.display._rebuild()}toggle(){this._isDisabled||this.display.toggle()}show(){this._isDisabled||this.display.show()}hide(){this.display.hide()}disable(){this._isDisabled=!0,this.optionsStore.input?.setAttribute("disabled","disabled"),this.display.hide()}enable(){this._isDisabled=!1,this.optionsStore.input?.removeAttribute("disabled")}clear(){this.optionsStore.input.value="",this.dates.clear()}subscribe(t,e){let s;"string"==typeof t&&(t=[t]),s=Array.isArray(e)?e:[e],t.length!==s.length&&d.errorMessages.subscribeMismatch();const i=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:d.events.update,viewDate:this.optionsStore.viewDate.clone})}_unsubscribe(t,e){this._subscribers[t].splice(e,1)}_initializeOptions(t,e,s=!1){let i=v.deepCopy(t);i=v._mergeOptions(i,e),s&&(i=v._dataToOptions(this.optionsStore.element,i)),v._validateConflicts(i),i.viewDate=i.viewDate.setLocale(i.localization.locale),this.optionsStore.viewDate.isSame(i.viewDate)||(this.optionsStore.viewDate=i.viewDate),i.display.components.year&&(this.optionsStore.minimumCalendarViewMode=2),i.display.components.month&&(this.optionsStore.minimumCalendarViewMode=1),i.display.components.date&&(this.optionsStore.minimumCalendarViewMode=0),this.optionsStore.currentCalendarViewMode=Math.max(this.optionsStore.minimumCalendarViewMode,this.optionsStore.currentCalendarViewMode),h[this.optionsStore.currentCalendarViewMode].name!==i.display.viewMode&&(this.optionsStore.currentCalendarViewMode=Math.max(h.findIndex((t=>t.name===i.display.viewMode)),this.optionsStore.minimumCalendarViewMode)),this.display?.isVisible&&this.display._update("all"),void 0===i.display.components.useTwentyfourHour&&(i.display.components.useTwentyfourHour=!i.viewDate.parts()?.dayPeriod),this.optionsStore.options=i}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{let t=this.optionsStore.element.dataset.tdTargetInput;this.optionsStore.input=null==t||"nearest"==t?this.optionsStore.element.querySelector("input"):this.optionsStore.element.querySelector(t)}this.optionsStore.input&&(this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&this.optionsStore.input.addEventListener("click",this._toggleClickEvent),this.optionsStore.input.value&&this._inputChangeEvent())}_initializeToggle(){if(this.optionsStore.options.display.inline)return;let t=this.optionsStore.element.dataset.tdTargetToggle;"nearest"==t&&(t='[data-td-toggle="datetimepicker"]'),this._toggle=null==t?this.optionsStore.element:this.optionsStore.element.querySelector(t),this._toggle.addEventListener("click",this._toggleClickEvent)}_handleAfterChangeEvent(t){!this.optionsStore.options.promptTimeOnDateChange||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||this.display.widget?.getElementsByClassName(d.css.show)[0].classList.contains(d.css.timeContainer)||!t.oldDate&&this.optionsStore.options.useCurrent||t.oldDate&&t.date?.isSame(t.oldDate)||(clearTimeout(this._currentPromptTimeTimeout),this._currentPromptTimeTimeout=setTimeout((()=>{this.display.widget&&this._eventEmitters.action.emit({e:{currentTarget:this.display.widget.querySelector(`.${d.css.switch} div`)},action:b.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const V={},H=t=>{V[t.name]||(V[t.name]=t.localization)},x=t=>{let e=V[t];e&&(g.localization=e)},P=function(t,e){return t?(t.installed||(t(e,{TempusDominus:O,Dates:S,Display:A,DateTime:o,ErrorMessages:n},N),t.installed=!0),N):N},I="6.1.3",N={TempusDominus:O,extend:P,loadLocale:H,locale:x,Namespace:d,DefaultOptions:g,DateTime:o,Unit:t,version:"6.1.3"};export{o as DateTime,g as DefaultOptions,d as Namespace,O as TempusDominus,t as Unit,P as extend,H as loadLocale,x as locale,I as version}; diff --git a/dist/js/tempus-dominus.js b/dist/js/tempus-dominus.js index 8d0334417..c735c19b9 100644 --- a/dist/js/tempus-dominus.js +++ b/dist/js/tempus-dominus.js @@ -1,3932 +1,3900 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.tempusDominus = {})); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.tempusDominus = {})); })(this, (function (exports) { 'use strict'; - /****************************************************************************** - Copyright (c) Microsoft Corporation. + exports.Unit = void 0; + (function (Unit) { + Unit["seconds"] = "seconds"; + Unit["minutes"] = "minutes"; + Unit["hours"] = "hours"; + Unit["date"] = "date"; + Unit["month"] = "month"; + Unit["year"] = "year"; + })(exports.Unit || (exports.Unit = {})); + const twoDigitTemplate = { + month: '2-digit', + day: '2-digit', + year: 'numeric', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: true, + }; + const twoDigitTwentyFourTemplate = { + hour: '2-digit', + hour12: false + }; + const getFormatByUnit = (unit) => { + switch (unit) { + case 'date': + return { dateStyle: 'short' }; + case 'month': + return { + month: 'numeric', + year: 'numeric' + }; + case 'year': + return { year: 'numeric' }; + } + }; + /** + * For the most part this object behaves exactly the same way + * as the native Date object with a little extra spice. + */ + class DateTime extends Date { + constructor() { + super(...arguments); + /** + * Used with Intl.DateTimeFormat + */ + this.locale = 'default'; + this.nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; + this.leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; + } + /** + * Chainable way to set the {@link locale} + * @param value + */ + setLocale(value) { + this.locale = value; + return this; + } + /** + * Converts a plain JS date object to a DateTime object. + * Doing this allows access to format, etc. + * @param date + * @param locale + */ + static convert(date, locale = 'default') { + if (!date) + throw new Error(`A date is required`); + return new DateTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).setLocale(locale); + } + /** + * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates. + * @param input + * @param localization + */ + static fromString(input, localization) { + return new DateTime(input); + } + /** + * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object. + */ + get clone() { + return new DateTime(this.year, this.month, this.date, this.hours, this.minutes, this.seconds, this.getMilliseconds()).setLocale(this.locale); + } + /** + * Sets the current date to the start of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month') + * would return April 1, 2021, 12:00:00.000 AM (midnight) + * @param unit + * @param startOfTheWeek Allows for the changing the start of the week. + */ + startOf(unit, startOfTheWeek = 0) { + if (this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + switch (unit) { + case 'seconds': + this.setMilliseconds(0); + break; + case 'minutes': + this.setSeconds(0, 0); + break; + case 'hours': + this.setMinutes(0, 0, 0); + break; + case 'date': + this.setHours(0, 0, 0, 0); + break; + case 'weekDay': + this.startOf(exports.Unit.date); + if (this.weekDay === startOfTheWeek) + break; + let goBack = this.weekDay; + if (startOfTheWeek !== 0 && this.weekDay === 0) + goBack = 8 - startOfTheWeek; + this.manipulate(startOfTheWeek - goBack, exports.Unit.date); + break; + case 'month': + this.startOf(exports.Unit.date); + this.setDate(1); + break; + case 'year': + this.startOf(exports.Unit.date); + this.setMonth(0, 1); + break; + } + return this; + } + /** + * Sets the current date to the end of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month') + * would return April 30, 2021, 11:59:59.999 PM + * @param unit + * @param startOfTheWeek + */ + endOf(unit, startOfTheWeek = 0) { + if (this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + switch (unit) { + case 'seconds': + this.setMilliseconds(999); + break; + case 'minutes': + this.setSeconds(59, 999); + break; + case 'hours': + this.setMinutes(59, 59, 999); + break; + case 'date': + this.setHours(23, 59, 59, 999); + break; + case 'weekDay': + this.endOf(exports.Unit.date); + this.manipulate((6 + startOfTheWeek) - this.weekDay, exports.Unit.date); + break; + case 'month': + this.endOf(exports.Unit.date); + this.manipulate(1, exports.Unit.month); + this.setDate(0); + break; + case 'year': + this.endOf(exports.Unit.date); + this.manipulate(1, exports.Unit.year); + this.setDate(0); + break; + } + return this; + } + /** + * Change a {@link unit} value. Value can be positive or negative + * 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') + * would return May 30, 2021, 11:45:32.984 AM + * @param value A positive or negative number + * @param unit + */ + manipulate(value, unit) { + if (this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + this[unit] += value; + return this; + } + /** + * Returns a string format. + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat + * for valid templates and locale objects + * @param template An object. Uses browser defaults otherwise. + * @param locale Can be a string or an array of strings. Uses browser defaults otherwise. + */ + format(template, locale = this.locale) { + return new Intl.DateTimeFormat(locale, template).format(this); + } + /** + * Return true if {@link compare} is before this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isBefore(compare, unit) { + if (!unit) + return this.valueOf() < compare.valueOf(); + if (this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + return (this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()); + } + /** + * Return true if {@link compare} is after this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isAfter(compare, unit) { + if (!unit) + return this.valueOf() > compare.valueOf(); + if (this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + return (this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()); + } + /** + * Return true if {@link compare} is same this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isSame(compare, unit) { + if (!unit) + return this.valueOf() === compare.valueOf(); + if (this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + compare = DateTime.convert(compare); + return (this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()); + } + /** + * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive. + * @param left + * @param right + * @param unit. + * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion. + * If the inclusivity parameter is used, both indicators must be passed. + */ + isBetween(left, right, unit, inclusivity = '()') { + if (unit && this[unit] === undefined) + throw new Error(`Unit '${unit}' is not valid`); + const leftInclusivity = inclusivity[0] === '('; + const rightInclusivity = inclusivity[1] === ')'; + return (((leftInclusivity + ? this.isAfter(left, unit) + : !this.isBefore(left, unit)) && + (rightInclusivity + ? this.isBefore(right, unit) + : !this.isAfter(right, unit))) || + ((leftInclusivity + ? this.isBefore(left, unit) + : !this.isAfter(left, unit)) && + (rightInclusivity + ? this.isAfter(right, unit) + : !this.isBefore(right, unit)))); + } + /** + * Returns flattened object of the date. Does not include literals + * @param locale + * @param template + */ + parts(locale = this.locale, template = { dateStyle: 'full', timeStyle: 'long' }) { + const parts = {}; + new Intl.DateTimeFormat(locale, template) + .formatToParts(this) + .filter((x) => x.type !== 'literal') + .forEach((x) => (parts[x.type] = x.value)); + return parts; + } + /** + * Shortcut to Date.getSeconds() + */ + get seconds() { + return this.getSeconds(); + } + /** + * Shortcut to Date.setSeconds() + */ + set seconds(value) { + this.setSeconds(value); + } + /** + * Returns two digit hours + */ + get secondsFormatted() { + return this.parts(undefined, twoDigitTemplate).second; + } + /** + * Shortcut to Date.getMinutes() + */ + get minutes() { + return this.getMinutes(); + } + /** + * Shortcut to Date.setMinutes() + */ + set minutes(value) { + this.setMinutes(value); + } + /** + * Returns two digit minutes + */ + get minutesFormatted() { + return this.parts(undefined, twoDigitTemplate).minute; + } + /** + * Shortcut to Date.getHours() + */ + get hours() { + return this.getHours(); + } + /** + * Shortcut to Date.setHours() + */ + set hours(value) { + this.setHours(value); + } + /** + * Returns two digit hours + */ + get hoursFormatted() { + return this.parts(undefined, twoDigitTwentyFourTemplate).hour; + } + /** + * Returns two digit hours but in twelve hour mode e.g. 13 -> 1 + */ + get twelveHoursFormatted() { + return this.parts(undefined, twoDigitTemplate).hour; + } + /** + * Get the meridiem of the date. E.g. AM or PM. + * If the {@link locale} provides a "dayPeriod" then this will be returned, + * otherwise it will return AM or PM. + * @param locale + */ + meridiem(locale = this.locale) { + return new Intl.DateTimeFormat(locale, { + hour: 'numeric', + hour12: true + }) + .formatToParts(this) + .find((p) => p.type === 'dayPeriod')?.value; + } + /** + * Shortcut to Date.getDate() + */ + get date() { + return this.getDate(); + } + /** + * Shortcut to Date.setDate() + */ + set date(value) { + this.setDate(value); + } + /** + * Return two digit date + */ + get dateFormatted() { + return this.parts(undefined, twoDigitTemplate).day; + } + /** + * Shortcut to Date.getDay() + */ + get weekDay() { + return this.getDay(); + } + /** + * Shortcut to Date.getMonth() + */ + get month() { + return this.getMonth(); + } + /** + * Shortcut to Date.setMonth() + */ + set month(value) { + const targetMonth = new Date(this.year, value + 1); + targetMonth.setDate(0); + const endOfMonth = targetMonth.getDate(); + if (this.date > endOfMonth) { + this.date = endOfMonth; + } + this.setMonth(value); + } + /** + * Return two digit, human expected month. E.g. January = 1, December = 12 + */ + get monthFormatted() { + return this.parts(undefined, twoDigitTemplate).month; + } + /** + * Shortcut to Date.getFullYear() + */ + get year() { + return this.getFullYear(); + } + /** + * Shortcut to Date.setFullYear() + */ + set year(value) { + this.setFullYear(value); + } + // borrowed a bunch of stuff from Luxon + /** + * Gets the week of the year + */ + get week() { + const ordinal = this.computeOrdinal(), weekday = this.getUTCDay(); + let weekNumber = Math.floor((ordinal - weekday + 10) / 7); + if (weekNumber < 1) { + weekNumber = this.weeksInWeekYear(this.year - 1); + } + else if (weekNumber > this.weeksInWeekYear(this.year)) { + weekNumber = 1; + } + return weekNumber; + } + weeksInWeekYear(weekYear) { + const p1 = (weekYear + + Math.floor(weekYear / 4) - + Math.floor(weekYear / 100) + + Math.floor(weekYear / 400)) % + 7, last = weekYear - 1, p2 = (last + + Math.floor(last / 4) - + Math.floor(last / 100) + + Math.floor(last / 400)) % + 7; + return p1 === 4 || p2 === 3 ? 53 : 52; + } + get isLeapYear() { + return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0); + } + computeOrdinal() { + return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month]; + } + } - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. + class TdError extends Error { + } + class ErrorMessages { + constructor() { + this.base = 'TD:'; + //#endregion + //#region used with notify.error + /** + * Used with an Error Event type if the user selects a date that + * fails restriction validation. + */ + this.failedToSetInvalidDate = 'Failed to set invalid date'; + /** + * Used with an Error Event type when a user changes the value of the + * input field directly, and does not provide a valid date. + */ + this.failedToParseInput = 'Failed parse input field'; + //#endregion + } + //#region out to console + /** + * Throws an error indicating that a key in the options object is invalid. + * @param optionName + */ + unexpectedOption(optionName) { + const error = new TdError(`${this.base} Unexpected option: ${optionName} does not match a known option.`); + error.code = 1; + throw error; + } + /** + * Throws an error indicating that one more keys in the options object is invalid. + * @param optionName + */ + unexpectedOptions(optionName) { + const error = new TdError(`${this.base}: ${optionName.join(', ')}`); + error.code = 1; + throw error; + } + /** + * Throws an error when an option is provide an unsupported value. + * For example a value of 'cheese' for toolbarPlacement which only supports + * 'top', 'bottom', 'default'. + * @param optionName + * @param badValue + * @param validOptions + */ + unexpectedOptionValue(optionName, badValue, validOptions) { + const error = new TdError(`${this.base} Unexpected option value: ${optionName} does not accept a value of "${badValue}". Valid values are: ${validOptions.join(', ')}`); + error.code = 2; + throw error; + } + /** + * Throws 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. + * @param optionName + * @param badType + * @param expectedType + */ + typeMismatch(optionName, badType, expectedType) { + const error = new TdError(`${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`); + error.code = 3; + throw error; + } + /** + * Throws an error when an option value is outside of the expected range. + * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6. + * @param optionName + * @param lower + * @param upper + */ + numbersOutOfRage(optionName, lower, upper) { + const error = new TdError(`${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`); + error.code = 4; + throw error; + } + /** + * Throws an error when a value for a date options couldn't be parsed. Either + * the option was an invalid string or an invalid Date object. + * @param optionName + * @param date + * @param soft If true, logs a warning instead of an error. + */ + failedToParseDate(optionName, date, soft = false) { + const error = new TdError(`${this.base} Could not correctly parse "${date}" to a date for ${optionName}.`); + error.code = 5; + if (!soft) + throw error; + console.warn(error); + } + /** + * Throws when an element to attach to was not provided in the constructor. + */ + mustProvideElement() { + const error = new TdError(`${this.base} No element was provided.`); + error.code = 6; + throw error; + } + /** + * Throws if providing an array for the events to subscribe method doesn't have + * the same number of callbacks. E.g., subscribe([1,2], [1]) + */ + subscribeMismatch() { + const error = new TdError(`${this.base} The subscribed events does not match the number of callbacks`); + error.code = 7; + throw error; + } + /** + * Throws if the configuration has conflicting rules e.g. minDate is after maxDate + */ + conflictingConfiguration(message) { + const error = new TdError(`${this.base} A configuration value conflicts with another rule. ${message}`); + error.code = 8; + throw error; + } + /** + * customDateFormat errors + */ + customDateFormatError(message) { + const error = new TdError(`${this.base} customDateFormat: ${message}`); + error.code = 9; + throw error; + } + /** + * Logs a warning if a date option value is provided as a string, instead of + * a date/datetime object. + */ + dateString() { + console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`); + } + throwError(message) { + const error = new TdError(`${this.base} ${message}`); + error.code = 9; + throw error; + } + } - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ + // this is not the way I want this to stay but nested classes seemed to blown up once its compiled. + const NAME = 'tempus-dominus', dataKey = 'td'; + /** + * Events + */ + class Events { + constructor() { + this.key = `.${dataKey}`; + /** + * Change event. Fired when the user selects a date. + * See also EventTypes.ChangeEvent + */ + this.change = `change${this.key}`; + /** + * Emit when the view changes for example from month view to the year view. + * See also EventTypes.ViewUpdateEvent + */ + this.update = `update${this.key}`; + /** + * Emits when a selected date or value from the input field fails to meet the provided validation rules. + * See also EventTypes.FailEvent + */ + this.error = `error${this.key}`; + /** + * Show event + * @event Events#show + */ + this.show = `show${this.key}`; + /** + * Hide event + * @event Events#hide + */ + this.hide = `hide${this.key}`; + // blur and focus are used in the jQuery provider but are otherwise unused. + // keyup/down will be used later for keybinding options + this.blur = `blur${this.key}`; + this.focus = `focus${this.key}`; + this.keyup = `keyup${this.key}`; + this.keydown = `keydown${this.key}`; + } + } + class Css { + constructor() { + /** + * The outer element for the widget. + */ + this.widget = `${NAME}-widget`; + /** + * Hold the previous, next and switcher divs + */ + this.calendarHeader = 'calendar-header'; + /** + * The element for the action to change the calendar view. E.g. month -> year. + */ + this.switch = 'picker-switch'; + /** + * The elements for all the toolbar options + */ + this.toolbar = 'toolbar'; + /** + * Disables the hover and rounding affect. + */ + this.noHighlight = 'no-highlight'; + /** + * Applied to the widget element when the side by side option is in use. + */ + this.sideBySide = 'timepicker-sbs'; + /** + * The element for the action to change the calendar view, e.g. August -> July + */ + this.previous = 'previous'; + /** + * The element for the action to change the calendar view, e.g. August -> September + */ + this.next = 'next'; + /** + * Applied to any action that would violate any restriction options. ALso applied + * to an input field if the disabled function is called. + */ + this.disabled = 'disabled'; + /** + * Applied to any date that is less than requested view, + * e.g. the last day of the previous month. + */ + this.old = 'old'; + /** + * Applied to any date that is greater than of requested view, + * e.g. the last day of the previous month. + */ + this.new = 'new'; + /** + * Applied to any date that is currently selected. + */ + this.active = 'active'; + //#region date element + /** + * The outer element for the calendar view. + */ + this.dateContainer = 'date-container'; + /** + * The outer element for the decades view. + */ + this.decadesContainer = `${this.dateContainer}-decades`; + /** + * Applied to elements within the decades container, e.g. 2020, 2030 + */ + this.decade = 'decade'; + /** + * The outer element for the years view. + */ + this.yearsContainer = `${this.dateContainer}-years`; + /** + * Applied to elements within the years container, e.g. 2021, 2021 + */ + this.year = 'year'; + /** + * The outer element for the month view. + */ + this.monthsContainer = `${this.dateContainer}-months`; + /** + * Applied to elements within the month container, e.g. January, February + */ + this.month = 'month'; + /** + * The outer element for the calendar view. + */ + this.daysContainer = `${this.dateContainer}-days`; + /** + * Applied to elements within the day container, e.g. 1, 2..31 + */ + this.day = 'day'; + /** + * If display.calendarWeeks is enabled, a column displaying the week of year + * is shown. This class is applied to each cell in that column. + */ + this.calendarWeeks = 'cw'; + /** + * Applied to the first row of the calendar view, e.g. Sunday, Monday + */ + this.dayOfTheWeek = 'dow'; + /** + * Applied to the current date on the calendar view. + */ + this.today = 'today'; + /** + * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday + */ + this.weekend = 'weekend'; + //#endregion + //#region time element + /** + * The outer element for all time related elements. + */ + this.timeContainer = 'time-container'; + /** + * Applied the separator columns between time elements, e.g. hour *:* minute *:* second + */ + this.separator = 'separator'; + /** + * The outer element for the clock view. + */ + this.clockContainer = `${this.timeContainer}-clock`; + /** + * The outer element for the hours selection view. + */ + this.hourContainer = `${this.timeContainer}-hour`; + /** + * The outer element for the minutes selection view. + */ + this.minuteContainer = `${this.timeContainer}-minute`; + /** + * The outer element for the seconds selection view. + */ + this.secondContainer = `${this.timeContainer}-second`; + /** + * Applied to each element in the hours selection view. + */ + this.hour = 'hour'; + /** + * Applied to each element in the minutes selection view. + */ + this.minute = 'minute'; + /** + * Applied to each element in the seconds selection view. + */ + this.second = 'second'; + /** + * Applied AM/PM toggle button. + */ + this.toggleMeridiem = 'toggleMeridiem'; + //#endregion + //#region collapse + /** + * Applied the element of the current view mode, e.g. calendar or clock. + */ + this.show = 'show'; + /** + * Applied to the currently showing view mode during a transition + * between calendar and clock views + */ + this.collapsing = 'td-collapsing'; + /** + * Applied to the currently hidden view mode. + */ + this.collapse = 'td-collapse'; + //#endregion + /** + * Applied to the widget when the option display.inline is enabled. + */ + this.inline = 'inline'; + /** + * Applied to the widget when the option display.theme is light. + */ + this.lightTheme = 'light'; + /** + * Applied to the widget when the option display.theme is dark. + */ + this.darkTheme = 'dark'; + /** + * Used for detecting if the system color preference is dark mode + */ + this.isDarkPreferredQuery = '(prefers-color-scheme: dark)'; + } + } + class Namespace { + } + Namespace.NAME = NAME; + // noinspection JSUnusedGlobalSymbols + Namespace.dataKey = dataKey; + Namespace.events = new Events(); + Namespace.css = new Css(); + Namespace.errorMessages = new ErrorMessages(); - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } + class ServiceLocator { + constructor() { + this.cache = new Map(); + } + locate(identifier) { + const service = this.cache.get(identifier); + if (service) + return service; + const value = new identifier(); + this.cache.set(identifier, value); + return value; + } + } + const setupServiceLocator = () => { + serviceLocator = new ServiceLocator(); + }; + let serviceLocator; - exports.Unit = void 0; - (function (Unit) { - Unit["seconds"] = "seconds"; - Unit["minutes"] = "minutes"; - Unit["hours"] = "hours"; - Unit["date"] = "date"; - Unit["month"] = "month"; - Unit["year"] = "year"; - })(exports.Unit || (exports.Unit = {})); - const twoDigitTemplate = { - month: '2-digit', - day: '2-digit', - year: 'numeric', - hour: '2-digit', - minute: '2-digit', - second: '2-digit', - hour12: true, - }; - const twoDigitTwentyFourTemplate = { - hour: '2-digit', - hour12: false - }; - const getFormatByUnit = (unit) => { - switch (unit) { - case 'date': - return { dateStyle: 'short' }; - case 'month': - return { - month: 'numeric', - year: 'numeric' - }; - case 'year': - return { year: 'numeric' }; - } - }; - /** - * For the most part this object behaves exactly the same way - * as the native Date object with a little extra spice. - */ - class DateTime extends Date { - constructor() { - super(...arguments); - /** - * Used with Intl.DateTimeFormat - */ - this.locale = 'default'; - this.nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; - this.leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; - } - /** - * Chainable way to set the {@link locale} - * @param value - */ - setLocale(value) { - this.locale = value; - return this; - } - /** - * Converts a plain JS date object to a DateTime object. - * Doing this allows access to format, etc. - * @param date - * @param locale - */ - static convert(date, locale = 'default') { - if (!date) - throw new Error(`A date is required`); - return new DateTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).setLocale(locale); - } - /** - * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates. - * @param input - * @param localization - */ - static fromString(input, localization) { - return new DateTime(input); - } - /** - * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object. - */ - get clone() { - return new DateTime(this.year, this.month, this.date, this.hours, this.minutes, this.seconds, this.getMilliseconds()).setLocale(this.locale); - } - /** - * Sets the current date to the start of the {@link unit} provided - * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month') - * would return April 1, 2021, 12:00:00.000 AM (midnight) - * @param unit - * @param startOfTheWeek Allows for the changing the start of the week. - */ - startOf(unit, startOfTheWeek = 0) { - if (this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - switch (unit) { - case 'seconds': - this.setMilliseconds(0); - break; - case 'minutes': - this.setSeconds(0, 0); - break; - case 'hours': - this.setMinutes(0, 0, 0); - break; - case 'date': - this.setHours(0, 0, 0, 0); - break; - case 'weekDay': - this.startOf(exports.Unit.date); - if (this.weekDay === startOfTheWeek) - break; - let goBack = this.weekDay; - if (startOfTheWeek !== 0 && this.weekDay === 0) - goBack = 8 - startOfTheWeek; - this.manipulate(startOfTheWeek - goBack, exports.Unit.date); - break; - case 'month': - this.startOf(exports.Unit.date); - this.setDate(1); - break; - case 'year': - this.startOf(exports.Unit.date); - this.setMonth(0, 1); - break; - } - return this; - } - /** - * Sets the current date to the end of the {@link unit} provided - * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month') - * would return April 30, 2021, 11:59:59.999 PM - * @param unit - * @param startOfTheWeek - */ - endOf(unit, startOfTheWeek = 0) { - if (this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - switch (unit) { - case 'seconds': - this.setMilliseconds(999); - break; - case 'minutes': - this.setSeconds(59, 999); - break; - case 'hours': - this.setMinutes(59, 59, 999); - break; - case 'date': - this.setHours(23, 59, 59, 999); - break; - case 'weekDay': - this.endOf(exports.Unit.date); - this.manipulate((6 + startOfTheWeek) - this.weekDay, exports.Unit.date); - break; - case 'month': - this.endOf(exports.Unit.date); - this.manipulate(1, exports.Unit.month); - this.setDate(0); - break; - case 'year': - this.endOf(exports.Unit.date); - this.manipulate(1, exports.Unit.year); - this.setDate(0); - break; - } - return this; - } - /** - * Change a {@link unit} value. Value can be positive or negative - * 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') - * would return May 30, 2021, 11:45:32.984 AM - * @param value A positive or negative number - * @param unit - */ - manipulate(value, unit) { - if (this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - this[unit] += value; - return this; - } - /** - * Returns a string format. - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat - * for valid templates and locale objects - * @param template An object. Uses browser defaults otherwise. - * @param locale Can be a string or an array of strings. Uses browser defaults otherwise. - */ - format(template, locale = this.locale) { - return new Intl.DateTimeFormat(locale, template).format(this); - } - /** - * Return true if {@link compare} is before this date - * @param compare The Date/DateTime to compare - * @param unit If provided, uses {@link startOf} for - * comparision. - */ - isBefore(compare, unit) { - if (!unit) - return this.valueOf() < compare.valueOf(); - if (this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - return (this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()); - } - /** - * Return true if {@link compare} is after this date - * @param compare The Date/DateTime to compare - * @param unit If provided, uses {@link startOf} for - * comparision. - */ - isAfter(compare, unit) { - if (!unit) - return this.valueOf() > compare.valueOf(); - if (this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - return (this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()); - } - /** - * Return true if {@link compare} is same this date - * @param compare The Date/DateTime to compare - * @param unit If provided, uses {@link startOf} for - * comparision. - */ - isSame(compare, unit) { - if (!unit) - return this.valueOf() === compare.valueOf(); - if (this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - compare = DateTime.convert(compare); - return (this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()); - } - /** - * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive. - * @param left - * @param right - * @param unit. - * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion. - * If the inclusivity parameter is used, both indicators must be passed. - */ - isBetween(left, right, unit, inclusivity = '()') { - if (unit && this[unit] === undefined) - throw new Error(`Unit '${unit}' is not valid`); - const leftInclusivity = inclusivity[0] === '('; - const rightInclusivity = inclusivity[1] === ')'; - return (((leftInclusivity - ? this.isAfter(left, unit) - : !this.isBefore(left, unit)) && - (rightInclusivity - ? this.isBefore(right, unit) - : !this.isAfter(right, unit))) || - ((leftInclusivity - ? this.isBefore(left, unit) - : !this.isAfter(left, unit)) && - (rightInclusivity - ? this.isAfter(right, unit) - : !this.isBefore(right, unit)))); - } - /** - * Returns flattened object of the date. Does not include literals - * @param locale - * @param template - */ - parts(locale = this.locale, template = { dateStyle: 'full', timeStyle: 'long' }) { - const parts = {}; - new Intl.DateTimeFormat(locale, template) - .formatToParts(this) - .filter((x) => x.type !== 'literal') - .forEach((x) => (parts[x.type] = x.value)); - return parts; - } - /** - * Shortcut to Date.getSeconds() - */ - get seconds() { - return this.getSeconds(); - } - /** - * Shortcut to Date.setSeconds() - */ - set seconds(value) { - this.setSeconds(value); - } - /** - * Returns two digit hours - */ - get secondsFormatted() { - return this.parts(undefined, twoDigitTemplate).second; - } - /** - * Shortcut to Date.getMinutes() - */ - get minutes() { - return this.getMinutes(); - } - /** - * Shortcut to Date.setMinutes() - */ - set minutes(value) { - this.setMinutes(value); - } - /** - * Returns two digit minutes - */ - get minutesFormatted() { - return this.parts(undefined, twoDigitTemplate).minute; - } - /** - * Shortcut to Date.getHours() - */ - get hours() { - return this.getHours(); - } - /** - * Shortcut to Date.setHours() - */ - set hours(value) { - this.setHours(value); - } - /** - * Returns two digit hours - */ - get hoursFormatted() { - return this.parts(undefined, twoDigitTwentyFourTemplate).hour; - } - /** - * Returns two digit hours but in twelve hour mode e.g. 13 -> 1 - */ - get twelveHoursFormatted() { - return this.parts(undefined, twoDigitTemplate).hour; - } - /** - * Get the meridiem of the date. E.g. AM or PM. - * If the {@link locale} provides a "dayPeriod" then this will be returned, - * otherwise it will return AM or PM. - * @param locale - */ - meridiem(locale = this.locale) { - var _a; - return (_a = new Intl.DateTimeFormat(locale, { - hour: 'numeric', - hour12: true - }) - .formatToParts(this) - .find((p) => p.type === 'dayPeriod')) === null || _a === void 0 ? void 0 : _a.value; - } - /** - * Shortcut to Date.getDate() - */ - get date() { - return this.getDate(); - } - /** - * Shortcut to Date.setDate() - */ - set date(value) { - this.setDate(value); - } - /** - * Return two digit date - */ - get dateFormatted() { - return this.parts(undefined, twoDigitTemplate).day; - } - /** - * Shortcut to Date.getDay() - */ - get weekDay() { - return this.getDay(); - } - /** - * Shortcut to Date.getMonth() - */ - get month() { - return this.getMonth(); - } - /** - * Shortcut to Date.setMonth() - */ - set month(value) { - const targetMonth = new Date(this.year, value + 1); - targetMonth.setDate(0); - const endOfMonth = targetMonth.getDate(); - if (this.date > endOfMonth) { - this.date = endOfMonth; - } - this.setMonth(value); - } - /** - * Return two digit, human expected month. E.g. January = 1, December = 12 - */ - get monthFormatted() { - return this.parts(undefined, twoDigitTemplate).month; - } - /** - * Shortcut to Date.getFullYear() - */ - get year() { - return this.getFullYear(); - } - /** - * Shortcut to Date.setFullYear() - */ - set year(value) { - this.setFullYear(value); - } - // borrowed a bunch of stuff from Luxon - /** - * Gets the week of the year - */ - get week() { - const ordinal = this.computeOrdinal(), weekday = this.getUTCDay(); - let weekNumber = Math.floor((ordinal - weekday + 10) / 7); - if (weekNumber < 1) { - weekNumber = this.weeksInWeekYear(this.year - 1); - } - else if (weekNumber > this.weeksInWeekYear(this.year)) { - weekNumber = 1; - } - return weekNumber; - } - weeksInWeekYear(weekYear) { - const p1 = (weekYear + - Math.floor(weekYear / 4) - - Math.floor(weekYear / 100) + - Math.floor(weekYear / 400)) % - 7, last = weekYear - 1, p2 = (last + - Math.floor(last / 4) - - Math.floor(last / 100) + - Math.floor(last / 400)) % - 7; - return p1 === 4 || p2 === 3 ? 53 : 52; - } - get isLeapYear() { - return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0); - } - computeOrdinal() { - return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month]; - } - } + const CalendarModes = [ + { + name: 'calendar', + className: Namespace.css.daysContainer, + unit: exports.Unit.month, + step: 1, + }, + { + name: 'months', + className: Namespace.css.monthsContainer, + unit: exports.Unit.year, + step: 1, + }, + { + name: 'years', + className: Namespace.css.yearsContainer, + unit: exports.Unit.year, + step: 10, + }, + { + name: 'decades', + className: Namespace.css.decadesContainer, + unit: exports.Unit.year, + step: 100, + }, + ]; - class TdError extends Error { - } - class ErrorMessages { - constructor() { - this.base = 'TD:'; - //#endregion - //#region used with notify.error - /** - * Used with an Error Event type if the user selects a date that - * fails restriction validation. - */ - this.failedToSetInvalidDate = 'Failed to set invalid date'; - /** - * Used with an Error Event type when a user changes the value of the - * input field directly, and does not provide a valid date. - */ - this.failedToParseInput = 'Failed parse input field'; - //#endregion - } - //#region out to console - /** - * Throws an error indicating that a key in the options object is invalid. - * @param optionName - */ - unexpectedOption(optionName) { - const error = new TdError(`${this.base} Unexpected option: ${optionName} does not match a known option.`); - error.code = 1; - throw error; - } - /** - * Throws an error indicating that one more keys in the options object is invalid. - * @param optionName - */ - unexpectedOptions(optionName) { - const error = new TdError(`${this.base}: ${optionName.join(', ')}`); - error.code = 1; - throw error; - } - /** - * Throws an error when an option is provide an unsupported value. - * For example a value of 'cheese' for toolbarPlacement which only supports - * 'top', 'bottom', 'default'. - * @param optionName - * @param badValue - * @param validOptions - */ - unexpectedOptionValue(optionName, badValue, validOptions) { - const error = new TdError(`${this.base} Unexpected option value: ${optionName} does not accept a value of "${badValue}". Valid values are: ${validOptions.join(', ')}`); - error.code = 2; - throw error; - } - /** - * Throws 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. - * @param optionName - * @param badType - * @param expectedType - */ - typeMismatch(optionName, badType, expectedType) { - const error = new TdError(`${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`); - error.code = 3; - throw error; - } - /** - * Throws an error when an option value is outside of the expected range. - * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6. - * @param optionName - * @param lower - * @param upper - */ - numbersOutOfRage(optionName, lower, upper) { - const error = new TdError(`${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`); - error.code = 4; - throw error; - } - /** - * Throws an error when a value for a date options couldn't be parsed. Either - * the option was an invalid string or an invalid Date object. - * @param optionName - * @param date - * @param soft If true, logs a warning instead of an error. - */ - failedToParseDate(optionName, date, soft = false) { - const error = new TdError(`${this.base} Could not correctly parse "${date}" to a date for ${optionName}.`); - error.code = 5; - if (!soft) - throw error; - console.warn(error); - } - /** - * Throws when an element to attach to was not provided in the constructor. - */ - mustProvideElement() { - const error = new TdError(`${this.base} No element was provided.`); - error.code = 6; - throw error; - } - /** - * Throws if providing an array for the events to subscribe method doesn't have - * the same number of callbacks. E.g., subscribe([1,2], [1]) - */ - subscribeMismatch() { - const error = new TdError(`${this.base} The subscribed events does not match the number of callbacks`); - error.code = 7; - throw error; - } - /** - * Throws if the configuration has conflicting rules e.g. minDate is after maxDate - */ - conflictingConfiguration(message) { - const error = new TdError(`${this.base} A configuration value conflicts with another rule. ${message}`); - error.code = 8; - throw error; - } - /** - * customDateFormat errors - */ - customDateFormatError(message) { - const error = new TdError(`${this.base} customDateFormat: ${message}`); - error.code = 9; - throw error; - } - /** - * Logs a warning if a date option value is provided as a string, instead of - * a date/datetime object. - */ - dateString() { - console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`); - } - throwError(message) { - const error = new TdError(`${this.base} ${message}`); - error.code = 9; - throw error; - } - } + class OptionsStore { + constructor() { + this.viewDate = new DateTime(); + this._currentCalendarViewMode = 0; + this.minimumCalendarViewMode = 0; + this.currentView = 'calendar'; + } + get currentCalendarViewMode() { + return this._currentCalendarViewMode; + } + set currentCalendarViewMode(value) { + this._currentCalendarViewMode = value; + this.currentView = CalendarModes[value].name; + } + /** + * When switching back to the calendar from the clock, + * this sets currentView to the correct calendar view. + */ + refreshCurrentView() { + this.currentView = CalendarModes[this.currentCalendarViewMode].name; + } + } - // this is not the way I want this to stay but nested classes seemed to blown up once its compiled. - const NAME = 'tempus-dominus', dataKey = 'td'; - /** - * Events - */ - class Events { - constructor() { - this.key = `.${dataKey}`; - /** - * Change event. Fired when the user selects a date. - * See also EventTypes.ChangeEvent - */ - this.change = `change${this.key}`; - /** - * Emit when the view changes for example from month view to the year view. - * See also EventTypes.ViewUpdateEvent - */ - this.update = `update${this.key}`; - /** - * Emits when a selected date or value from the input field fails to meet the provided validation rules. - * See also EventTypes.FailEvent - */ - this.error = `error${this.key}`; - /** - * Show event - * @event Events#show - */ - this.show = `show${this.key}`; - /** - * Hide event - * @event Events#hide - */ - this.hide = `hide${this.key}`; - // blur and focus are used in the jQuery provider but are otherwise unused. - // keyup/down will be used later for keybinding options - this.blur = `blur${this.key}`; - this.focus = `focus${this.key}`; - this.keyup = `keyup${this.key}`; - this.keydown = `keydown${this.key}`; - } - } - class Css { - constructor() { - /** - * The outer element for the widget. - */ - this.widget = `${NAME}-widget`; - /** - * Hold the previous, next and switcher divs - */ - this.calendarHeader = 'calendar-header'; - /** - * The element for the action to change the calendar view. E.g. month -> year. - */ - this.switch = 'picker-switch'; - /** - * The elements for all the toolbar options - */ - this.toolbar = 'toolbar'; - /** - * Disables the hover and rounding affect. - */ - this.noHighlight = 'no-highlight'; - /** - * Applied to the widget element when the side by side option is in use. - */ - this.sideBySide = 'timepicker-sbs'; - /** - * The element for the action to change the calendar view, e.g. August -> July - */ - this.previous = 'previous'; - /** - * The element for the action to change the calendar view, e.g. August -> September - */ - this.next = 'next'; - /** - * Applied to any action that would violate any restriction options. ALso applied - * to an input field if the disabled function is called. - */ - this.disabled = 'disabled'; - /** - * Applied to any date that is less than requested view, - * e.g. the last day of the previous month. - */ - this.old = 'old'; - /** - * Applied to any date that is greater than of requested view, - * e.g. the last day of the previous month. - */ - this.new = 'new'; - /** - * Applied to any date that is currently selected. - */ - this.active = 'active'; - //#region date element - /** - * The outer element for the calendar view. - */ - this.dateContainer = 'date-container'; - /** - * The outer element for the decades view. - */ - this.decadesContainer = `${this.dateContainer}-decades`; - /** - * Applied to elements within the decades container, e.g. 2020, 2030 - */ - this.decade = 'decade'; - /** - * The outer element for the years view. - */ - this.yearsContainer = `${this.dateContainer}-years`; - /** - * Applied to elements within the years container, e.g. 2021, 2021 - */ - this.year = 'year'; - /** - * The outer element for the month view. - */ - this.monthsContainer = `${this.dateContainer}-months`; - /** - * Applied to elements within the month container, e.g. January, February - */ - this.month = 'month'; - /** - * The outer element for the calendar view. - */ - this.daysContainer = `${this.dateContainer}-days`; - /** - * Applied to elements within the day container, e.g. 1, 2..31 - */ - this.day = 'day'; - /** - * If display.calendarWeeks is enabled, a column displaying the week of year - * is shown. This class is applied to each cell in that column. - */ - this.calendarWeeks = 'cw'; - /** - * Applied to the first row of the calendar view, e.g. Sunday, Monday - */ - this.dayOfTheWeek = 'dow'; - /** - * Applied to the current date on the calendar view. - */ - this.today = 'today'; - /** - * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday - */ - this.weekend = 'weekend'; - //#endregion - //#region time element - /** - * The outer element for all time related elements. - */ - this.timeContainer = 'time-container'; - /** - * Applied the separator columns between time elements, e.g. hour *:* minute *:* second - */ - this.separator = 'separator'; - /** - * The outer element for the clock view. - */ - this.clockContainer = `${this.timeContainer}-clock`; - /** - * The outer element for the hours selection view. - */ - this.hourContainer = `${this.timeContainer}-hour`; - /** - * The outer element for the minutes selection view. - */ - this.minuteContainer = `${this.timeContainer}-minute`; - /** - * The outer element for the seconds selection view. - */ - this.secondContainer = `${this.timeContainer}-second`; - /** - * Applied to each element in the hours selection view. - */ - this.hour = 'hour'; - /** - * Applied to each element in the minutes selection view. - */ - this.minute = 'minute'; - /** - * Applied to each element in the seconds selection view. - */ - this.second = 'second'; - /** - * Applied AM/PM toggle button. - */ - this.toggleMeridiem = 'toggleMeridiem'; - //#endregion - //#region collapse - /** - * Applied the element of the current view mode, e.g. calendar or clock. - */ - this.show = 'show'; - /** - * Applied to the currently showing view mode during a transition - * between calendar and clock views - */ - this.collapsing = 'td-collapsing'; - /** - * Applied to the currently hidden view mode. - */ - this.collapse = 'td-collapse'; - //#endregion - /** - * Applied to the widget when the option display.inline is enabled. - */ - this.inline = 'inline'; - /** - * Applied to the widget when the option display.theme is light. - */ - this.lightTheme = 'light'; - /** - * Applied to the widget when the option display.theme is dark. - */ - this.darkTheme = 'dark'; - /** - * Used for detecting if the system color preference is dark mode - */ - this.isDarkPreferredQuery = '(prefers-color-scheme: dark)'; - } - } - class Namespace { - } - Namespace.NAME = NAME; - // noinspection JSUnusedGlobalSymbols - Namespace.dataKey = dataKey; - Namespace.events = new Events(); - Namespace.css = new Css(); - Namespace.errorMessages = new ErrorMessages(); + /** + * Main class for date validation rules based on the options provided. + */ + class Validation { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + } + /** + * Checks to see if the target date is valid based on the rules provided in the options. + * Granularity can be provided to check portions of the date instead of the whole. + * @param targetDate + * @param granularity + */ + isValid(targetDate, granularity) { + if (this.optionsStore.options.restrictions.disabledDates.length > 0 && + this._isInDisabledDates(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.enabledDates.length > 0 && + !this._isInEnabledDates(targetDate)) { + return false; + } + if (granularity !== exports.Unit.month && + granularity !== exports.Unit.year && + this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 && + this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { + return false; + } + if (this.optionsStore.options.restrictions.minDate && + targetDate.isBefore(this.optionsStore.options.restrictions.minDate, granularity)) { + return false; + } + if (this.optionsStore.options.restrictions.maxDate && + targetDate.isAfter(this.optionsStore.options.restrictions.maxDate, granularity)) { + return false; + } + if (granularity === exports.Unit.hours || + granularity === exports.Unit.minutes || + granularity === exports.Unit.seconds) { + if (this.optionsStore.options.restrictions.disabledHours.length > 0 && + this._isInDisabledHours(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.enabledHours.length > 0 && + !this._isInEnabledHours(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0) { + for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) { + if (targetDate.isBetween(disabledTimeIntervals.from, disabledTimeIntervals.to)) + return false; + } + } + } + return true; + } + /** + * Checks to see if the disabledDates option is in use and returns true (meaning invalid) + * if the `testDate` is with in the array. Granularity is by date. + * @param testDate + * @private + */ + _isInDisabledDates(testDate) { + if (!this.optionsStore.options.restrictions.disabledDates || + this.optionsStore.options.restrictions.disabledDates.length === 0) + return false; + const formattedDate = testDate.format(getFormatByUnit(exports.Unit.date)); + return this.optionsStore.options.restrictions.disabledDates + .map((x) => x.format(getFormatByUnit(exports.Unit.date))) + .find((x) => x === formattedDate); + } + /** + * Checks to see if the enabledDates option is in use and returns true (meaning valid) + * if the `testDate` is with in the array. Granularity is by date. + * @param testDate + * @private + */ + _isInEnabledDates(testDate) { + if (!this.optionsStore.options.restrictions.enabledDates || + this.optionsStore.options.restrictions.enabledDates.length === 0) + return true; + const formattedDate = testDate.format(getFormatByUnit(exports.Unit.date)); + return this.optionsStore.options.restrictions.enabledDates + .map((x) => x.format(getFormatByUnit(exports.Unit.date))) + .find((x) => x === formattedDate); + } + /** + * Checks to see if the disabledHours option is in use and returns true (meaning invalid) + * if the `testDate` is with in the array. Granularity is by hours. + * @param testDate + * @private + */ + _isInDisabledHours(testDate) { + if (!this.optionsStore.options.restrictions.disabledHours || + this.optionsStore.options.restrictions.disabledHours.length === 0) + return false; + const formattedDate = testDate.hours; + return this.optionsStore.options.restrictions.disabledHours.find((x) => x === formattedDate); + } + /** + * Checks to see if the enabledHours option is in use and returns true (meaning valid) + * if the `testDate` is with in the array. Granularity is by hours. + * @param testDate + * @private + */ + _isInEnabledHours(testDate) { + if (!this.optionsStore.options.restrictions.enabledHours || + this.optionsStore.options.restrictions.enabledHours.length === 0) + return true; + const formattedDate = testDate.hours; + return this.optionsStore.options.restrictions.enabledHours.find((x) => x === formattedDate); + } + } - class ServiceLocator { - constructor() { - this.cache = new Map(); - } - locate(identifier) { - const service = this.cache.get(identifier); - if (service) - return service; - const value = new identifier(); - this.cache.set(identifier, value); - return value; - } - } - const setupServiceLocator = () => { - serviceLocator = new ServiceLocator(); - }; - let serviceLocator; + class EventEmitter { + constructor() { + this.subscribers = []; + } + subscribe(callback) { + this.subscribers.push(callback); + return this.unsubscribe.bind(this, this.subscribers.length - 1); + } + unsubscribe(index) { + this.subscribers.splice(index, 1); + } + emit(value) { + this.subscribers.forEach((callback) => { + callback(value); + }); + } + destroy() { + this.subscribers = null; + this.subscribers = []; + } + } + class EventEmitters { + constructor() { + this.triggerEvent = new EventEmitter(); + this.viewUpdate = new EventEmitter(); + this.updateDisplay = new EventEmitter(); + this.action = new EventEmitter(); + } + destroy() { + this.triggerEvent.destroy(); + this.viewUpdate.destroy(); + this.updateDisplay.destroy(); + this.action.destroy(); + } + } - const CalendarModes = [ - { - name: 'calendar', - className: Namespace.css.daysContainer, - unit: exports.Unit.month, - step: 1, - }, - { - name: 'months', - className: Namespace.css.monthsContainer, - unit: exports.Unit.year, - step: 1, - }, - { - name: 'years', - className: Namespace.css.yearsContainer, - unit: exports.Unit.year, - step: 10, - }, - { - name: 'decades', - className: Namespace.css.decadesContainer, - unit: exports.Unit.year, - step: 100, - }, - ]; + const DefaultOptions = { + restrictions: { + minDate: undefined, + maxDate: undefined, + disabledDates: [], + enabledDates: [], + daysOfWeekDisabled: [], + disabledTimeIntervals: [], + disabledHours: [], + enabledHours: [] + }, + display: { + icons: { + type: 'icons', + time: 'fa-solid fa-clock', + date: 'fa-solid fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-check', + clear: 'fa-solid fa-trash', + close: 'fa-solid fa-xmark' + }, + sideBySide: false, + calendarWeeks: false, + viewMode: 'calendar', + toolbarPlacement: 'bottom', + keepOpen: false, + buttons: { + today: false, + clear: false, + close: false + }, + components: { + calendar: true, + date: true, + month: true, + year: true, + decades: true, + clock: true, + hours: true, + minutes: true, + seconds: false, + useTwentyfourHour: undefined + }, + inline: false, + theme: 'auto' + }, + stepping: 1, + useCurrent: true, + defaultDate: undefined, + localization: { + today: 'Go to today', + clear: 'Clear selection', + close: 'Close the picker', + selectMonth: 'Select Month', + previousMonth: 'Previous Month', + nextMonth: 'Next Month', + selectYear: 'Select Year', + previousYear: 'Previous Year', + nextYear: 'Next Year', + selectDecade: 'Select Decade', + previousDecade: 'Previous Decade', + nextDecade: 'Next Decade', + previousCentury: 'Previous Century', + nextCentury: 'Next Century', + pickHour: 'Pick Hour', + incrementHour: 'Increment Hour', + decrementHour: 'Decrement Hour', + pickMinute: 'Pick Minute', + incrementMinute: 'Increment Minute', + decrementMinute: 'Decrement Minute', + pickSecond: 'Pick Second', + incrementSecond: 'Increment Second', + decrementSecond: 'Decrement Second', + toggleMeridiem: 'Toggle Meridiem', + selectTime: 'Select Time', + selectDate: 'Select Date', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'default', + startOfTheWeek: 0, + /** + * This is only used with the customDateFormat plugin + */ + dateFormats: { + LTS: 'h:mm:ss T', + LT: 'h:mm T', + L: 'MM/dd/yyyy', + LL: 'MMMM d, yyyy', + LLL: 'MMMM d, yyyy h:mm T', + LLLL: 'dddd, MMMM d, yyyy h:mm T', + }, + /** + * This is only used with the customDateFormat plugin + */ + ordinal: (n) => n, + /** + * This is only used with the customDateFormat plugin + */ + format: 'L' + }, + keepInvalid: false, + debug: false, + allowInputToggle: false, + viewDate: new DateTime(), + multipleDates: false, + multipleDatesSeparator: '; ', + promptTimeOnDateChange: false, + promptTimeOnDateChangeTransitionDelay: 200, + meta: {}, + container: undefined + }; - class OptionsStore { - constructor() { - this.viewDate = new DateTime(); - this._currentCalendarViewMode = 0; - this.minimumCalendarViewMode = 0; - this.currentView = 'calendar'; - } - get currentCalendarViewMode() { - return this._currentCalendarViewMode; - } - set currentCalendarViewMode(value) { - this._currentCalendarViewMode = value; - this.currentView = CalendarModes[value].name; - } - /** - * When switching back to the calendar from the clock, - * this sets currentView to the correct calendar view. - */ - refreshCurrentView() { - this.currentView = CalendarModes[this.currentCalendarViewMode].name; - } - } + class OptionConverter { + static deepCopy(input) { + const o = {}; + Object.keys(input).forEach((key) => { + const inputElement = input[key]; + o[key] = inputElement; + if (typeof inputElement !== 'object' || + inputElement instanceof HTMLElement || + inputElement instanceof Element || + inputElement instanceof Date) + return; + if (!Array.isArray(inputElement)) { + o[key] = OptionConverter.deepCopy(inputElement); + } + }); + return o; + } + /** + * Finds value out of an object based on a string, period delimited, path + * @param paths + * @param obj + */ + static objectPath(paths, obj) { + if (paths.charAt(0) === '.') + paths = paths.slice(1); + if (!paths) + return obj; + return paths.split('.') + .reduce((value, key) => (OptionConverter.isValue(value) || OptionConverter.isValue(value[key]) ? + value[key] : + undefined), obj); + } + /** + * The spread operator caused sub keys to be missing after merging. + * This is to fix that issue by using spread on the child objects first. + * Also handles complex options like disabledDates + * @param provided An option from new providedOptions + * @param copyTo Destination object. This was added to prevent reference copies + * @param path + * @param localization + */ + static spread(provided, copyTo, path = '', localization) { + const defaultOptions = OptionConverter.objectPath(path, DefaultOptions); + const unsupportedOptions = Object.keys(provided).filter((x) => !Object.keys(defaultOptions).includes(x)); + if (unsupportedOptions.length > 0) { + const flattenedOptions = OptionConverter.getFlattenDefaultOptions(); + const errors = unsupportedOptions.map((x) => { + let error = `"${path}.${x}" in not a known option.`; + let didYouMean = flattenedOptions.find((y) => y.includes(x)); + if (didYouMean) + error += ` Did you mean "${didYouMean}"?`; + return error; + }); + Namespace.errorMessages.unexpectedOptions(errors); + } + Object.keys(provided).filter(key => key !== '__proto__' && key !== 'constructor').forEach((key) => { + path += `.${key}`; + if (path.charAt(0) === '.') + path = path.slice(1); + const defaultOptionValue = defaultOptions[key]; + let providedType = typeof provided[key]; + let defaultType = typeof defaultOptionValue; + let value = provided[key]; + if (value === undefined || value === null) { + copyTo[key] = value; + path = path.substring(0, path.lastIndexOf(`.${key}`)); + return; + } + if (typeof defaultOptionValue === 'object' && + !Array.isArray(provided[key]) && + !(defaultOptionValue instanceof Date || OptionConverter.ignoreProperties.includes(key))) { + OptionConverter.spread(provided[key], copyTo[key], path, localization); + } + else { + copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization); + } + path = path.substring(0, path.lastIndexOf(`.${key}`)); + }); + } + static processKey(key, value, providedType, defaultType, path, localization) { + switch (key) { + case 'defaultDate': { + const dateTime = this.dateConversion(value, 'defaultDate', localization); + if (dateTime !== undefined) { + dateTime.setLocale(localization.locale); + return dateTime; + } + Namespace.errorMessages.typeMismatch('defaultDate', providedType, 'DateTime or Date'); + break; + } + case 'viewDate': { + const dateTime = this.dateConversion(value, 'viewDate', localization); + if (dateTime !== undefined) { + dateTime.setLocale(localization.locale); + return dateTime; + } + Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); + break; + } + case 'minDate': { + if (value === undefined) { + return value; + } + const dateTime = this.dateConversion(value, 'restrictions.minDate', localization); + if (dateTime !== undefined) { + dateTime.setLocale(localization.locale); + return dateTime; + } + Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); + break; + } + case 'maxDate': { + if (value === undefined) { + return value; + } + const dateTime = this.dateConversion(value, 'restrictions.maxDate', localization); + if (dateTime !== undefined) { + dateTime.setLocale(localization.locale); + return dateTime; + } + Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + break; + } + case 'disabledHours': + if (value === undefined) { + return []; + } + this._typeCheckNumberArray('restrictions.disabledHours', value, providedType); + if (value.filter((x) => x < 0 || x > 24).length > 0) + Namespace.errorMessages.numbersOutOfRage('restrictions.disabledHours', 0, 23); + return value; + case 'enabledHours': + if (value === undefined) { + return []; + } + this._typeCheckNumberArray('restrictions.enabledHours', value, providedType); + if (value.filter((x) => x < 0 || x > 24).length > 0) + Namespace.errorMessages.numbersOutOfRage('restrictions.enabledHours', 0, 23); + return value; + case 'daysOfWeekDisabled': + if (value === undefined) { + return []; + } + this._typeCheckNumberArray('restrictions.daysOfWeekDisabled', value, providedType); + if (value.filter((x) => x < 0 || x > 6).length > 0) + Namespace.errorMessages.numbersOutOfRage('restrictions.daysOfWeekDisabled', 0, 6); + return value; + case 'enabledDates': + if (value === undefined) { + return []; + } + this._typeCheckDateArray('restrictions.enabledDates', value, providedType, localization); + return value; + case 'disabledDates': + if (value === undefined) { + return []; + } + this._typeCheckDateArray('restrictions.disabledDates', value, providedType, localization); + return value; + case 'disabledTimeIntervals': + if (value === undefined) { + return []; + } + if (!Array.isArray(value)) { + Namespace.errorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }'); + } + const valueObject = value; + for (let i = 0; i < valueObject.length; i++) { + Object.keys(valueObject[i]).forEach((vk) => { + const subOptionName = `${key}[${i}].${vk}`; + let d = valueObject[i][vk]; + const dateTime = this.dateConversion(d, subOptionName, localization); + if (!dateTime) { + Namespace.errorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); + } + dateTime.setLocale(localization.locale); + valueObject[i][vk] = dateTime; + }); + } + return valueObject; + case 'toolbarPlacement': + case 'type': + case 'viewMode': + case 'theme': + const optionValues = { + toolbarPlacement: ['top', 'bottom', 'default'], + type: ['icons', 'sprites'], + viewMode: ['clock', 'calendar', 'months', 'years', 'decades'], + theme: ['light', 'dark', 'auto'] + }; + const keyOptions = optionValues[key]; + if (!keyOptions.includes(value)) + Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); + return value; + case 'meta': + case 'dayViewHeaderFormat': + return value; + case 'container': + if (value && + !(value instanceof HTMLElement || + value instanceof Element || + value?.appendChild)) { + Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement'); + } + return value; + case 'useTwentyfourHour': + if (value === undefined || providedType === 'boolean') + return value; + Namespace.errorMessages.typeMismatch(path, providedType, defaultType); + break; + default: + switch (defaultType) { + case 'boolean': + return value === 'true' || value === true; + case 'number': + return +value; + case 'string': + return value.toString(); + case 'object': + return {}; + case 'function': + return value; + default: + Namespace.errorMessages.typeMismatch(path, providedType, defaultType); + } + } + } + static _mergeOptions(providedOptions, mergeTo) { + const newConfig = OptionConverter.deepCopy(mergeTo); + //see if the options specify a locale + const localization = mergeTo.localization?.locale !== 'default' + ? mergeTo.localization + : providedOptions?.localization || DefaultOptions.localization; + OptionConverter.spread(providedOptions, newConfig, '', localization); + return newConfig; + } + static _dataToOptions(element, options) { + const eData = JSON.parse(JSON.stringify(element.dataset)); + if (eData?.tdTargetInput) + delete eData.tdTargetInput; + if (eData?.tdTargetToggle) + delete eData.tdTargetToggle; + if (!eData || + Object.keys(eData).length === 0 || + eData.constructor !== DOMStringMap) + return options; + let dataOptions = {}; + // because dataset returns camelCase including the 'td' key the option + // key won't align + const objectToNormalized = (object) => { + const lowered = {}; + Object.keys(object).forEach((x) => { + lowered[x.toLowerCase()] = x; + }); + return lowered; + }; + const rabbitHole = (split, index, optionSubgroup, value) => { + // first round = display { ... } + const normalizedOptions = objectToNormalized(optionSubgroup); + const keyOption = normalizedOptions[split[index].toLowerCase()]; + const internalObject = {}; + if (keyOption === undefined) + return internalObject; + // if this is another object, continue down the rabbit hole + if (optionSubgroup[keyOption].constructor === Object) { + index++; + internalObject[keyOption] = rabbitHole(split, index, optionSubgroup[keyOption], value); + } + else { + internalObject[keyOption] = value; + } + return internalObject; + }; + const optionsLower = objectToNormalized(options); + Object.keys(eData) + .filter((x) => x.startsWith(Namespace.dataKey)) + .map((x) => x.substring(2)) + .forEach((key) => { + let keyOption = optionsLower[key.toLowerCase()]; + // dataset merges dashes to camelCase... yay + // i.e. key = display_components_seconds + if (key.includes('_')) { + // [display, components, seconds] + const split = key.split('_'); + // display + keyOption = optionsLower[split[0].toLowerCase()]; + if (keyOption !== undefined && + options[keyOption].constructor === Object) { + dataOptions[keyOption] = rabbitHole(split, 1, options[keyOption], eData[`td${key}`]); + } + } + // or key = multipleDate + else if (keyOption !== undefined) { + dataOptions[keyOption] = eData[`td${key}`]; + } + }); + return this._mergeOptions(dataOptions, options); + } + /** + * Attempts to prove `d` is a DateTime or Date or can be converted into one. + * @param d If a string will attempt creating a date from it. + * @param localization object containing locale and format settings. Only used with the custom formats + * @private + */ + static _dateTypeCheck(d, localization) { + if (d.constructor.name === DateTime.name) + return d; + if (d.constructor.name === Date.name) { + return DateTime.convert(d); + } + if (typeof d === typeof '') { + const dateTime = DateTime.fromString(d, localization); + if (JSON.stringify(dateTime) === 'null') { + return null; + } + return dateTime; + } + return null; + } + /** + * Type checks that `value` is an array of Date or DateTime + * @param optionName Provides text to error messages e.g. disabledDates + * @param value Option value + * @param providedType Used to provide text to error messages + * @param localization + */ + static _typeCheckDateArray(optionName, value, providedType, localization) { + if (!Array.isArray(value)) { + 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, localization); + if (!dateTime) { + Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); + } + dateTime.setLocale(localization?.locale ?? 'default'); + value[i] = dateTime; + } + } + /** + * Type checks that `value` is an array of numbers + * @param optionName Provides text to error messages e.g. disabledDates + * @param value Option value + * @param providedType Used to provide text to error messages + */ + static _typeCheckNumberArray(optionName, value, providedType) { + if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) { + Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of numbers'); + } + } + /** + * Attempts to convert `d` to a DateTime object + * @param d value to convert + * @param optionName Provides text to error messages e.g. disabledDates + * @param localization object containing locale and format settings. Only used with the custom formats + */ + static dateConversion(d, optionName, localization) { + if (typeof d === typeof '' && optionName !== 'input') { + Namespace.errorMessages.dateString(); + } + const converted = this._dateTypeCheck(d, localization); + if (!converted) { + Namespace.errorMessages.failedToParseDate(optionName, d, optionName === 'input'); + } + return converted; + } + static getFlattenDefaultOptions() { + if (this._flattenDefaults) + return this._flattenDefaults; + const deepKeys = (t, pre = []) => { + if (Array.isArray(t)) + return []; + if (Object(t) === t) { + return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k])); + } + else { + return pre.join('.'); + } + }; + this._flattenDefaults = deepKeys(DefaultOptions); + return this._flattenDefaults; + } + /** + * Some options conflict like min/max date. Verify that these kinds of options + * are set correctly. + * @param config + */ + static _validateConflicts(config) { + if (config.display.sideBySide && + (!config.display.components.clock || + !(config.display.components.hours || + config.display.components.minutes || + config.display.components.seconds))) { + Namespace.errorMessages.conflictingConfiguration('Cannot use side by side mode without the clock components'); + } + if (config.restrictions.minDate && config.restrictions.maxDate) { + if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { + Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); + } + if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { + Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); + } + } + } + } + OptionConverter.ignoreProperties = ['meta', 'dayViewHeaderFormat', + 'container', 'dateForms', 'ordinal']; + OptionConverter.isValue = a => a != null; // everything except undefined + null - /** - * Main class for date validation rules based on the options provided. - */ - class Validation { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - } - /** - * Checks to see if the target date is valid based on the rules provided in the options. - * Granularity can be provided to check portions of the date instead of the whole. - * @param targetDate - * @param granularity - */ - isValid(targetDate, granularity) { - var _a; - if (this.optionsStore.options.restrictions.disabledDates.length > 0 && - this._isInDisabledDates(targetDate)) { - return false; - } - if (this.optionsStore.options.restrictions.enabledDates.length > 0 && - !this._isInEnabledDates(targetDate)) { - return false; - } - if (granularity !== exports.Unit.month && - granularity !== exports.Unit.year && - ((_a = this.optionsStore.options.restrictions.daysOfWeekDisabled) === null || _a === void 0 ? void 0 : _a.length) > 0 && - this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { - return false; - } - if (this.optionsStore.options.restrictions.minDate && - targetDate.isBefore(this.optionsStore.options.restrictions.minDate, granularity)) { - return false; - } - if (this.optionsStore.options.restrictions.maxDate && - targetDate.isAfter(this.optionsStore.options.restrictions.maxDate, granularity)) { - return false; - } - if (granularity === exports.Unit.hours || - granularity === exports.Unit.minutes || - granularity === exports.Unit.seconds) { - if (this.optionsStore.options.restrictions.disabledHours.length > 0 && - this._isInDisabledHours(targetDate)) { - return false; - } - if (this.optionsStore.options.restrictions.enabledHours.length > 0 && - !this._isInEnabledHours(targetDate)) { - return false; - } - if (this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0) { - for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) { - if (targetDate.isBetween(disabledTimeIntervals.from, disabledTimeIntervals.to)) - return false; - } - } - } - return true; - } - /** - * Checks to see if the disabledDates option is in use and returns true (meaning invalid) - * if the `testDate` is with in the array. Granularity is by date. - * @param testDate - * @private - */ - _isInDisabledDates(testDate) { - if (!this.optionsStore.options.restrictions.disabledDates || - this.optionsStore.options.restrictions.disabledDates.length === 0) - return false; - const formattedDate = testDate.format(getFormatByUnit(exports.Unit.date)); - return this.optionsStore.options.restrictions.disabledDates - .map((x) => x.format(getFormatByUnit(exports.Unit.date))) - .find((x) => x === formattedDate); - } - /** - * Checks to see if the enabledDates option is in use and returns true (meaning valid) - * if the `testDate` is with in the array. Granularity is by date. - * @param testDate - * @private - */ - _isInEnabledDates(testDate) { - if (!this.optionsStore.options.restrictions.enabledDates || - this.optionsStore.options.restrictions.enabledDates.length === 0) - return true; - const formattedDate = testDate.format(getFormatByUnit(exports.Unit.date)); - return this.optionsStore.options.restrictions.enabledDates - .map((x) => x.format(getFormatByUnit(exports.Unit.date))) - .find((x) => x === formattedDate); - } - /** - * Checks to see if the disabledHours option is in use and returns true (meaning invalid) - * if the `testDate` is with in the array. Granularity is by hours. - * @param testDate - * @private - */ - _isInDisabledHours(testDate) { - if (!this.optionsStore.options.restrictions.disabledHours || - this.optionsStore.options.restrictions.disabledHours.length === 0) - return false; - const formattedDate = testDate.hours; - return this.optionsStore.options.restrictions.disabledHours.find((x) => x === formattedDate); - } - /** - * Checks to see if the enabledHours option is in use and returns true (meaning valid) - * if the `testDate` is with in the array. Granularity is by hours. - * @param testDate - * @private - */ - _isInEnabledHours(testDate) { - if (!this.optionsStore.options.restrictions.enabledHours || - this.optionsStore.options.restrictions.enabledHours.length === 0) - return true; - const formattedDate = testDate.hours; - return this.optionsStore.options.restrictions.enabledHours.find((x) => x === formattedDate); - } - } + class Dates { + constructor() { + this._dates = []; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this._eventEmitters = serviceLocator.locate(EventEmitters); + } + /** + * Returns the array of selected dates + */ + get picked() { + return this._dates; + } + /** + * Returns the last picked value. + */ + get lastPicked() { + return this._dates[this.lastPickedIndex]; + } + /** + * Returns the length of picked dates -1 or 0 if none are selected. + */ + get lastPickedIndex() { + if (this._dates.length === 0) + return 0; + return this._dates.length - 1; + } + /** + * Formats a DateTime object to a string. Used when setting the input value. + * @param date + */ + formatInput(date) { + const components = this.optionsStore.options.display.components; + if (!date) + return ''; + return date.format({ + year: components.calendar && components.year ? 'numeric' : undefined, + month: components.calendar && components.month ? '2-digit' : undefined, + day: components.calendar && components.date ? '2-digit' : undefined, + hour: components.clock && components.hours + ? components.useTwentyfourHour + ? '2-digit' + : 'numeric' + : undefined, + minute: components.clock && components.minutes ? '2-digit' : undefined, + second: components.clock && components.seconds ? '2-digit' : undefined, + hour12: !components.useTwentyfourHour, + }); + } + /** + * parse the value into a DateTime object. + * this can be overwritten to supply your own parsing. + */ + parseInput(value) { + return OptionConverter.dateConversion(value, 'input', this.optionsStore.options.localization); + } + /** + * Tries to convert the provided value to a DateTime object. + * If value is null|undefined then clear the value of the provided index (or 0). + * @param value Value to convert or null|undefined + * @param index When using multidates this is the index in the array + */ + setFromInput(value, index) { + if (!value) { + this.setValue(undefined, index); + return; + } + const converted = this.parseInput(value); + if (converted) { + converted.setLocale(this.optionsStore.options.localization.locale); + this.setValue(converted, index); + } + } + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date) { + this._dates.push(date); + } + /** + * Returns true if the `targetDate` is part of the selected dates array. + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + isPicked(targetDate, unit) { + if (!unit) + return this._dates.find((x) => x === targetDate) !== undefined; + const format = getFormatByUnit(unit); + let innerDateFormatted = targetDate.format(format); + return (this._dates + .map((x) => x.format(format)) + .find((x) => x === innerDateFormatted) !== undefined); + } + /** + * Returns the index at which `targetDate` is in the array. + * This is used for updating or removing a date when multi-date is used + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + pickedIndex(targetDate, unit) { + if (!unit) + return this._dates.indexOf(targetDate); + const format = getFormatByUnit(unit); + let innerDateFormatted = targetDate.format(format); + return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted); + } + /** + * Clears all selected dates. + */ + clear() { + this.optionsStore.unset = true; + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.change, + date: undefined, + oldDate: this.lastPicked, + isClear: true, + isValid: true, + }); + this._dates = []; + } + /** + * Find the "book end" years given a `year` and a `factor` + * @param factor e.g. 100 for decades + * @param year e.g. 2021 + */ + static getStartEndYear(factor, year) { + const step = factor / 10, startYear = Math.floor(year / factor) * factor, endYear = startYear + step * 9, focusValue = Math.floor(year / step) * step; + return [startYear, endYear, focusValue]; + } + /** + * Attempts to either clear or set the `target` date at `index`. + * If the `target` is null then the date will be cleared. + * If multi-date is being used then it will be removed from the array. + * If `target` is valid and multi-date is used then if `index` is + * provided the date at that index will be replaced, otherwise it is appended. + * @param target + * @param index + */ + setValue(target, index) { + const noIndex = typeof index === 'undefined', isClear = !target && noIndex; + let oldDate = this.optionsStore.unset ? null : this._dates[index]; + if (!oldDate && !this.optionsStore.unset && noIndex && isClear) { + oldDate = this.lastPicked; + } + const updateInput = () => { + if (!this.optionsStore.input) + return; + let newValue = this.formatInput(target); + if (this.optionsStore.options.multipleDates) { + newValue = this._dates + .map((d) => this.formatInput(d)) + .join(this.optionsStore.options.multipleDatesSeparator); + } + if (this.optionsStore.input.value != newValue) + this.optionsStore.input.value = newValue; + }; + if (target && oldDate?.isSame(target)) { + updateInput(); + return; + } + // case of calling setValue(null) + if (!target) { + if (!this.optionsStore.options.multipleDates || + this._dates.length === 1 || + isClear) { + this.optionsStore.unset = true; + this._dates = []; + } + else { + this._dates.splice(index, 1); + } + updateInput(); + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.change, + date: undefined, + oldDate, + isClear, + isValid: true, + }); + this._eventEmitters.updateDisplay.emit('all'); + return; + } + index = index || 0; + target = target.clone; + // minute stepping is being used, force the minute to the closest value + if (this.optionsStore.options.stepping !== 1) { + target.minutes = + Math.round(target.minutes / this.optionsStore.options.stepping) * + this.optionsStore.options.stepping; + target.seconds = 0; + } + if (this.validation.isValid(target)) { + this._dates[index] = target; + this.optionsStore.viewDate = target.clone; + updateInput(); + this.optionsStore.unset = false; + this._eventEmitters.updateDisplay.emit('all'); + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.change, + date: target, + oldDate, + isClear, + isValid: true, + }); + return; + } + if (this.optionsStore.options.keepInvalid) { + this._dates[index] = target; + this.optionsStore.viewDate = target.clone; + updateInput(); + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.change, + date: target, + oldDate, + isClear, + isValid: false, + }); + } + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.error, + reason: Namespace.errorMessages.failedToSetInvalidDate, + date: target, + oldDate, + }); + } + } - class EventEmitter { - constructor() { - this.subscribers = []; - } - subscribe(callback) { - this.subscribers.push(callback); - return this.unsubscribe.bind(this, this.subscribers.length - 1); - } - unsubscribe(index) { - this.subscribers.splice(index, 1); - } - emit(value) { - this.subscribers.forEach((callback) => { - callback(value); - }); - } - destroy() { - this.subscribers = null; - this.subscribers = []; - } - } - class EventEmitters { - constructor() { - this.triggerEvent = new EventEmitter(); - this.viewUpdate = new EventEmitter(); - this.updateDisplay = new EventEmitter(); - this.action = new EventEmitter(); - } - destroy() { - this.triggerEvent.destroy(); - this.viewUpdate.destroy(); - this.updateDisplay.destroy(); - this.action.destroy(); - } - } + var ActionTypes; + (function (ActionTypes) { + ActionTypes["next"] = "next"; + ActionTypes["previous"] = "previous"; + ActionTypes["changeCalendarView"] = "changeCalendarView"; + ActionTypes["selectMonth"] = "selectMonth"; + ActionTypes["selectYear"] = "selectYear"; + ActionTypes["selectDecade"] = "selectDecade"; + ActionTypes["selectDay"] = "selectDay"; + ActionTypes["selectHour"] = "selectHour"; + ActionTypes["selectMinute"] = "selectMinute"; + ActionTypes["selectSecond"] = "selectSecond"; + ActionTypes["incrementHours"] = "incrementHours"; + ActionTypes["incrementMinutes"] = "incrementMinutes"; + ActionTypes["incrementSeconds"] = "incrementSeconds"; + ActionTypes["decrementHours"] = "decrementHours"; + ActionTypes["decrementMinutes"] = "decrementMinutes"; + ActionTypes["decrementSeconds"] = "decrementSeconds"; + ActionTypes["toggleMeridiem"] = "toggleMeridiem"; + ActionTypes["togglePicker"] = "togglePicker"; + ActionTypes["showClock"] = "showClock"; + ActionTypes["showHours"] = "showHours"; + ActionTypes["showMinutes"] = "showMinutes"; + ActionTypes["showSeconds"] = "showSeconds"; + ActionTypes["clear"] = "clear"; + ActionTypes["close"] = "close"; + ActionTypes["today"] = "today"; + })(ActionTypes || (ActionTypes = {})); + var ActionTypes$1 = ActionTypes; - const DefaultOptions = { - restrictions: { - minDate: undefined, - maxDate: undefined, - disabledDates: [], - enabledDates: [], - daysOfWeekDisabled: [], - disabledTimeIntervals: [], - disabledHours: [], - enabledHours: [] - }, - display: { - icons: { - type: 'icons', - time: 'fa-solid fa-clock', - date: 'fa-solid fa-calendar', - up: 'fa-solid fa-arrow-up', - down: 'fa-solid fa-arrow-down', - previous: 'fa-solid fa-chevron-left', - next: 'fa-solid fa-chevron-right', - today: 'fa-solid fa-calendar-check', - clear: 'fa-solid fa-trash', - close: 'fa-solid fa-xmark' - }, - sideBySide: false, - calendarWeeks: false, - viewMode: 'calendar', - toolbarPlacement: 'bottom', - keepOpen: false, - buttons: { - today: false, - clear: false, - close: false - }, - components: { - calendar: true, - date: true, - month: true, - year: true, - decades: true, - clock: true, - hours: true, - minutes: true, - seconds: false, - useTwentyfourHour: undefined - }, - inline: false, - theme: 'auto' - }, - stepping: 1, - useCurrent: true, - defaultDate: undefined, - localization: { - today: 'Go to today', - clear: 'Clear selection', - close: 'Close the picker', - selectMonth: 'Select Month', - previousMonth: 'Previous Month', - nextMonth: 'Next Month', - selectYear: 'Select Year', - previousYear: 'Previous Year', - nextYear: 'Next Year', - selectDecade: 'Select Decade', - previousDecade: 'Previous Decade', - nextDecade: 'Next Decade', - previousCentury: 'Previous Century', - nextCentury: 'Next Century', - pickHour: 'Pick Hour', - incrementHour: 'Increment Hour', - decrementHour: 'Decrement Hour', - pickMinute: 'Pick Minute', - incrementMinute: 'Increment Minute', - decrementMinute: 'Decrement Minute', - pickSecond: 'Pick Second', - incrementSecond: 'Increment Second', - decrementSecond: 'Decrement Second', - toggleMeridiem: 'Toggle Meridiem', - selectTime: 'Select Time', - selectDate: 'Select Date', - dayViewHeaderFormat: { month: 'long', year: '2-digit' }, - locale: 'default', - startOfTheWeek: 0, - /** - * This is only used with the customDateFormat plugin - */ - dateFormats: { - LTS: 'h:mm:ss T', - LT: 'h:mm T', - L: 'MM/dd/yyyy', - LL: 'MMMM d, yyyy', - LLL: 'MMMM d, yyyy h:mm T', - LLLL: 'dddd, MMMM d, yyyy h:mm T', - }, - /** - * This is only used with the customDateFormat plugin - */ - ordinal: (n) => n, - /** - * This is only used with the customDateFormat plugin - */ - format: 'L' - }, - keepInvalid: false, - debug: false, - allowInputToggle: false, - viewDate: new DateTime(), - multipleDates: false, - multipleDatesSeparator: '; ', - promptTimeOnDateChange: false, - promptTimeOnDateChangeTransitionDelay: 200, - meta: {}, - container: undefined - }; + /** + * Creates and updates the grid for `date` + */ + class DateDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement("div"); + container.classList.add(Namespace.css.daysContainer); + container.append(...this._daysOfTheWeek()); + if (this.optionsStore.options.display.calendarWeeks) { + const div = document.createElement("div"); + 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.optionsStore.options.display.calendarWeeks) { + const div = document.createElement("div"); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + container.appendChild(div); + } + } + const div = document.createElement("div"); + div.setAttribute("data-action", ActionTypes$1.selectDay); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.daysContainer)[0]; + if (this.optionsStore.currentView === "calendar") { + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName("div"); + switcher.setAttribute(Namespace.css.daysContainer, this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)); + this.optionsStore.options.display.components.month + ? switcher.classList.remove(Namespace.css.disabled) + : switcher.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.month), exports.Unit.month) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.month), exports.Unit.month) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + } + let innerDate = this.optionsStore.viewDate.clone + .startOf(exports.Unit.month) + .startOf("weekDay", this.optionsStore.options.localization.startOfTheWeek) + .manipulate(12, exports.Unit.hours); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectDay}"], .${Namespace.css.calendarWeeks}`) + .forEach((containerClone) => { + if (this.optionsStore.options.display.calendarWeeks && + containerClone.classList.contains(Namespace.css.calendarWeeks)) { + if (containerClone.innerText === "#") + return; + containerClone.innerText = `${innerDate.week}`; + return; + } + let classes = []; + classes.push(Namespace.css.day); + if (innerDate.isBefore(this.optionsStore.viewDate, exports.Unit.month)) { + classes.push(Namespace.css.old); + } + if (innerDate.isAfter(this.optionsStore.viewDate, exports.Unit.month)) { + classes.push(Namespace.css.new); + } + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, exports.Unit.date)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, exports.Unit.date)) { + classes.push(Namespace.css.disabled); + } + if (innerDate.isSame(new DateTime(), exports.Unit.date)) { + classes.push(Namespace.css.today); + } + if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { + classes.push(Namespace.css.weekend); + } + paint(exports.Unit.date, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute("data-value", `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`); + containerClone.setAttribute("data-day", `${innerDate.date}`); + containerClone.innerText = innerDate.format({ day: "numeric" }); + innerDate.manipulate(1, exports.Unit.date); + }); + } + /*** + * Generates an html row that contains the days of the week. + * @private + */ + _daysOfTheWeek() { + let innerDate = this.optionsStore.viewDate.clone + .startOf("weekDay", this.optionsStore.options.localization.startOfTheWeek) + .startOf(exports.Unit.date); + const row = []; + document.createElement("div"); + if (this.optionsStore.options.display.calendarWeeks) { + const htmlDivElement = document.createElement("div"); + 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.innerText = innerDate.format({ weekday: "short" }); + innerDate.manipulate(1, exports.Unit.date); + row.push(htmlDivElement); + } + return row; + } + } - class OptionConverter { - static deepCopy(input) { - const o = {}; - Object.keys(input).forEach((key) => { - const inputElement = input[key]; - o[key] = inputElement; - if (typeof inputElement !== 'object' || - inputElement instanceof HTMLElement || - inputElement instanceof Element || - inputElement instanceof Date) - return; - if (!Array.isArray(inputElement)) { - o[key] = OptionConverter.deepCopy(inputElement); - } - }); - return o; - } - /** - * Finds value out of an object based on a string, period delimited, path - * @param paths - * @param obj - */ - static objectPath(paths, obj) { - if (paths.charAt(0) === '.') - paths = paths.slice(1); - if (!paths) - return obj; - return paths.split('.') - .reduce((value, key) => (OptionConverter.isValue(value) || OptionConverter.isValue(value[key]) ? - value[key] : - undefined), obj); - } - /** - * The spread operator caused sub keys to be missing after merging. - * This is to fix that issue by using spread on the child objects first. - * Also handles complex options like disabledDates - * @param provided An option from new providedOptions - * @param copyTo Destination object. This was added to prevent reference copies - * @param path - * @param localization - */ - static spread(provided, copyTo, path = '', localization) { - const defaultOptions = OptionConverter.objectPath(path, DefaultOptions); - const unsupportedOptions = Object.keys(provided).filter((x) => !Object.keys(defaultOptions).includes(x)); - if (unsupportedOptions.length > 0) { - const flattenedOptions = OptionConverter.getFlattenDefaultOptions(); - const errors = unsupportedOptions.map((x) => { - let error = `"${path}.${x}" in not a known option.`; - let didYouMean = flattenedOptions.find((y) => y.includes(x)); - if (didYouMean) - error += ` Did you mean "${didYouMean}"?`; - return error; - }); - Namespace.errorMessages.unexpectedOptions(errors); - } - Object.keys(provided).filter(key => key !== '__proto__' && key !== 'constructor').forEach((key) => { - path += `.${key}`; - if (path.charAt(0) === '.') - path = path.slice(1); - const defaultOptionValue = defaultOptions[key]; - let providedType = typeof provided[key]; - let defaultType = typeof defaultOptionValue; - let value = provided[key]; - if (value === undefined || value === null) { - copyTo[key] = value; - path = path.substring(0, path.lastIndexOf(`.${key}`)); - return; - } - if (typeof defaultOptionValue === 'object' && - !Array.isArray(provided[key]) && - !(defaultOptionValue instanceof Date || OptionConverter.ignoreProperties.includes(key))) { - OptionConverter.spread(provided[key], copyTo[key], path, localization); - } - else { - copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization); - } - path = path.substring(0, path.lastIndexOf(`.${key}`)); - }); - } - static processKey(key, value, providedType, defaultType, path, localization) { - switch (key) { - case 'defaultDate': { - const dateTime = this.dateConversion(value, 'defaultDate', localization); - if (dateTime !== undefined) { - dateTime.setLocale(localization.locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('defaultDate', providedType, 'DateTime or Date'); - break; - } - case 'viewDate': { - const dateTime = this.dateConversion(value, 'viewDate', localization); - if (dateTime !== undefined) { - dateTime.setLocale(localization.locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); - break; - } - case 'minDate': { - if (value === undefined) { - return value; - } - const dateTime = this.dateConversion(value, 'restrictions.minDate', localization); - if (dateTime !== undefined) { - dateTime.setLocale(localization.locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); - break; - } - case 'maxDate': { - if (value === undefined) { - return value; - } - const dateTime = this.dateConversion(value, 'restrictions.maxDate', localization); - if (dateTime !== undefined) { - dateTime.setLocale(localization.locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); - break; - } - case 'disabledHours': - if (value === undefined) { - return []; - } - this._typeCheckNumberArray('restrictions.disabledHours', value, providedType); - if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.errorMessages.numbersOutOfRage('restrictions.disabledHours', 0, 23); - return value; - case 'enabledHours': - if (value === undefined) { - return []; - } - this._typeCheckNumberArray('restrictions.enabledHours', value, providedType); - if (value.filter((x) => x < 0 || x > 24).length > 0) - Namespace.errorMessages.numbersOutOfRage('restrictions.enabledHours', 0, 23); - return value; - case 'daysOfWeekDisabled': - if (value === undefined) { - return []; - } - this._typeCheckNumberArray('restrictions.daysOfWeekDisabled', value, providedType); - if (value.filter((x) => x < 0 || x > 6).length > 0) - Namespace.errorMessages.numbersOutOfRage('restrictions.daysOfWeekDisabled', 0, 6); - return value; - case 'enabledDates': - if (value === undefined) { - return []; - } - this._typeCheckDateArray('restrictions.enabledDates', value, providedType, localization); - return value; - case 'disabledDates': - if (value === undefined) { - return []; - } - this._typeCheckDateArray('restrictions.disabledDates', value, providedType, localization); - return value; - case 'disabledTimeIntervals': - if (value === undefined) { - return []; - } - if (!Array.isArray(value)) { - Namespace.errorMessages.typeMismatch(key, providedType, 'array of { from: DateTime|Date, to: DateTime|Date }'); - } - const valueObject = value; - for (let i = 0; i < valueObject.length; i++) { - Object.keys(valueObject[i]).forEach((vk) => { - const subOptionName = `${key}[${i}].${vk}`; - let d = valueObject[i][vk]; - const dateTime = this.dateConversion(d, subOptionName, localization); - if (!dateTime) { - Namespace.errorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); - } - dateTime.setLocale(localization.locale); - valueObject[i][vk] = dateTime; - }); - } - return valueObject; - case 'toolbarPlacement': - case 'type': - case 'viewMode': - case 'theme': - const optionValues = { - toolbarPlacement: ['top', 'bottom', 'default'], - type: ['icons', 'sprites'], - viewMode: ['clock', 'calendar', 'months', 'years', 'decades'], - theme: ['light', 'dark', 'auto'] - }; - const keyOptions = optionValues[key]; - if (!keyOptions.includes(value)) - Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); - return value; - case 'meta': - case 'dayViewHeaderFormat': - return value; - case 'container': - if (value && - !(value instanceof HTMLElement || - value instanceof Element || - (value === null || value === void 0 ? void 0 : value.appendChild))) { - Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement'); - } - return value; - case 'useTwentyfourHour': - if (value === undefined || providedType === 'boolean') - return value; - Namespace.errorMessages.typeMismatch(path, providedType, defaultType); - break; - default: - switch (defaultType) { - case 'boolean': - return value === 'true' || value === true; - case 'number': - return +value; - case 'string': - return value.toString(); - case 'object': - return {}; - case 'function': - return value; - default: - Namespace.errorMessages.typeMismatch(path, providedType, defaultType); - } - } - } - static _mergeOptions(providedOptions, mergeTo) { - var _a; - const newConfig = OptionConverter.deepCopy(mergeTo); - //see if the options specify a locale - const localization = ((_a = mergeTo.localization) === null || _a === void 0 ? void 0 : _a.locale) !== 'default' - ? mergeTo.localization - : (providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.localization) || DefaultOptions.localization; - OptionConverter.spread(providedOptions, newConfig, '', localization); - return newConfig; - } - static _dataToOptions(element, options) { - const eData = JSON.parse(JSON.stringify(element.dataset)); - if (eData === null || eData === void 0 ? void 0 : eData.tdTargetInput) - delete eData.tdTargetInput; - if (eData === null || eData === void 0 ? void 0 : eData.tdTargetToggle) - delete eData.tdTargetToggle; - if (!eData || - Object.keys(eData).length === 0 || - eData.constructor !== DOMStringMap) - return options; - let dataOptions = {}; - // because dataset returns camelCase including the 'td' key the option - // key won't align - const objectToNormalized = (object) => { - const lowered = {}; - Object.keys(object).forEach((x) => { - lowered[x.toLowerCase()] = x; - }); - return lowered; - }; - const rabbitHole = (split, index, optionSubgroup, value) => { - // first round = display { ... } - const normalizedOptions = objectToNormalized(optionSubgroup); - const keyOption = normalizedOptions[split[index].toLowerCase()]; - const internalObject = {}; - if (keyOption === undefined) - return internalObject; - // if this is another object, continue down the rabbit hole - if (optionSubgroup[keyOption].constructor === Object) { - index++; - internalObject[keyOption] = rabbitHole(split, index, optionSubgroup[keyOption], value); - } - else { - internalObject[keyOption] = value; - } - return internalObject; - }; - const optionsLower = objectToNormalized(options); - Object.keys(eData) - .filter((x) => x.startsWith(Namespace.dataKey)) - .map((x) => x.substring(2)) - .forEach((key) => { - let keyOption = optionsLower[key.toLowerCase()]; - // dataset merges dashes to camelCase... yay - // i.e. key = display_components_seconds - if (key.includes('_')) { - // [display, components, seconds] - const split = key.split('_'); - // display - keyOption = optionsLower[split[0].toLowerCase()]; - if (keyOption !== undefined && - options[keyOption].constructor === Object) { - dataOptions[keyOption] = rabbitHole(split, 1, options[keyOption], eData[`td${key}`]); - } - } - // or key = multipleDate - else if (keyOption !== undefined) { - dataOptions[keyOption] = eData[`td${key}`]; - } - }); - return this._mergeOptions(dataOptions, options); - } - /** - * Attempts to prove `d` is a DateTime or Date or can be converted into one. - * @param d If a string will attempt creating a date from it. - * @param localization object containing locale and format settings. Only used with the custom formats - * @private - */ - static _dateTypeCheck(d, localization) { - if (d.constructor.name === DateTime.name) - return d; - if (d.constructor.name === Date.name) { - return DateTime.convert(d); - } - if (typeof d === typeof '') { - const dateTime = DateTime.fromString(d, localization); - if (JSON.stringify(dateTime) === 'null') { - return null; - } - return dateTime; - } - return null; - } - /** - * Type checks that `value` is an array of Date or DateTime - * @param optionName Provides text to error messages e.g. disabledDates - * @param value Option value - * @param providedType Used to provide text to error messages - * @param localization - */ - static _typeCheckDateArray(optionName, value, providedType, localization) { - var _a; - if (!Array.isArray(value)) { - 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, localization); - if (!dateTime) { - Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); - } - dateTime.setLocale((_a = localization === null || localization === void 0 ? void 0 : localization.locale) !== null && _a !== void 0 ? _a : 'default'); - value[i] = dateTime; - } - } - /** - * Type checks that `value` is an array of numbers - * @param optionName Provides text to error messages e.g. disabledDates - * @param value Option value - * @param providedType Used to provide text to error messages - */ - static _typeCheckNumberArray(optionName, value, providedType) { - if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) { - Namespace.errorMessages.typeMismatch(optionName, providedType, 'array of numbers'); - } - } - /** - * Attempts to convert `d` to a DateTime object - * @param d value to convert - * @param optionName Provides text to error messages e.g. disabledDates - * @param localization object containing locale and format settings. Only used with the custom formats - */ - static dateConversion(d, optionName, localization) { - if (typeof d === typeof '' && optionName !== 'input') { - Namespace.errorMessages.dateString(); - } - const converted = this._dateTypeCheck(d, localization); - if (!converted) { - Namespace.errorMessages.failedToParseDate(optionName, d, optionName === 'input'); - } - return converted; - } - static getFlattenDefaultOptions() { - if (this._flattenDefaults) - return this._flattenDefaults; - const deepKeys = (t, pre = []) => { - if (Array.isArray(t)) - return []; - if (Object(t) === t) { - return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k])); - } - else { - return pre.join('.'); - } - }; - this._flattenDefaults = deepKeys(DefaultOptions); - return this._flattenDefaults; - } - /** - * Some options conflict like min/max date. Verify that these kinds of options - * are set correctly. - * @param config - */ - static _validateConflicts(config) { - if (config.display.sideBySide && - (!config.display.components.clock || - !(config.display.components.hours || - config.display.components.minutes || - config.display.components.seconds))) { - Namespace.errorMessages.conflictingConfiguration('Cannot use side by side mode without the clock components'); - } - if (config.restrictions.minDate && config.restrictions.maxDate) { - if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { - Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); - } - if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { - Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); - } - } - } - } - OptionConverter.ignoreProperties = ['meta', 'dayViewHeaderFormat', - 'container', 'dateForms', 'ordinal']; - OptionConverter.isValue = a => a != null; // everything except undefined + null + /** + * Creates and updates the grid for `month` + */ + class MonthDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.monthsContainer); + for (let i = 0; i < 12; i++) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectMonth); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; + if (this.optionsStore.currentView === 'months') { + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName('div'); + switcher.setAttribute(Namespace.css.monthsContainer, this.optionsStore.viewDate.format({ year: 'numeric' })); + this.optionsStore.options.display.components.year + ? switcher.classList.remove(Namespace.css.disabled) + : switcher.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.year), exports.Unit.year) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.year), exports.Unit.year) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + } + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectMonth}"]`) + .forEach((containerClone, index) => { + let classes = []; + classes.push(Namespace.css.month); + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, exports.Unit.month)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, exports.Unit.month)) { + classes.push(Namespace.css.disabled); + } + paint(exports.Unit.month, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${index}`); + containerClone.innerText = `${innerDate.format({ month: 'short' })}`; + innerDate.manipulate(1, exports.Unit.month); + }); + } + } - class Dates { - constructor() { - this._dates = []; - this.optionsStore = serviceLocator.locate(OptionsStore); - this.validation = serviceLocator.locate(Validation); - this._eventEmitters = serviceLocator.locate(EventEmitters); - } - /** - * Returns the array of selected dates - */ - get picked() { - return this._dates; - } - /** - * Returns the last picked value. - */ - get lastPicked() { - return this._dates[this.lastPickedIndex]; - } - /** - * Returns the length of picked dates -1 or 0 if none are selected. - */ - get lastPickedIndex() { - if (this._dates.length === 0) - return 0; - return this._dates.length - 1; - } - /** - * Formats a DateTime object to a string. Used when setting the input value. - * @param date - */ - formatInput(date) { - const components = this.optionsStore.options.display.components; - if (!date) - return ''; - return date.format({ - year: components.calendar && components.year ? 'numeric' : undefined, - month: components.calendar && components.month ? '2-digit' : undefined, - day: components.calendar && components.date ? '2-digit' : undefined, - hour: components.clock && components.hours - ? components.useTwentyfourHour - ? '2-digit' - : 'numeric' - : undefined, - minute: components.clock && components.minutes ? '2-digit' : undefined, - second: components.clock && components.seconds ? '2-digit' : undefined, - hour12: !components.useTwentyfourHour, - }); - } - /** - * parse the value into a DateTime object. - * this can be overwritten to supply your own parsing. - */ - parseInput(value) { - return OptionConverter.dateConversion(value, 'input', this.optionsStore.options.localization); - } - /** - * Tries to convert the provided value to a DateTime object. - * If value is null|undefined then clear the value of the provided index (or 0). - * @param value Value to convert or null|undefined - * @param index When using multidates this is the index in the array - */ - setFromInput(value, index) { - if (!value) { - this.setValue(undefined, index); - return; - } - const converted = this.parseInput(value); - if (converted) { - converted.setLocale(this.optionsStore.options.localization.locale); - this.setValue(converted, index); - } - } - /** - * Adds a new DateTime to selected dates array - * @param date - */ - add(date) { - this._dates.push(date); - } - /** - * Returns true if the `targetDate` is part of the selected dates array. - * If `unit` is provided then a granularity to that unit will be used. - * @param targetDate - * @param unit - */ - isPicked(targetDate, unit) { - if (!unit) - return this._dates.find((x) => x === targetDate) !== undefined; - const format = getFormatByUnit(unit); - let innerDateFormatted = targetDate.format(format); - return (this._dates - .map((x) => x.format(format)) - .find((x) => x === innerDateFormatted) !== undefined); - } - /** - * Returns the index at which `targetDate` is in the array. - * This is used for updating or removing a date when multi-date is used - * If `unit` is provided then a granularity to that unit will be used. - * @param targetDate - * @param unit - */ - pickedIndex(targetDate, unit) { - if (!unit) - return this._dates.indexOf(targetDate); - const format = getFormatByUnit(unit); - let innerDateFormatted = targetDate.format(format); - return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted); - } - /** - * Clears all selected dates. - */ - clear() { - this.optionsStore.unset = true; - this._eventEmitters.triggerEvent.emit({ - type: Namespace.events.change, - date: undefined, - oldDate: this.lastPicked, - isClear: true, - isValid: true, - }); - this._dates = []; - } - /** - * Find the "book end" years given a `year` and a `factor` - * @param factor e.g. 100 for decades - * @param year e.g. 2021 - */ - static getStartEndYear(factor, year) { - const step = factor / 10, startYear = Math.floor(year / factor) * factor, endYear = startYear + step * 9, focusValue = Math.floor(year / step) * step; - return [startYear, endYear, focusValue]; - } - /** - * Attempts to either clear or set the `target` date at `index`. - * If the `target` is null then the date will be cleared. - * If multi-date is being used then it will be removed from the array. - * If `target` is valid and multi-date is used then if `index` is - * provided the date at that index will be replaced, otherwise it is appended. - * @param target - * @param index - */ - setValue(target, index) { - const noIndex = typeof index === 'undefined', isClear = !target && noIndex; - let oldDate = this.optionsStore.unset ? null : this._dates[index]; - if (!oldDate && !this.optionsStore.unset && noIndex && isClear) { - oldDate = this.lastPicked; - } - const updateInput = () => { - if (!this.optionsStore.input) - return; - let newValue = this.formatInput(target); - if (this.optionsStore.options.multipleDates) { - newValue = this._dates - .map((d) => this.formatInput(d)) - .join(this.optionsStore.options.multipleDatesSeparator); - } - if (this.optionsStore.input.value != newValue) - this.optionsStore.input.value = newValue; - }; - if (target && (oldDate === null || oldDate === void 0 ? void 0 : oldDate.isSame(target))) { - updateInput(); - return; - } - // case of calling setValue(null) - if (!target) { - if (!this.optionsStore.options.multipleDates || - this._dates.length === 1 || - isClear) { - this.optionsStore.unset = true; - this._dates = []; - } - else { - this._dates.splice(index, 1); - } - updateInput(); - this._eventEmitters.triggerEvent.emit({ - type: Namespace.events.change, - date: undefined, - oldDate, - isClear, - isValid: true, - }); - this._eventEmitters.updateDisplay.emit('all'); - return; - } - index = index || 0; - target = target.clone; - // minute stepping is being used, force the minute to the closest value - if (this.optionsStore.options.stepping !== 1) { - target.minutes = - Math.round(target.minutes / this.optionsStore.options.stepping) * - this.optionsStore.options.stepping; - target.seconds = 0; - } - if (this.validation.isValid(target)) { - this._dates[index] = target; - this.optionsStore.viewDate = target.clone; - updateInput(); - this.optionsStore.unset = false; - this._eventEmitters.updateDisplay.emit('all'); - this._eventEmitters.triggerEvent.emit({ - type: Namespace.events.change, - date: target, - oldDate, - isClear, - isValid: true, - }); - return; - } - if (this.optionsStore.options.keepInvalid) { - this._dates[index] = target; - this.optionsStore.viewDate = target.clone; - updateInput(); - this._eventEmitters.triggerEvent.emit({ - type: Namespace.events.change, - date: target, - oldDate, - isClear, - isValid: false, - }); - } - this._eventEmitters.triggerEvent.emit({ - type: Namespace.events.error, - reason: Namespace.errorMessages.failedToSetInvalidDate, - date: target, - oldDate, - }); - } - } + /** + * Creates and updates the grid for `year` + */ + class YearDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement("div"); + container.classList.add(Namespace.css.yearsContainer); + for (let i = 0; i < 12; i++) { + const div = document.createElement("div"); + div.setAttribute("data-action", ActionTypes$1.selectYear); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.year); + this._endYear = this.optionsStore.viewDate.clone.manipulate(10, exports.Unit.year); + const container = widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; + if (this.optionsStore.currentView === "years") { + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName("div"); + switcher.setAttribute(Namespace.css.yearsContainer, `${this._startYear.format({ year: "numeric" })}-${this._endYear.format({ year: "numeric" })}`); + this.optionsStore.options.display.components.decades + ? switcher.classList.remove(Namespace.css.disabled) + : switcher.classList.add(Namespace.css.disabled); + this.validation.isValid(this._startYear, exports.Unit.year) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this._endYear, exports.Unit.year) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + } + let innerDate = this.optionsStore.viewDate.clone + .startOf(exports.Unit.year) + .manipulate(-1, exports.Unit.year); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectYear}"]`) + .forEach((containerClone) => { + let classes = []; + classes.push(Namespace.css.year); + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, exports.Unit.year)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, exports.Unit.year)) { + classes.push(Namespace.css.disabled); + } + paint(exports.Unit.year, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute("data-value", `${innerDate.year}`); + containerClone.innerText = innerDate.format({ year: "numeric" }); + innerDate.manipulate(1, exports.Unit.year); + }); + } + } - var ActionTypes; - (function (ActionTypes) { - ActionTypes["next"] = "next"; - ActionTypes["previous"] = "previous"; - ActionTypes["changeCalendarView"] = "changeCalendarView"; - ActionTypes["selectMonth"] = "selectMonth"; - ActionTypes["selectYear"] = "selectYear"; - ActionTypes["selectDecade"] = "selectDecade"; - ActionTypes["selectDay"] = "selectDay"; - ActionTypes["selectHour"] = "selectHour"; - ActionTypes["selectMinute"] = "selectMinute"; - ActionTypes["selectSecond"] = "selectSecond"; - ActionTypes["incrementHours"] = "incrementHours"; - ActionTypes["incrementMinutes"] = "incrementMinutes"; - ActionTypes["incrementSeconds"] = "incrementSeconds"; - ActionTypes["decrementHours"] = "decrementHours"; - ActionTypes["decrementMinutes"] = "decrementMinutes"; - ActionTypes["decrementSeconds"] = "decrementSeconds"; - ActionTypes["toggleMeridiem"] = "toggleMeridiem"; - ActionTypes["togglePicker"] = "togglePicker"; - ActionTypes["showClock"] = "showClock"; - ActionTypes["showHours"] = "showHours"; - ActionTypes["showMinutes"] = "showMinutes"; - ActionTypes["showSeconds"] = "showSeconds"; - ActionTypes["clear"] = "clear"; - ActionTypes["close"] = "close"; - ActionTypes["today"] = "today"; - })(ActionTypes || (ActionTypes = {})); - var ActionTypes$1 = ActionTypes; + /** + * Creates and updates the grid for `seconds` + */ + class DecadeDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement("div"); + container.classList.add(Namespace.css.decadesContainer); + for (let i = 0; i < 12; i++) { + const div = document.createElement("div"); + div.setAttribute("data-action", ActionTypes$1.selectDecade); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const [start, end] = Dates.getStartEndYear(100, this.optionsStore.viewDate.year); + this._startDecade = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); + this._startDecade.year = start; + this._endDecade = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); + this._endDecade.year = end; + const container = widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName("div"); + if (this.optionsStore.currentView === 'decades') { + switcher.setAttribute(Namespace.css.decadesContainer, `${this._startDecade.format({ year: "numeric" })}-${this._endDecade.format({ year: "numeric" })}`); + this.validation.isValid(this._startDecade, exports.Unit.year) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this._endDecade, exports.Unit.year) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + } + const pickedYears = this.dates.picked.map((x) => x.year); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectDecade}"]`) + .forEach((containerClone, index) => { + if (index === 0) { + 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); + containerClone.setAttribute("data-value", ``); + return; + } + else { + containerClone.innerText = this._startDecade.clone.manipulate(-10, exports.Unit.year).format({ year: "numeric" }); + containerClone.setAttribute("data-value", `${this._startDecade.year}`); + return; + } + } + let classes = []; + classes.push(Namespace.css.decade); + const startDecadeYear = this._startDecade.year; + const endDecadeYear = this._startDecade.year + 9; + if (!this.optionsStore.unset && + pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) + .length > 0) { + classes.push(Namespace.css.active); + } + paint("decade", this._startDecade, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute("data-value", `${this._startDecade.year}`); + containerClone.innerText = `${this._startDecade.format({ year: "numeric" })}`; + this._startDecade.manipulate(10, exports.Unit.year); + }); + } + } - /** - * Creates and updates the grid for `date` - */ - class DateDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.dates = serviceLocator.locate(Dates); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement("div"); - container.classList.add(Namespace.css.daysContainer); - container.append(...this._daysOfTheWeek()); - if (this.optionsStore.options.display.calendarWeeks) { - const div = document.createElement("div"); - 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.optionsStore.options.display.calendarWeeks) { - const div = document.createElement("div"); - div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - container.appendChild(div); - } - } - const div = document.createElement("div"); - div.setAttribute("data-action", ActionTypes$1.selectDay); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - const container = widget.getElementsByClassName(Namespace.css.daysContainer)[0]; - if (this.optionsStore.currentView === "calendar") { - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName("div"); - switcher.setAttribute(Namespace.css.daysContainer, this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)); - this.optionsStore.options.display.components.month - ? switcher.classList.remove(Namespace.css.disabled) - : switcher.classList.add(Namespace.css.disabled); - this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.month), exports.Unit.month) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.month), exports.Unit.month) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - } - let innerDate = this.optionsStore.viewDate.clone - .startOf(exports.Unit.month) - .startOf("weekDay", this.optionsStore.options.localization.startOfTheWeek) - .manipulate(12, exports.Unit.hours); - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectDay}"], .${Namespace.css.calendarWeeks}`) - .forEach((containerClone) => { - if (this.optionsStore.options.display.calendarWeeks && - containerClone.classList.contains(Namespace.css.calendarWeeks)) { - if (containerClone.innerText === "#") - return; - containerClone.innerText = `${innerDate.week}`; - return; - } - let classes = []; - classes.push(Namespace.css.day); - if (innerDate.isBefore(this.optionsStore.viewDate, exports.Unit.month)) { - classes.push(Namespace.css.old); - } - if (innerDate.isAfter(this.optionsStore.viewDate, exports.Unit.month)) { - classes.push(Namespace.css.new); - } - if (!this.optionsStore.unset && - this.dates.isPicked(innerDate, exports.Unit.date)) { - classes.push(Namespace.css.active); - } - if (!this.validation.isValid(innerDate, exports.Unit.date)) { - classes.push(Namespace.css.disabled); - } - if (innerDate.isSame(new DateTime(), exports.Unit.date)) { - classes.push(Namespace.css.today); - } - if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { - classes.push(Namespace.css.weekend); - } - paint(exports.Unit.date, innerDate, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute("data-value", `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`); - containerClone.setAttribute("data-day", `${innerDate.date}`); - containerClone.innerText = innerDate.format({ day: "numeric" }); - innerDate.manipulate(1, exports.Unit.date); - }); - } - /*** - * Generates an html row that contains the days of the week. - * @private - */ - _daysOfTheWeek() { - let innerDate = this.optionsStore.viewDate.clone - .startOf("weekDay", this.optionsStore.options.localization.startOfTheWeek) - .startOf(exports.Unit.date); - const row = []; - document.createElement("div"); - if (this.optionsStore.options.display.calendarWeeks) { - const htmlDivElement = document.createElement("div"); - 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.innerText = innerDate.format({ weekday: "short" }); - innerDate.manipulate(1, exports.Unit.date); - row.push(htmlDivElement); - } - return row; - } - } + /** + * Creates the clock display + */ + class TimeDisplay { + constructor() { + this._gridColumns = ''; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the clock display + * @private + */ + getPicker(iconTag) { + const container = document.createElement('div'); + container.classList.add(Namespace.css.clockContainer); + container.append(...this._grid(iconTag)); + return container; + } + /** + * Populates the various elements with in the clock display + * like the current hour and if the manipulation icons are enabled. + * @private + */ + _update(widget) { + const timesDiv = (widget.getElementsByClassName(Namespace.css.clockContainer)[0]); + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate).clone; + timesDiv + .querySelectorAll('.disabled') + .forEach((element) => element.classList.remove(Namespace.css.disabled)); + if (this.optionsStore.options.display.components.hours) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.hours), exports.Unit.hours)) { + timesDiv + .querySelector(`[data-action=${ActionTypes$1.incrementHours}]`) + .classList.add(Namespace.css.disabled); + } + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.hours), exports.Unit.hours)) { + timesDiv + .querySelector(`[data-action=${ActionTypes$1.decrementHours}]`) + .classList.add(Namespace.css.disabled); + } + timesDiv.querySelector(`[data-time-component=${exports.Unit.hours}]`).innerText = this.optionsStore.options.display.components.useTwentyfourHour + ? lastPicked.hoursFormatted + : lastPicked.twelveHoursFormatted; + } + if (this.optionsStore.options.display.components.minutes) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.minutes), exports.Unit.minutes)) { + timesDiv + .querySelector(`[data-action=${ActionTypes$1.incrementMinutes}]`) + .classList.add(Namespace.css.disabled); + } + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.minutes), exports.Unit.minutes)) { + timesDiv + .querySelector(`[data-action=${ActionTypes$1.decrementMinutes}]`) + .classList.add(Namespace.css.disabled); + } + timesDiv.querySelector(`[data-time-component=${exports.Unit.minutes}]`).innerText = lastPicked.minutesFormatted; + } + if (this.optionsStore.options.display.components.seconds) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.seconds), exports.Unit.seconds)) { + timesDiv + .querySelector(`[data-action=${ActionTypes$1.incrementSeconds}]`) + .classList.add(Namespace.css.disabled); + } + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.seconds), exports.Unit.seconds)) { + timesDiv + .querySelector(`[data-action=${ActionTypes$1.decrementSeconds}]`) + .classList.add(Namespace.css.disabled); + } + timesDiv.querySelector(`[data-time-component=${exports.Unit.seconds}]`).innerText = lastPicked.secondsFormatted; + } + if (!this.optionsStore.options.display.components.useTwentyfourHour) { + const toggle = timesDiv.querySelector(`[data-action=${ActionTypes$1.toggleMeridiem}]`); + toggle.innerText = lastPicked.meridiem(); + if (!this.validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, exports.Unit.hours))) { + toggle.classList.add(Namespace.css.disabled); + } + else { + toggle.classList.remove(Namespace.css.disabled); + } + } + timesDiv.style.gridTemplateAreas = `"${this._gridColumns}"`; + } + /** + * Creates the table for the clock display depending on what options are selected. + * @private + */ + _grid(iconTag) { + this._gridColumns = ''; + const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = iconTag(this.optionsStore.options.display.icons.up), downIcon = iconTag(this.optionsStore.options.display.icons.down); + separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); + const separatorColon = separator.cloneNode(true); + separatorColon.innerHTML = ':'; + const getSeparator = (colon = false) => { + return colon + ? separatorColon.cloneNode(true) + : separator.cloneNode(true); + }; + if (this.optionsStore.options.display.components.hours) { + let divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementHour); + divElement.setAttribute('data-action', ActionTypes$1.incrementHours); + divElement.appendChild(upIcon.cloneNode(true)); + top.push(divElement); + divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.pickHour); + divElement.setAttribute('data-action', ActionTypes$1.showHours); + divElement.setAttribute('data-time-component', exports.Unit.hours); + middle.push(divElement); + divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementHour); + divElement.setAttribute('data-action', ActionTypes$1.decrementHours); + divElement.appendChild(downIcon.cloneNode(true)); + bottom.push(divElement); + this._gridColumns += 'a'; + } + if (this.optionsStore.options.display.components.minutes) { + this._gridColumns += ' a'; + if (this.optionsStore.options.display.components.hours) { + top.push(getSeparator()); + middle.push(getSeparator(true)); + bottom.push(getSeparator()); + this._gridColumns += ' a'; + } + let divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementMinute); + divElement.setAttribute('data-action', ActionTypes$1.incrementMinutes); + divElement.appendChild(upIcon.cloneNode(true)); + top.push(divElement); + divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.pickMinute); + divElement.setAttribute('data-action', ActionTypes$1.showMinutes); + divElement.setAttribute('data-time-component', exports.Unit.minutes); + middle.push(divElement); + divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementMinute); + divElement.setAttribute('data-action', ActionTypes$1.decrementMinutes); + divElement.appendChild(downIcon.cloneNode(true)); + bottom.push(divElement); + } + if (this.optionsStore.options.display.components.seconds) { + this._gridColumns += ' a'; + if (this.optionsStore.options.display.components.minutes) { + top.push(getSeparator()); + middle.push(getSeparator(true)); + bottom.push(getSeparator()); + this._gridColumns += ' a'; + } + let divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementSecond); + divElement.setAttribute('data-action', ActionTypes$1.incrementSeconds); + divElement.appendChild(upIcon.cloneNode(true)); + top.push(divElement); + divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.pickSecond); + divElement.setAttribute('data-action', ActionTypes$1.showSeconds); + divElement.setAttribute('data-time-component', exports.Unit.seconds); + middle.push(divElement); + divElement = document.createElement('div'); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementSecond); + divElement.setAttribute('data-action', ActionTypes$1.decrementSeconds); + divElement.appendChild(downIcon.cloneNode(true)); + bottom.push(divElement); + } + if (!this.optionsStore.options.display.components.useTwentyfourHour) { + this._gridColumns += ' a'; + let divElement = getSeparator(); + top.push(divElement); + let button = document.createElement('button'); + button.setAttribute('title', this.optionsStore.options.localization.toggleMeridiem); + button.setAttribute('data-action', ActionTypes$1.toggleMeridiem); + button.setAttribute('tabindex', '-1'); + if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function? + button.classList.add(...Namespace.css.toggleMeridiem.split(',')); + } + else + button.classList.add(Namespace.css.toggleMeridiem); + divElement = document.createElement('div'); + divElement.classList.add(Namespace.css.noHighlight); + divElement.appendChild(button); + middle.push(divElement); + divElement = getSeparator(); + bottom.push(divElement); + } + this._gridColumns = this._gridColumns.trim(); + return [...top, ...middle, ...bottom]; + } + } - /** - * Creates and updates the grid for `month` - */ - class MonthDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.dates = serviceLocator.locate(Dates); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.monthsContainer); - for (let i = 0; i < 12; i++) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.selectMonth); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - const container = widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; - if (this.optionsStore.currentView === 'months') { - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName('div'); - switcher.setAttribute(Namespace.css.monthsContainer, this.optionsStore.viewDate.format({ year: 'numeric' })); - this.optionsStore.options.display.components.year - ? switcher.classList.remove(Namespace.css.disabled) - : switcher.classList.add(Namespace.css.disabled); - this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.year), exports.Unit.year) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.year), exports.Unit.year) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - } - let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectMonth}"]`) - .forEach((containerClone, index) => { - let classes = []; - classes.push(Namespace.css.month); - if (!this.optionsStore.unset && - this.dates.isPicked(innerDate, exports.Unit.month)) { - classes.push(Namespace.css.active); - } - if (!this.validation.isValid(innerDate, exports.Unit.month)) { - classes.push(Namespace.css.disabled); - } - paint(exports.Unit.month, innerDate, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${index}`); - containerClone.innerText = `${innerDate.format({ month: 'short' })}`; - innerDate.manipulate(1, exports.Unit.month); - }); - } - } + /** + * Creates and updates the grid for `hours` + */ + class HourDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.hourContainer); + for (let i = 0; i < + (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12); i++) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectHour); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.hourContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.date); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectHour}"]`) + .forEach((containerClone) => { + let classes = []; + classes.push(Namespace.css.hour); + if (!this.validation.isValid(innerDate, exports.Unit.hours)) { + classes.push(Namespace.css.disabled); + } + paint(exports.Unit.hours, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${innerDate.hours}`); + containerClone.innerText = this.optionsStore.options.display.components + .useTwentyfourHour + ? innerDate.hoursFormatted + : innerDate.twelveHoursFormatted; + innerDate.manipulate(1, exports.Unit.hours); + }); + } + } - /** - * Creates and updates the grid for `year` - */ - class YearDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.dates = serviceLocator.locate(Dates); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement("div"); - container.classList.add(Namespace.css.yearsContainer); - for (let i = 0; i < 12; i++) { - const div = document.createElement("div"); - div.setAttribute("data-action", ActionTypes$1.selectYear); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.year); - this._endYear = this.optionsStore.viewDate.clone.manipulate(10, exports.Unit.year); - const container = widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; - if (this.optionsStore.currentView === "years") { - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName("div"); - switcher.setAttribute(Namespace.css.yearsContainer, `${this._startYear.format({ year: "numeric" })}-${this._endYear.format({ year: "numeric" })}`); - this.optionsStore.options.display.components.decades - ? switcher.classList.remove(Namespace.css.disabled) - : switcher.classList.add(Namespace.css.disabled); - this.validation.isValid(this._startYear, exports.Unit.year) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this.validation.isValid(this._endYear, exports.Unit.year) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - } - let innerDate = this.optionsStore.viewDate.clone - .startOf(exports.Unit.year) - .manipulate(-1, exports.Unit.year); - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectYear}"]`) - .forEach((containerClone) => { - let classes = []; - classes.push(Namespace.css.year); - if (!this.optionsStore.unset && - this.dates.isPicked(innerDate, exports.Unit.year)) { - classes.push(Namespace.css.active); - } - if (!this.validation.isValid(innerDate, exports.Unit.year)) { - classes.push(Namespace.css.disabled); - } - paint(exports.Unit.year, innerDate, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute("data-value", `${innerDate.year}`); - containerClone.innerText = innerDate.format({ year: "numeric" }); - innerDate.manipulate(1, exports.Unit.year); - }); - } - } + /** + * Creates and updates the grid for `minutes` + */ + class MinuteDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.minuteContainer); + let step = this.optionsStore.options.stepping === 1 + ? 5 + : this.optionsStore.options.stepping; + for (let i = 0; i < 60 / step; i++) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectMinute); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.hours); + let step = this.optionsStore.options.stepping === 1 + ? 5 + : this.optionsStore.options.stepping; + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectMinute}"]`) + .forEach((containerClone) => { + let classes = []; + classes.push(Namespace.css.minute); + if (!this.validation.isValid(innerDate, exports.Unit.minutes)) { + classes.push(Namespace.css.disabled); + } + paint(exports.Unit.minutes, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${innerDate.minutes}`); + containerClone.innerText = innerDate.minutesFormatted; + innerDate.manipulate(step, exports.Unit.minutes); + }); + } + } - /** - * Creates and updates the grid for `seconds` - */ - class DecadeDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.dates = serviceLocator.locate(Dates); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement("div"); - container.classList.add(Namespace.css.decadesContainer); - for (let i = 0; i < 12; i++) { - const div = document.createElement("div"); - div.setAttribute("data-action", ActionTypes$1.selectDecade); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - const [start, end] = Dates.getStartEndYear(100, this.optionsStore.viewDate.year); - this._startDecade = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); - this._startDecade.year = start; - this._endDecade = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); - this._endDecade.year = end; - const container = widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName("div"); - if (this.optionsStore.currentView === 'decades') { - switcher.setAttribute(Namespace.css.decadesContainer, `${this._startDecade.format({ year: "numeric" })}-${this._endDecade.format({ year: "numeric" })}`); - this.validation.isValid(this._startDecade, exports.Unit.year) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this.validation.isValid(this._endDecade, exports.Unit.year) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - } - const pickedYears = this.dates.picked.map((x) => x.year); - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectDecade}"]`) - .forEach((containerClone, index) => { - if (index === 0) { - 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); - containerClone.setAttribute("data-value", ``); - return; - } - else { - containerClone.innerText = this._startDecade.clone.manipulate(-10, exports.Unit.year).format({ year: "numeric" }); - containerClone.setAttribute("data-value", `${this._startDecade.year}`); - return; - } - } - let classes = []; - classes.push(Namespace.css.decade); - const startDecadeYear = this._startDecade.year; - const endDecadeYear = this._startDecade.year + 9; - if (!this.optionsStore.unset && - pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) - .length > 0) { - classes.push(Namespace.css.active); - } - paint("decade", this._startDecade, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute("data-value", `${this._startDecade.year}`); - containerClone.innerText = `${this._startDecade.format({ year: "numeric" })}`; - this._startDecade.manipulate(10, exports.Unit.year); - }); - } - } + /** + * Creates and updates the grid for `seconds` + */ + class secondDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.secondContainer); + for (let i = 0; i < 12; i++) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectSecond); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.secondContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.minutes); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectSecond}"]`) + .forEach((containerClone) => { + let classes = []; + classes.push(Namespace.css.second); + if (!this.validation.isValid(innerDate, exports.Unit.seconds)) { + classes.push(Namespace.css.disabled); + } + paint(exports.Unit.seconds, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${innerDate.seconds}`); + containerClone.innerText = innerDate.secondsFormatted; + innerDate.manipulate(5, exports.Unit.seconds); + }); + } + } - /** - * Creates the clock display - */ - class TimeDisplay { - constructor() { - this._gridColumns = ''; - this.optionsStore = serviceLocator.locate(OptionsStore); - this.dates = serviceLocator.locate(Dates); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the clock display - * @private - */ - getPicker(iconTag) { - const container = document.createElement('div'); - container.classList.add(Namespace.css.clockContainer); - container.append(...this._grid(iconTag)); - return container; - } - /** - * Populates the various elements with in the clock display - * like the current hour and if the manipulation icons are enabled. - * @private - */ - _update(widget) { - const timesDiv = (widget.getElementsByClassName(Namespace.css.clockContainer)[0]); - const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate).clone; - timesDiv - .querySelectorAll('.disabled') - .forEach((element) => element.classList.remove(Namespace.css.disabled)); - if (this.optionsStore.options.display.components.hours) { - if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.hours), exports.Unit.hours)) { - timesDiv - .querySelector(`[data-action=${ActionTypes$1.incrementHours}]`) - .classList.add(Namespace.css.disabled); - } - if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.hours), exports.Unit.hours)) { - timesDiv - .querySelector(`[data-action=${ActionTypes$1.decrementHours}]`) - .classList.add(Namespace.css.disabled); - } - timesDiv.querySelector(`[data-time-component=${exports.Unit.hours}]`).innerText = this.optionsStore.options.display.components.useTwentyfourHour - ? lastPicked.hoursFormatted - : lastPicked.twelveHoursFormatted; - } - if (this.optionsStore.options.display.components.minutes) { - if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.minutes), exports.Unit.minutes)) { - timesDiv - .querySelector(`[data-action=${ActionTypes$1.incrementMinutes}]`) - .classList.add(Namespace.css.disabled); - } - if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.minutes), exports.Unit.minutes)) { - timesDiv - .querySelector(`[data-action=${ActionTypes$1.decrementMinutes}]`) - .classList.add(Namespace.css.disabled); - } - timesDiv.querySelector(`[data-time-component=${exports.Unit.minutes}]`).innerText = lastPicked.minutesFormatted; - } - if (this.optionsStore.options.display.components.seconds) { - if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.seconds), exports.Unit.seconds)) { - timesDiv - .querySelector(`[data-action=${ActionTypes$1.incrementSeconds}]`) - .classList.add(Namespace.css.disabled); - } - if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.seconds), exports.Unit.seconds)) { - timesDiv - .querySelector(`[data-action=${ActionTypes$1.decrementSeconds}]`) - .classList.add(Namespace.css.disabled); - } - timesDiv.querySelector(`[data-time-component=${exports.Unit.seconds}]`).innerText = lastPicked.secondsFormatted; - } - if (!this.optionsStore.options.display.components.useTwentyfourHour) { - const toggle = timesDiv.querySelector(`[data-action=${ActionTypes$1.toggleMeridiem}]`); - toggle.innerText = lastPicked.meridiem(); - if (!this.validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, exports.Unit.hours))) { - toggle.classList.add(Namespace.css.disabled); - } - else { - toggle.classList.remove(Namespace.css.disabled); - } - } - timesDiv.style.gridTemplateAreas = `"${this._gridColumns}"`; - } - /** - * Creates the table for the clock display depending on what options are selected. - * @private - */ - _grid(iconTag) { - this._gridColumns = ''; - const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = iconTag(this.optionsStore.options.display.icons.up), downIcon = iconTag(this.optionsStore.options.display.icons.down); - separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); - const separatorColon = separator.cloneNode(true); - separatorColon.innerHTML = ':'; - const getSeparator = (colon = false) => { - return colon - ? separatorColon.cloneNode(true) - : separator.cloneNode(true); - }; - if (this.optionsStore.options.display.components.hours) { - let divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.incrementHour); - divElement.setAttribute('data-action', ActionTypes$1.incrementHours); - divElement.appendChild(upIcon.cloneNode(true)); - top.push(divElement); - divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.pickHour); - divElement.setAttribute('data-action', ActionTypes$1.showHours); - divElement.setAttribute('data-time-component', exports.Unit.hours); - middle.push(divElement); - divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.decrementHour); - divElement.setAttribute('data-action', ActionTypes$1.decrementHours); - divElement.appendChild(downIcon.cloneNode(true)); - bottom.push(divElement); - this._gridColumns += 'a'; - } - if (this.optionsStore.options.display.components.minutes) { - this._gridColumns += ' a'; - if (this.optionsStore.options.display.components.hours) { - top.push(getSeparator()); - middle.push(getSeparator(true)); - bottom.push(getSeparator()); - this._gridColumns += ' a'; - } - let divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.incrementMinute); - divElement.setAttribute('data-action', ActionTypes$1.incrementMinutes); - divElement.appendChild(upIcon.cloneNode(true)); - top.push(divElement); - divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.pickMinute); - divElement.setAttribute('data-action', ActionTypes$1.showMinutes); - divElement.setAttribute('data-time-component', exports.Unit.minutes); - middle.push(divElement); - divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.decrementMinute); - divElement.setAttribute('data-action', ActionTypes$1.decrementMinutes); - divElement.appendChild(downIcon.cloneNode(true)); - bottom.push(divElement); - } - if (this.optionsStore.options.display.components.seconds) { - this._gridColumns += ' a'; - if (this.optionsStore.options.display.components.minutes) { - top.push(getSeparator()); - middle.push(getSeparator(true)); - bottom.push(getSeparator()); - this._gridColumns += ' a'; - } - let divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.incrementSecond); - divElement.setAttribute('data-action', ActionTypes$1.incrementSeconds); - divElement.appendChild(upIcon.cloneNode(true)); - top.push(divElement); - divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.pickSecond); - divElement.setAttribute('data-action', ActionTypes$1.showSeconds); - divElement.setAttribute('data-time-component', exports.Unit.seconds); - middle.push(divElement); - divElement = document.createElement('div'); - divElement.setAttribute('title', this.optionsStore.options.localization.decrementSecond); - divElement.setAttribute('data-action', ActionTypes$1.decrementSeconds); - divElement.appendChild(downIcon.cloneNode(true)); - bottom.push(divElement); - } - if (!this.optionsStore.options.display.components.useTwentyfourHour) { - this._gridColumns += ' a'; - let divElement = getSeparator(); - top.push(divElement); - let button = document.createElement('button'); - button.setAttribute('title', this.optionsStore.options.localization.toggleMeridiem); - button.setAttribute('data-action', ActionTypes$1.toggleMeridiem); - button.setAttribute('tabindex', '-1'); - if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function? - button.classList.add(...Namespace.css.toggleMeridiem.split(',')); - } - else - button.classList.add(Namespace.css.toggleMeridiem); - divElement = document.createElement('div'); - divElement.classList.add(Namespace.css.noHighlight); - divElement.appendChild(button); - middle.push(divElement); - divElement = getSeparator(); - bottom.push(divElement); - } - this._gridColumns = this._gridColumns.trim(); - return [...top, ...middle, ...bottom]; - } - } + /** + * Provides a collapse functionality to the view changes + */ + class Collapse { + /** + * Flips the show/hide state of `target` + * @param target html element to affect. + */ + static toggle(target) { + if (target.classList.contains(Namespace.css.show)) { + this.hide(target); + } + else { + this.show(target); + } + } + /** + * Skips any animation or timeouts and immediately set the element to show. + * @param target + */ + static showImmediately(target) { + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse, Namespace.css.show); + target.style.height = ''; + } + /** + * If `target` is not already showing, then show after the animation. + * @param target + */ + static show(target) { + if (target.classList.contains(Namespace.css.collapsing) || + target.classList.contains(Namespace.css.show)) + return; + const complete = () => { + Collapse.showImmediately(target); + }; + target.style.height = '0'; + target.classList.remove(Namespace.css.collapse); + target.classList.add(Namespace.css.collapsing); + setTimeout(complete, this.getTransitionDurationFromElement(target)); + target.style.height = `${target.scrollHeight}px`; + } + /** + * Skips any animation or timeouts and immediately set the element to hide. + * @param target + */ + static hideImmediately(target) { + if (!target) + return; + target.classList.remove(Namespace.css.collapsing, Namespace.css.show); + target.classList.add(Namespace.css.collapse); + } + /** + * If `target` is not already hidden, then hide after the animation. + * @param target HTML Element + */ + static hide(target) { + if (target.classList.contains(Namespace.css.collapsing) || + !target.classList.contains(Namespace.css.show)) + return; + const complete = () => { + Collapse.hideImmediately(target); + }; + 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.style.height = ''; + setTimeout(complete, this.getTransitionDurationFromElement(target)); + } + } + /** + * Gets the transition duration from the `element` by getting css properties + * `transition-duration` and `transition-delay` + * @param element HTML Element + */ + Collapse.getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + // Get transition-duration of the element + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + // Return 0 if element or transition duration is not found + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + // If multiple durations are defined, take the first + transitionDuration = transitionDuration.split(',')[0]; + transitionDelay = transitionDelay.split(',')[0]; + return ((Number.parseFloat(transitionDuration) + + Number.parseFloat(transitionDelay)) * + 1000); + }; - /** - * Creates and updates the grid for `hours` - */ - class HourDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.hourContainer); - for (let i = 0; i < - (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12); i++) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.selectHour); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - const container = widget.getElementsByClassName(Namespace.css.hourContainer)[0]; - let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.date); - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectHour}"]`) - .forEach((containerClone) => { - let classes = []; - classes.push(Namespace.css.hour); - if (!this.validation.isValid(innerDate, exports.Unit.hours)) { - classes.push(Namespace.css.disabled); - } - paint(exports.Unit.hours, innerDate, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${innerDate.hours}`); - containerClone.innerText = this.optionsStore.options.display.components - .useTwentyfourHour - ? innerDate.hoursFormatted - : innerDate.twelveHoursFormatted; - innerDate.manipulate(1, exports.Unit.hours); - }); - } - } + /** + * Main class for all things display related. + */ + class Display { + constructor() { + this._isVisible = false; + /** + * A document click event to hide the widget if click is outside + * @private + * @param e MouseEvent + */ + this._documentClickEvent = (e) => { + if (this.optionsStore.options.debug || window.debug) + return; + if (this._isVisible && + !e.composedPath().includes(this.widget) && // click inside the widget + !e.composedPath()?.includes(this.optionsStore.element) // click on the element + ) { + this.hide(); + } + }; + /** + * Click event for any action like selecting a date + * @param e MouseEvent + * @private + */ + this._actionsClickEvent = (e) => { + this._eventEmitters.action.emit({ e: e }); + }; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this.dates = serviceLocator.locate(Dates); + this.dateDisplay = serviceLocator.locate(DateDisplay); + this.monthDisplay = serviceLocator.locate(MonthDisplay); + this.yearDisplay = serviceLocator.locate(YearDisplay); + this.decadeDisplay = serviceLocator.locate(DecadeDisplay); + this.timeDisplay = serviceLocator.locate(TimeDisplay); + this.hourDisplay = serviceLocator.locate(HourDisplay); + this.minuteDisplay = serviceLocator.locate(MinuteDisplay); + this.secondDisplay = serviceLocator.locate(secondDisplay); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this._widget = undefined; + this._eventEmitters.updateDisplay.subscribe((result) => { + this._update(result); + }); + } + /** + * Returns the widget body or undefined + * @private + */ + get widget() { + return this._widget; + } + /** + * Returns this visible state of the picker (shown) + */ + get isVisible() { + return this._isVisible; + } + /** + * Updates the table for a particular unit. Used when an option as changed or + * whenever the class list might need to be refreshed. + * @param unit + * @private + */ + _update(unit) { + if (!this.widget) + return; + //todo do I want some kind of error catching or other guards here? + switch (unit) { + case exports.Unit.seconds: + this.secondDisplay._update(this.widget, this.paint); + break; + case exports.Unit.minutes: + this.minuteDisplay._update(this.widget, this.paint); + break; + case exports.Unit.hours: + this.hourDisplay._update(this.widget, this.paint); + break; + case exports.Unit.date: + this.dateDisplay._update(this.widget, this.paint); + break; + case exports.Unit.month: + this.monthDisplay._update(this.widget, this.paint); + break; + case exports.Unit.year: + this.yearDisplay._update(this.widget, this.paint); + break; + case 'clock': + if (!this._hasTime) + break; + this.timeDisplay._update(this.widget); + this._update(exports.Unit.hours); + this._update(exports.Unit.minutes); + this._update(exports.Unit.seconds); + break; + case 'calendar': + this._update(exports.Unit.date); + this._update(exports.Unit.year); + this._update(exports.Unit.month); + this.decadeDisplay._update(this.widget, this.paint); + this._updateCalendarHeader(); + break; + case 'all': + if (this._hasTime) { + this._update('clock'); + } + if (this._hasDate) { + this._update('calendar'); + } + } + } + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit, _date, _classes, _element) { + // implemented in plugin + } + /** + * Shows the picker and creates a Popper instance if needed. + * Add document click event to hide when clicking outside the picker. + * fires Events#show + */ + show() { + if (this.widget == undefined) { + if (this.dates.picked.length == 0) { + if (this.optionsStore.options.useCurrent && + !this.optionsStore.options.defaultDate) { + const date = new DateTime().setLocale(this.optionsStore.options.localization.locale); + if (!this.optionsStore.options.keepInvalid) { + let tries = 0; + let direction = 1; + if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) { + direction = -1; + } + while (!this.validation.isValid(date)) { + date.manipulate(direction, exports.Unit.date); + if (tries > 31) + break; + tries++; + } + } + this.dates.setValue(date); + } + if (this.optionsStore.options.defaultDate) { + this.dates.setValue(this.optionsStore.options.defaultDate); + } + } + this._buildWidget(); + this._updateTheme(); + // If modeView is only clock + const onlyClock = this._hasTime && !this._hasDate; + // reset the view to the clock if there's no date components + if (onlyClock) { + this.optionsStore.currentView = 'clock'; + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes$1.showClock, + }); + } + // otherwise return to the calendar view + if (!this.optionsStore.currentCalendarViewMode) { + this.optionsStore.currentCalendarViewMode = + this.optionsStore.minimumCalendarViewMode; + } + if (!onlyClock && + this.optionsStore.options.display.viewMode !== 'clock') { + if (this._hasTime) { + if (!this.optionsStore.options.display.sideBySide) { + Collapse.hideImmediately(this.widget.querySelector(`div.${Namespace.css.timeContainer}`)); + } + else { + Collapse.show(this.widget.querySelector(`div.${Namespace.css.timeContainer}`)); + } + } + Collapse.show(this.widget.querySelector(`div.${Namespace.css.dateContainer}`)); + } + if (this._hasDate) { + this._showMode(); + } + if (!this.optionsStore.options.display.inline) { + // If needed to change the parent container + const container = this.optionsStore.options?.container || document.body; + container.appendChild(this.widget); + this.createPopup(this.optionsStore.element, this.widget, { + modifiers: [{ name: 'eventListeners', enabled: true }], + //#2400 + placement: document.documentElement.dir === 'rtl' + ? 'bottom-end' + : 'bottom-start', + }).then(); + } + else { + this.optionsStore.element.appendChild(this.widget); + } + if (this.optionsStore.options.display.viewMode == 'clock') { + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes$1.showClock, + }); + } + this.widget + .querySelectorAll('[data-action]') + .forEach((element) => element.addEventListener('click', this._actionsClickEvent)); + // show the clock when using sideBySide + if (this._hasTime && this.optionsStore.options.display.sideBySide) { + this.timeDisplay._update(this.widget); + this.widget.getElementsByClassName(Namespace.css.clockContainer)[0].style.display = 'grid'; + } + } + this.widget.classList.add(Namespace.css.show); + if (!this.optionsStore.options.display.inline) { + this.updatePopup(); + document.addEventListener('click', this._documentClickEvent); + } + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show }); + this._isVisible = true; + } + async createPopup(element, widget, options) { + let createPopperFunction; + if (window?.Popper) { + createPopperFunction = window?.Popper?.createPopper; + } + else { + const { createPopper } = await import('@popperjs/core'); + createPopperFunction = createPopper; + } + if (createPopperFunction) { + this._popperInstance = createPopperFunction(element, widget, options); + } + } + updatePopup() { + this._popperInstance?.update(); + } + /** + * Changes the calendar view mode. E.g. month <-> year + * @param direction -/+ number to move currentViewMode + * @private + */ + _showMode(direction) { + if (!this.widget) { + return; + } + if (direction) { + const max = Math.max(this.optionsStore.minimumCalendarViewMode, Math.min(3, this.optionsStore.currentCalendarViewMode + direction)); + if (this.optionsStore.currentCalendarViewMode == max) + return; + this.optionsStore.currentCalendarViewMode = max; + } + this.widget + .querySelectorAll(`.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`) + .forEach((e) => (e.style.display = 'none')); + const datePickerMode = CalendarModes[this.optionsStore.currentCalendarViewMode]; + let picker = this.widget.querySelector(`.${datePickerMode.className}`); + switch (datePickerMode.className) { + case Namespace.css.decadesContainer: + this.decadeDisplay._update(this.widget, this.paint); + break; + case Namespace.css.yearsContainer: + this.yearDisplay._update(this.widget, this.paint); + break; + case Namespace.css.monthsContainer: + this.monthDisplay._update(this.widget, this.paint); + break; + case Namespace.css.daysContainer: + this.dateDisplay._update(this.widget, this.paint); + break; + } + picker.style.display = 'grid'; + this._updateCalendarHeader(); + this._eventEmitters.viewUpdate.emit(); + } + /** + * Changes the theme. E.g. light, dark or auto + * @param theme the theme name + * @private + */ + _updateTheme(theme) { + if (!this.widget) { + return; + } + if (theme) { + if (this.optionsStore.options.display.theme === theme) + return; + this.optionsStore.options.display.theme = theme; + } + this.widget.classList.remove('light', 'dark'); + this.widget.classList.add(this._getThemeClass()); + if (this.optionsStore.options.display.theme === 'auto') { + window + .matchMedia(Namespace.css.isDarkPreferredQuery) + .addEventListener('change', () => this._updateTheme()); + } + else { + window + .matchMedia(Namespace.css.isDarkPreferredQuery) + .removeEventListener('change', () => this._updateTheme()); + } + } + _getThemeClass() { + const currentTheme = this.optionsStore.options.display.theme || 'auto'; + const isDarkMode = window.matchMedia && + window.matchMedia(Namespace.css.isDarkPreferredQuery).matches; + switch (currentTheme) { + case 'light': + return Namespace.css.lightTheme; + case 'dark': + return Namespace.css.darkTheme; + case 'auto': + return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme; + } + } + _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.widget + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName('div'); + switch (showing) { + case Namespace.css.decadesContainer: + previous.setAttribute('title', this.optionsStore.options.localization.previousCentury); + switcher.setAttribute('title', ''); + next.setAttribute('title', this.optionsStore.options.localization.nextCentury); + break; + case Namespace.css.yearsContainer: + previous.setAttribute('title', this.optionsStore.options.localization.previousDecade); + switcher.setAttribute('title', this.optionsStore.options.localization.selectDecade); + next.setAttribute('title', this.optionsStore.options.localization.nextDecade); + break; + case Namespace.css.monthsContainer: + previous.setAttribute('title', this.optionsStore.options.localization.previousYear); + switcher.setAttribute('title', this.optionsStore.options.localization.selectYear); + next.setAttribute('title', this.optionsStore.options.localization.nextYear); + break; + case Namespace.css.daysContainer: + previous.setAttribute('title', this.optionsStore.options.localization.previousMonth); + switcher.setAttribute('title', this.optionsStore.options.localization.selectMonth); + next.setAttribute('title', this.optionsStore.options.localization.nextMonth); + switcher.innerText = this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat); + break; + } + switcher.innerText = switcher.getAttribute(showing); + } + /** + * Hides the picker if needed. + * Remove document click event to hide when clicking outside the picker. + * fires Events#hide + */ + hide() { + if (!this.widget || !this._isVisible) + return; + this.widget.classList.remove(Namespace.css.show); + if (this._isVisible) { + this._eventEmitters.triggerEvent.emit({ + type: Namespace.events.hide, + date: this.optionsStore.unset + ? null + : this.dates.lastPicked + ? this.dates.lastPicked.clone + : void 0, + }); + this._isVisible = false; + } + document.removeEventListener('click', this._documentClickEvent); + } + /** + * Toggles the picker's open state. Fires a show/hide event depending. + */ + toggle() { + return this._isVisible ? this.hide() : this.show(); + } + /** + * Removes document and data-action click listener and reset the widget + * @private + */ + _dispose() { + document.removeEventListener('click', this._documentClickEvent); + if (!this.widget) + return; + this.widget + .querySelectorAll('[data-action]') + .forEach((element) => element.removeEventListener('click', this._actionsClickEvent)); + this.widget.parentNode.removeChild(this.widget); + this._widget = undefined; + } + /** + * Builds the widgets html template. + * @private + */ + _buildWidget() { + const template = document.createElement('div'); + template.classList.add(Namespace.css.widget); + const dateView = document.createElement('div'); + dateView.classList.add(Namespace.css.dateContainer); + dateView.append(this.getHeadTemplate(), this.decadeDisplay.getPicker(), this.yearDisplay.getPicker(), this.monthDisplay.getPicker(), this.dateDisplay.getPicker()); + const timeView = document.createElement('div'); + timeView.classList.add(Namespace.css.timeContainer); + timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))); + timeView.appendChild(this.hourDisplay.getPicker()); + timeView.appendChild(this.minuteDisplay.getPicker()); + timeView.appendChild(this.secondDisplay.getPicker()); + const toolbar = document.createElement('div'); + toolbar.classList.add(Namespace.css.toolbar); + toolbar.append(...this.getToolbarElements()); + if (this.optionsStore.options.display.inline) { + template.classList.add(Namespace.css.inline); + } + if (this.optionsStore.options.display.calendarWeeks) { + template.classList.add('calendarWeeks'); + } + if (this.optionsStore.options.display.sideBySide && + this._hasDate && + this._hasTime) { + template.classList.add(Namespace.css.sideBySide); + if (this.optionsStore.options.display.toolbarPlacement === 'top') { + template.appendChild(toolbar); + } + const row = document.createElement('div'); + row.classList.add('td-row'); + dateView.classList.add('td-half'); + timeView.classList.add('td-half'); + row.appendChild(dateView); + row.appendChild(timeView); + template.appendChild(row); + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { + template.appendChild(toolbar); + } + this._widget = template; + return; + } + if (this.optionsStore.options.display.toolbarPlacement === 'top') { + template.appendChild(toolbar); + } + if (this._hasDate) { + if (this._hasTime) { + dateView.classList.add(Namespace.css.collapse); + if (this.optionsStore.options.display.viewMode !== 'clock') + dateView.classList.add(Namespace.css.show); + } + template.appendChild(dateView); + } + if (this._hasTime) { + if (this._hasDate) { + timeView.classList.add(Namespace.css.collapse); + if (this.optionsStore.options.display.viewMode === 'clock') + timeView.classList.add(Namespace.css.show); + } + template.appendChild(timeView); + } + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { + template.appendChild(toolbar); + } + const arrow = document.createElement('div'); + arrow.classList.add('arrow'); + arrow.setAttribute('data-popper-arrow', ''); + template.appendChild(arrow); + this._widget = template; + } + /** + * Returns true if the hours, minutes, or seconds component is turned on + */ + get _hasTime() { + return (this.optionsStore.options.display.components.clock && + (this.optionsStore.options.display.components.hours || + this.optionsStore.options.display.components.minutes || + this.optionsStore.options.display.components.seconds)); + } + /** + * Returns true if the year, month, or date component is turned on + */ + get _hasDate() { + return (this.optionsStore.options.display.components.calendar && + (this.optionsStore.options.display.components.year || + this.optionsStore.options.display.components.month || + this.optionsStore.options.display.components.date)); + } + /** + * Get the toolbar html based on options like buttons.today + * @private + */ + getToolbarElements() { + const toolbar = []; + if (this.optionsStore.options.display.buttons.today) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.today); + div.setAttribute('title', this.optionsStore.options.localization.today); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)); + toolbar.push(div); + } + if (!this.optionsStore.options.display.sideBySide && + this._hasDate && + this._hasTime) { + let title, icon; + if (this.optionsStore.options.display.viewMode === 'clock') { + title = this.optionsStore.options.localization.selectDate; + icon = this.optionsStore.options.display.icons.date; + } + else { + title = this.optionsStore.options.localization.selectTime; + icon = this.optionsStore.options.display.icons.time; + } + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.togglePicker); + div.setAttribute('title', title); + div.appendChild(this._iconTag(icon)); + toolbar.push(div); + } + if (this.optionsStore.options.display.buttons.clear) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.clear); + div.setAttribute('title', this.optionsStore.options.localization.clear); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)); + toolbar.push(div); + } + if (this.optionsStore.options.display.buttons.close) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.close); + div.setAttribute('title', this.optionsStore.options.localization.close); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)); + toolbar.push(div); + } + return toolbar; + } + /*** + * Builds the base header template with next and previous icons + * @private + */ + getHeadTemplate() { + const calendarHeader = document.createElement('div'); + calendarHeader.classList.add(Namespace.css.calendarHeader); + const previous = document.createElement('div'); + previous.classList.add(Namespace.css.previous); + previous.setAttribute('data-action', ActionTypes$1.previous); + previous.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous)); + const switcher = document.createElement('div'); + switcher.classList.add(Namespace.css.switch); + switcher.setAttribute('data-action', ActionTypes$1.changeCalendarView); + const next = document.createElement('div'); + next.classList.add(Namespace.css.next); + next.setAttribute('data-action', ActionTypes$1.next); + next.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)); + calendarHeader.append(previous, switcher, next); + return calendarHeader; + } + /** + * Builds an icon tag as either an `` + * or with icons.type is `sprites` then a svg tag instead + * @param iconClass + * @private + */ + _iconTag(iconClass) { + if (this.optionsStore.options.display.icons.type === 'sprites') { + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + const icon = document.createElementNS('http://www.w3.org/2000/svg', 'use'); + icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility + icon.setAttribute('href', iconClass); + svg.appendChild(icon); + return svg; + } + const icon = document.createElement('i'); + icon.classList.add(...iconClass.split(' ')); + return icon; + } + /** + * Causes the widget to get rebuilt on next show. If the picker is already open + * then hide and reshow it. + * @private + */ + _rebuild() { + const wasVisible = this._isVisible; + if (wasVisible) + this.hide(); + this._dispose(); + if (wasVisible) { + this.show(); + } + } + } - /** - * Creates and updates the grid for `minutes` - */ - class MinuteDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.minuteContainer); - let step = this.optionsStore.options.stepping === 1 - ? 5 - : this.optionsStore.options.stepping; - for (let i = 0; i < 60 / step; i++) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.selectMinute); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - const container = widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; - let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.hours); - let step = this.optionsStore.options.stepping === 1 - ? 5 - : this.optionsStore.options.stepping; - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectMinute}"]`) - .forEach((containerClone) => { - let classes = []; - classes.push(Namespace.css.minute); - if (!this.validation.isValid(innerDate, exports.Unit.minutes)) { - classes.push(Namespace.css.disabled); - } - paint(exports.Unit.minutes, innerDate, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${innerDate.minutes}`); - containerClone.innerText = innerDate.minutesFormatted; - innerDate.manipulate(step, exports.Unit.minutes); - }); - } - } + /** + * + */ + class Actions { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + this.display = serviceLocator.locate(Display); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this._eventEmitters.action.subscribe((result) => { + this.do(result.e, result.action); + }); + } + /** + * Performs the selected `action`. See ActionTypes + * @param e This is normally a click event + * @param action If not provided, then look for a [data-action] + */ + do(e, action) { + const currentTarget = e?.currentTarget; + if (currentTarget?.classList?.contains(Namespace.css.disabled)) + return false; + action = action || currentTarget?.dataset?.action; + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate) + .clone; + switch (action) { + case ActionTypes$1.next: + case ActionTypes$1.previous: + this.handleNextPrevious(action); + break; + case ActionTypes$1.changeCalendarView: + this.display._showMode(1); + this.display._updateCalendarHeader(); + break; + case ActionTypes$1.selectMonth: + case ActionTypes$1.selectYear: + case ActionTypes$1.selectDecade: + const value = +currentTarget.dataset.value; + switch (action) { + case ActionTypes$1.selectMonth: + this.optionsStore.viewDate.month = value; + break; + case ActionTypes$1.selectYear: + case ActionTypes$1.selectDecade: + this.optionsStore.viewDate.year = value; + break; + } + if (this.optionsStore.currentCalendarViewMode === + this.optionsStore.minimumCalendarViewMode) { + this.dates.setValue(this.optionsStore.viewDate, this.dates.lastPickedIndex); + if (!this.optionsStore.options.display.inline) { + this.display.hide(); + } + } + else { + this.display._showMode(-1); + } + break; + case ActionTypes$1.selectDay: + const day = this.optionsStore.viewDate.clone; + if (currentTarget.classList.contains(Namespace.css.old)) { + day.manipulate(-1, exports.Unit.month); + } + if (currentTarget.classList.contains(Namespace.css.new)) { + day.manipulate(1, exports.Unit.month); + } + day.date = +currentTarget.dataset.day; + let index = 0; + if (this.optionsStore.options.multipleDates) { + index = this.dates.pickedIndex(day, exports.Unit.date); + if (index !== -1) { + this.dates.setValue(null, index); //deselect multi-date + } + else { + this.dates.setValue(day, this.dates.lastPickedIndex + 1); + } + } + else { + this.dates.setValue(day, this.dates.lastPickedIndex); + } + if (!this.display._hasTime && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline && + !this.optionsStore.options.multipleDates) { + this.display.hide(); + } + break; + case ActionTypes$1.selectHour: + let hour = +currentTarget.dataset.value; + if (lastPicked.hours >= 12 && + !this.optionsStore.options.display.components.useTwentyfourHour) + hour += 12; + lastPicked.hours = hour; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.selectMinute: + lastPicked.minutes = +currentTarget.dataset.value; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.selectSecond: + lastPicked.seconds = +currentTarget.dataset.value; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.incrementHours: + this.manipulateAndSet(lastPicked, exports.Unit.hours); + break; + case ActionTypes$1.incrementMinutes: + this.manipulateAndSet(lastPicked, exports.Unit.minutes, this.optionsStore.options.stepping); + break; + case ActionTypes$1.incrementSeconds: + this.manipulateAndSet(lastPicked, exports.Unit.seconds); + break; + case ActionTypes$1.decrementHours: + this.manipulateAndSet(lastPicked, exports.Unit.hours, -1); + break; + case ActionTypes$1.decrementMinutes: + this.manipulateAndSet(lastPicked, exports.Unit.minutes, this.optionsStore.options.stepping * -1); + break; + case ActionTypes$1.decrementSeconds: + this.manipulateAndSet(lastPicked, exports.Unit.seconds, -1); + break; + case ActionTypes$1.toggleMeridiem: + this.manipulateAndSet(lastPicked, exports.Unit.hours, this.dates.lastPicked.hours >= 12 ? -12 : 12); + break; + case ActionTypes$1.togglePicker: + if (currentTarget.getAttribute('title') === + this.optionsStore.options.localization.selectDate) { + currentTarget.setAttribute('title', this.optionsStore.options.localization.selectTime); + currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML; + this.display._updateCalendarHeader(); + this.optionsStore.refreshCurrentView(); + } + else { + currentTarget.setAttribute('title', this.optionsStore.options.localization.selectDate); + currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML; + if (this.display._hasTime) { + this.handleShowClockContainers(ActionTypes$1.showClock); + this.display._update('clock'); + } + } + this.display.widget + .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) + .forEach((htmlElement) => Collapse.toggle(htmlElement)); + this._eventEmitters.viewUpdate.emit(); + break; + case ActionTypes$1.showClock: + case ActionTypes$1.showHours: + case ActionTypes$1.showMinutes: + case ActionTypes$1.showSeconds: + //make sure the clock is actually displaying + if (!this.optionsStore.options.display.sideBySide && this.optionsStore.currentView !== 'clock') { + //hide calendar + Collapse.hideImmediately(this.display.widget.querySelector(`div.${Namespace.css.dateContainer}`)); + //show clock + Collapse.showImmediately(this.display.widget.querySelector(`div.${Namespace.css.timeContainer}`)); + } + this.handleShowClockContainers(action); + break; + case ActionTypes$1.clear: + this.dates.setValue(null); + this.display._updateCalendarHeader(); + break; + case ActionTypes$1.close: + this.display.hide(); + break; + case ActionTypes$1.today: + const today = new DateTime().setLocale(this.optionsStore.options.localization.locale); + this.optionsStore.viewDate = today; + if (this.validation.isValid(today, exports.Unit.date)) + this.dates.setValue(today, this.dates.lastPickedIndex); + break; + } + } + handleShowClockContainers(action) { + if (!this.display._hasTime) { + Namespace.errorMessages.throwError('Cannot show clock containers when time is disabled.'); + return; + } + this.optionsStore.currentView = 'clock'; + this.display.widget + .querySelectorAll(`.${Namespace.css.timeContainer} > div`) + .forEach((htmlElement) => (htmlElement.style.display = 'none')); + let classToUse = ''; + switch (action) { + case ActionTypes$1.showClock: + classToUse = Namespace.css.clockContainer; + this.display._update('clock'); + break; + case ActionTypes$1.showHours: + classToUse = Namespace.css.hourContainer; + this.display._update(exports.Unit.hours); + break; + case ActionTypes$1.showMinutes: + classToUse = Namespace.css.minuteContainer; + this.display._update(exports.Unit.minutes); + break; + case ActionTypes$1.showSeconds: + classToUse = Namespace.css.secondContainer; + this.display._update(exports.Unit.seconds); + break; + } + (this.display.widget.getElementsByClassName(classToUse)[0]).style.display = 'grid'; + } + handleNextPrevious(action) { + const { unit, step } = CalendarModes[this.optionsStore.currentCalendarViewMode]; + if (action === ActionTypes$1.next) + this.optionsStore.viewDate.manipulate(step, unit); + else + this.optionsStore.viewDate.manipulate(step * -1, unit); + this._eventEmitters.viewUpdate.emit(); + this.display._showMode(); + } + /** + * After setting the value it will either show the clock or hide the widget. + * @param e + */ + hideOrClock(e) { + if (this.optionsStore.options.display.components.useTwentyfourHour && + !this.optionsStore.options.display.components.minutes && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline) { + this.display.hide(); + } + else { + this.do(e, ActionTypes$1.showClock); + } + } + /** + * Common function to manipulate {@link lastPicked} by `unit`. + * @param lastPicked + * @param unit + * @param value Value to change by + */ + manipulateAndSet(lastPicked, unit, value = 1) { + const newDate = lastPicked.manipulate(value, unit); + if (this.validation.isValid(newDate, unit)) { + this.dates.setValue(newDate, this.dates.lastPickedIndex); + } + } + } - /** - * Creates and updates the grid for `seconds` - */ - class secondDisplay { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.validation = serviceLocator.locate(Validation); - } - /** - * Build the container html for the display - * @private - */ - getPicker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.secondContainer); - for (let i = 0; i < 12; i++) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.selectSecond); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update(widget, paint) { - const container = widget.getElementsByClassName(Namespace.css.secondContainer)[0]; - let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.minutes); - container - .querySelectorAll(`[data-action="${ActionTypes$1.selectSecond}"]`) - .forEach((containerClone) => { - let classes = []; - classes.push(Namespace.css.second); - if (!this.validation.isValid(innerDate, exports.Unit.seconds)) { - classes.push(Namespace.css.disabled); - } - paint(exports.Unit.seconds, innerDate, classes, containerClone); - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${innerDate.seconds}`); - containerClone.innerText = innerDate.secondsFormatted; - innerDate.manipulate(5, exports.Unit.seconds); - }); - } - } + /** + * A robust and powerful date/time picker component. + */ + class TempusDominus { + constructor(element, options = {}) { + this._subscribers = {}; + this._isDisabled = false; + /** + * Event for when the input field changes. This is a class level method so there's + * something for the remove listener function. + * @private + */ + this._inputChangeEvent = (event) => { + const internallyTriggered = event?.detail; + if (internallyTriggered) + return; + const setViewDate = () => { + if (this.dates.lastPicked) + this.optionsStore.viewDate = this.dates.lastPicked.clone; + }; + const value = this.optionsStore.input.value; + if (this.optionsStore.options.multipleDates) { + try { + const valueSplit = value.split(this.optionsStore.options.multipleDatesSeparator); + for (let i = 0; i < valueSplit.length; i++) { + this.dates.setFromInput(valueSplit[i], i); + } + setViewDate(); + } + catch { + console.warn('TD: Something went wrong trying to set the multipleDates values from the input field.'); + } + } + else { + this.dates.setFromInput(value, 0); + setViewDate(); + } + }; + /** + * Event for when the toggle is clicked. This is a class level method so there's + * something for the remove listener function. + * @private + */ + this._toggleClickEvent = () => { + if (this.optionsStore.element?.disabled || this.optionsStore.input?.disabled) + return; + this.toggle(); + }; + setupServiceLocator(); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this.optionsStore = serviceLocator.locate(OptionsStore); + this.display = serviceLocator.locate(Display); + this.dates = serviceLocator.locate(Dates); + this.actions = serviceLocator.locate(Actions); + if (!element) { + Namespace.errorMessages.mustProvideElement(); + } + this.optionsStore.element = element; + this._initializeOptions(options, DefaultOptions, true); + this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale); + this.optionsStore.unset = true; + this._initializeInput(); + this._initializeToggle(); + if (this.optionsStore.options.display.inline) + this.display.show(); + this._eventEmitters.triggerEvent.subscribe((e) => { + this._triggerEvent(e); + }); + this._eventEmitters.viewUpdate.subscribe(() => { + this._viewUpdate(); + }); + } + get viewDate() { + return this.optionsStore.viewDate; + } + // noinspection JSUnusedGlobalSymbols + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + updateOptions(options, reset = false) { + if (reset) + this._initializeOptions(options, DefaultOptions); + else + this._initializeOptions(options, this.optionsStore.options); + this.display._rebuild(); + } + // noinspection JSUnusedGlobalSymbols + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + toggle() { + if (this._isDisabled) + return; + this.display.toggle(); + } + // noinspection JSUnusedGlobalSymbols + /** + * Shows the picker unless the picker is disabled. + * @public + */ + show() { + if (this._isDisabled) + return; + this.display.show(); + } + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker unless the picker is disabled. + * @public + */ + hide() { + this.display.hide(); + } + // noinspection JSUnusedGlobalSymbols + /** + * Disables the picker and the target input field. + * @public + */ + disable() { + this._isDisabled = true; + // todo this might be undesired. If a dev disables the input field to + // only allow using the picker, this will break that. + this.optionsStore.input?.setAttribute('disabled', 'disabled'); + this.display.hide(); + } + // noinspection JSUnusedGlobalSymbols + /** + * Enables the picker and the target input field. + * @public + */ + enable() { + this._isDisabled = false; + this.optionsStore.input?.removeAttribute('disabled'); + } + // noinspection JSUnusedGlobalSymbols + /** + * Clears all the selected dates + * @public + */ + clear() { + this.optionsStore.input.value = ''; + this.dates.clear(); + } + // noinspection JSUnusedGlobalSymbols + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + subscribe(eventTypes, callbacks) { + if (typeof eventTypes === 'string') { + eventTypes = [eventTypes]; + } + let callBackArray; + if (!Array.isArray(callbacks)) { + callBackArray = [callbacks]; + } + else { + callBackArray = callbacks; + } + if (eventTypes.length !== callBackArray.length) { + Namespace.errorMessages.subscribeMismatch(); + } + const returnArray = []; + for (let i = 0; i < eventTypes.length; i++) { + const eventType = eventTypes[i]; + if (!Array.isArray(this._subscribers[eventType])) { + this._subscribers[eventType] = []; + } + this._subscribers[eventType].push(callBackArray[i]); + returnArray.push({ + unsubscribe: this._unsubscribe.bind(this, eventType, this._subscribers[eventType].length - 1), + }); + if (eventTypes.length === 1) { + return returnArray[0]; + } + } + return returnArray; + } + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker and removes event listeners + */ + dispose() { + this.display.hide(); + // this will clear the document click event listener + this.display._dispose(); + this.optionsStore.input?.removeEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + this.optionsStore.input?.removeEventListener('click', this._toggleClickEvent); + } + this._toggle?.removeEventListener('click', this._toggleClickEvent); + this._subscribers = {}; + } + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language) { + let asked = loadedLocales[language]; + if (!asked) + return; + this.updateOptions({ + localization: asked, + }); + } + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + _triggerEvent(event) { + event.viewMode = this.optionsStore.currentView; + const isChangeEvent = event.type === Namespace.events.change; + if (isChangeEvent) { + const { date, oldDate, isClear } = event; + if ((date && oldDate && date.isSame(oldDate)) || + (!isClear && !date && !oldDate)) { + return; + } + this._handleAfterChangeEvent(event); + this.optionsStore.input?.dispatchEvent(new CustomEvent(event.type, { detail: event })); + this.optionsStore.input?.dispatchEvent(new CustomEvent('change', { detail: event })); + } + this.optionsStore.element.dispatchEvent(new CustomEvent(event.type, { detail: event })); + if (window.jQuery) { + const $ = window.jQuery; + if (isChangeEvent && this.optionsStore.input) { + $(this.optionsStore.input).trigger(event); + } + else { + $(this.optionsStore.element).trigger(event); + } + } + this._publish(event); + } + _publish(event) { + // return if event is not subscribed + if (!Array.isArray(this._subscribers[event.type])) { + return; + } + // Trigger callback for each subscriber + this._subscribers[event.type].forEach((callback) => { + callback(event); + }); + } + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + _viewUpdate() { + this._triggerEvent({ + type: Namespace.events.update, + viewDate: this.optionsStore.viewDate.clone, + }); + } + _unsubscribe(eventName, index) { + this._subscribers[eventName].splice(index, 1); + } + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + _initializeOptions(config, mergeTo, includeDataset = false) { + let newConfig = OptionConverter.deepCopy(config); + newConfig = OptionConverter._mergeOptions(newConfig, mergeTo); + if (includeDataset) + newConfig = OptionConverter._dataToOptions(this.optionsStore.element, newConfig); + OptionConverter._validateConflicts(newConfig); + newConfig.viewDate = newConfig.viewDate.setLocale(newConfig.localization.locale); + if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) { + this.optionsStore.viewDate = newConfig.viewDate; + } + /** + * Sets the minimum view allowed by the picker. For example the case of only + * allowing year and month to be selected but not date. + */ + if (newConfig.display.components.year) { + this.optionsStore.minimumCalendarViewMode = 2; + } + if (newConfig.display.components.month) { + this.optionsStore.minimumCalendarViewMode = 1; + } + if (newConfig.display.components.date) { + this.optionsStore.minimumCalendarViewMode = 0; + } + this.optionsStore.currentCalendarViewMode = Math.max(this.optionsStore.minimumCalendarViewMode, this.optionsStore.currentCalendarViewMode); + // Update view mode if needed + if (CalendarModes[this.optionsStore.currentCalendarViewMode].name !== + newConfig.display.viewMode) { + this.optionsStore.currentCalendarViewMode = Math.max(CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode), this.optionsStore.minimumCalendarViewMode); + } + if (this.display?.isVisible) { + this.display._update('all'); + } + if (newConfig.display.components.useTwentyfourHour === undefined) { + newConfig.display.components.useTwentyfourHour = !!!newConfig.viewDate.parts()?.dayPeriod; + } + this.optionsStore.options = newConfig; + } + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + _initializeInput() { + if (this.optionsStore.element.tagName == 'INPUT') { + this.optionsStore.input = this.optionsStore.element; + } + else { + let query = this.optionsStore.element.dataset.tdTargetInput; + if (query == undefined || query == 'nearest') { + this.optionsStore.input = + this.optionsStore.element.querySelector('input'); + } + else { + this.optionsStore.input = + this.optionsStore.element.querySelector(query); + } + } + if (!this.optionsStore.input) + return; + this.optionsStore.input.addEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + this.optionsStore.input.addEventListener('click', this._toggleClickEvent); + } + if (this.optionsStore.input.value) { + this._inputChangeEvent(); + } + } + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + _initializeToggle() { + if (this.optionsStore.options.display.inline) + return; + let query = this.optionsStore.element.dataset.tdTargetToggle; + if (query == 'nearest') { + query = '[data-td-toggle="datetimepicker"]'; + } + this._toggle = + query == undefined + ? this.optionsStore.element + : this.optionsStore.element.querySelector(query); + this._toggle.addEventListener('click', this._toggleClickEvent); + } + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + _handleAfterChangeEvent(e) { + if ( + // options is disabled + !this.optionsStore.options.promptTimeOnDateChange || + this.optionsStore.options.display.inline || + this.optionsStore.options.display.sideBySide || + // time is disabled + !this.display._hasTime || + // clock component is already showing + this.display.widget + ?.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. + // or date didn't change (time did) or date changed because time did. + if ((!e.oldDate && this.optionsStore.options.useCurrent) || + (e.oldDate && e.date?.isSame(e.oldDate))) { + return; + } + clearTimeout(this._currentPromptTimeTimeout); + this._currentPromptTimeTimeout = setTimeout(() => { + if (this.display.widget) { + this._eventEmitters.action.emit({ + e: { + currentTarget: this.display.widget.querySelector(`.${Namespace.css.switch} div`), + }, + action: ActionTypes$1.togglePicker, + }); + } + }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay); + } + } + /** + * Whenever a locale is loaded via a plugin then store it here based on the + * locale name. E.g. loadedLocales['ru'] + */ + const loadedLocales = {}; + // noinspection JSUnusedGlobalSymbols + /** + * Called from a locale plugin. + * @param l locale object for localization options + */ + const loadLocale = (l) => { + if (loadedLocales[l.name]) + return; + loadedLocales[l.name] = l.localization; + }; + /** + * A sets the global localization options to the provided locale name. + * `loadLocale` MUST be called first. + * @param l + */ + const locale = (l) => { + let asked = loadedLocales[l]; + if (!asked) + return; + DefaultOptions.localization = asked; + }; + // noinspection JSUnusedGlobalSymbols + /** + * Called from a plugin to extend or override picker defaults. + * @param plugin + * @param option + */ + const extend = function (plugin, option) { + if (!plugin) + return tempusDominus; + if (!plugin.installed) { + // install plugin only once + plugin(option, { TempusDominus, Dates, Display, DateTime, ErrorMessages }, tempusDominus); + plugin.installed = true; + } + return tempusDominus; + }; + const version = '6.1.3'; + const tempusDominus = { + TempusDominus, + extend, + loadLocale, + locale, + Namespace, + DefaultOptions, + DateTime, + Unit: exports.Unit, + version + }; - /** - * Provides a collapse functionality to the view changes - */ - class Collapse { - /** - * Flips the show/hide state of `target` - * @param target html element to affect. - */ - static toggle(target) { - if (target.classList.contains(Namespace.css.show)) { - this.hide(target); - } - else { - this.show(target); - } - } - /** - * Skips any animation or timeouts and immediately set the element to show. - * @param target - */ - static showImmediately(target) { - target.classList.remove(Namespace.css.collapsing); - target.classList.add(Namespace.css.collapse, Namespace.css.show); - target.style.height = ''; - } - /** - * If `target` is not already showing, then show after the animation. - * @param target - */ - static show(target) { - if (target.classList.contains(Namespace.css.collapsing) || - target.classList.contains(Namespace.css.show)) - return; - const complete = () => { - Collapse.showImmediately(target); - }; - target.style.height = '0'; - target.classList.remove(Namespace.css.collapse); - target.classList.add(Namespace.css.collapsing); - setTimeout(complete, this.getTransitionDurationFromElement(target)); - target.style.height = `${target.scrollHeight}px`; - } - /** - * Skips any animation or timeouts and immediately set the element to hide. - * @param target - */ - static hideImmediately(target) { - if (!target) - return; - target.classList.remove(Namespace.css.collapsing, Namespace.css.show); - target.classList.add(Namespace.css.collapse); - } - /** - * If `target` is not already hidden, then hide after the animation. - * @param target HTML Element - */ - static hide(target) { - if (target.classList.contains(Namespace.css.collapsing) || - !target.classList.contains(Namespace.css.show)) - return; - const complete = () => { - Collapse.hideImmediately(target); - }; - 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.style.height = ''; - setTimeout(complete, this.getTransitionDurationFromElement(target)); - } - } - /** - * Gets the transition duration from the `element` by getting css properties - * `transition-duration` and `transition-delay` - * @param element HTML Element - */ - Collapse.getTransitionDurationFromElement = (element) => { - if (!element) { - return 0; - } - // Get transition-duration of the element - let { transitionDuration, transitionDelay } = window.getComputedStyle(element); - const floatTransitionDuration = Number.parseFloat(transitionDuration); - const floatTransitionDelay = Number.parseFloat(transitionDelay); - // Return 0 if element or transition duration is not found - if (!floatTransitionDuration && !floatTransitionDelay) { - return 0; - } - // If multiple durations are defined, take the first - transitionDuration = transitionDuration.split(',')[0]; - transitionDelay = transitionDelay.split(',')[0]; - return ((Number.parseFloat(transitionDuration) + - Number.parseFloat(transitionDelay)) * - 1000); - }; + exports.DateTime = DateTime; + exports.DefaultOptions = DefaultOptions; + exports.Namespace = Namespace; + exports.TempusDominus = TempusDominus; + exports.extend = extend; + exports.loadLocale = loadLocale; + exports.locale = locale; + exports.version = version; - /** - * Main class for all things display related. - */ - class Display { - constructor() { - this._isVisible = false; - /** - * A document click event to hide the widget if click is outside - * @private - * @param e MouseEvent - */ - this._documentClickEvent = (e) => { - var _a; - if (this.optionsStore.options.debug || window.debug) - return; - if (this._isVisible && - !e.composedPath().includes(this.widget) && // click inside the widget - !((_a = e.composedPath()) === null || _a === void 0 ? void 0 : _a.includes(this.optionsStore.element)) // click on the element - ) { - this.hide(); - } - }; - /** - * Click event for any action like selecting a date - * @param e MouseEvent - * @private - */ - this._actionsClickEvent = (e) => { - this._eventEmitters.action.emit({ e: e }); - }; - this.optionsStore = serviceLocator.locate(OptionsStore); - this.validation = serviceLocator.locate(Validation); - this.dates = serviceLocator.locate(Dates); - this.dateDisplay = serviceLocator.locate(DateDisplay); - this.monthDisplay = serviceLocator.locate(MonthDisplay); - this.yearDisplay = serviceLocator.locate(YearDisplay); - this.decadeDisplay = serviceLocator.locate(DecadeDisplay); - this.timeDisplay = serviceLocator.locate(TimeDisplay); - this.hourDisplay = serviceLocator.locate(HourDisplay); - this.minuteDisplay = serviceLocator.locate(MinuteDisplay); - this.secondDisplay = serviceLocator.locate(secondDisplay); - this._eventEmitters = serviceLocator.locate(EventEmitters); - this._widget = undefined; - this._eventEmitters.updateDisplay.subscribe((result) => { - this._update(result); - }); - } - /** - * Returns the widget body or undefined - * @private - */ - get widget() { - return this._widget; - } - /** - * Returns this visible state of the picker (shown) - */ - get isVisible() { - return this._isVisible; - } - /** - * Updates the table for a particular unit. Used when an option as changed or - * whenever the class list might need to be refreshed. - * @param unit - * @private - */ - _update(unit) { - if (!this.widget) - return; - //todo do I want some kind of error catching or other guards here? - switch (unit) { - case exports.Unit.seconds: - this.secondDisplay._update(this.widget, this.paint); - break; - case exports.Unit.minutes: - this.minuteDisplay._update(this.widget, this.paint); - break; - case exports.Unit.hours: - this.hourDisplay._update(this.widget, this.paint); - break; - case exports.Unit.date: - this.dateDisplay._update(this.widget, this.paint); - break; - case exports.Unit.month: - this.monthDisplay._update(this.widget, this.paint); - break; - case exports.Unit.year: - this.yearDisplay._update(this.widget, this.paint); - break; - case 'clock': - if (!this._hasTime) - break; - this.timeDisplay._update(this.widget); - this._update(exports.Unit.hours); - this._update(exports.Unit.minutes); - this._update(exports.Unit.seconds); - break; - case 'calendar': - this._update(exports.Unit.date); - this._update(exports.Unit.year); - this._update(exports.Unit.month); - this.decadeDisplay._update(this.widget, this.paint); - this._updateCalendarHeader(); - break; - case 'all': - if (this._hasTime) { - this._update('clock'); - } - if (this._hasDate) { - this._update('calendar'); - } - } - } - // noinspection JSUnusedLocalSymbols - /** - * Allows developers to add/remove classes from an element. - * @param _unit - * @param _date - * @param _classes - * @param _element - */ - paint(_unit, _date, _classes, _element) { - // implemented in plugin - } - /** - * Shows the picker and creates a Popper instance if needed. - * Add document click event to hide when clicking outside the picker. - * fires Events#show - */ - show() { - var _a, _b; - if (this.widget == undefined) { - if (this.dates.picked.length == 0) { - if (this.optionsStore.options.useCurrent && - !this.optionsStore.options.defaultDate) { - const date = new DateTime().setLocale(this.optionsStore.options.localization.locale); - if (!this.optionsStore.options.keepInvalid) { - let tries = 0; - let direction = 1; - if ((_a = this.optionsStore.options.restrictions.maxDate) === null || _a === void 0 ? void 0 : _a.isBefore(date)) { - direction = -1; - } - while (!this.validation.isValid(date)) { - date.manipulate(direction, exports.Unit.date); - if (tries > 31) - break; - tries++; - } - } - this.dates.setValue(date); - } - if (this.optionsStore.options.defaultDate) { - this.dates.setValue(this.optionsStore.options.defaultDate); - } - } - this._buildWidget(); - this._updateTheme(); - // If modeView is only clock - const onlyClock = this._hasTime && !this._hasDate; - // reset the view to the clock if there's no date components - if (onlyClock) { - this.optionsStore.currentView = 'clock'; - this._eventEmitters.action.emit({ - e: null, - action: ActionTypes$1.showClock, - }); - } - // otherwise return to the calendar view - if (!this.optionsStore.currentCalendarViewMode) { - this.optionsStore.currentCalendarViewMode = - this.optionsStore.minimumCalendarViewMode; - } - if (!onlyClock && - this.optionsStore.options.display.viewMode !== 'clock') { - if (this._hasTime) { - if (!this.optionsStore.options.display.sideBySide) { - Collapse.hideImmediately(this.widget.querySelector(`div.${Namespace.css.timeContainer}`)); - } - else { - Collapse.show(this.widget.querySelector(`div.${Namespace.css.timeContainer}`)); - } - } - Collapse.show(this.widget.querySelector(`div.${Namespace.css.dateContainer}`)); - } - if (this._hasDate) { - this._showMode(); - } - if (!this.optionsStore.options.display.inline) { - // If needed to change the parent container - const container = ((_b = this.optionsStore.options) === null || _b === void 0 ? void 0 : _b.container) || document.body; - container.appendChild(this.widget); - this.createPopup(this.optionsStore.element, this.widget, { - modifiers: [{ name: 'eventListeners', enabled: true }], - //#2400 - placement: document.documentElement.dir === 'rtl' - ? 'bottom-end' - : 'bottom-start', - }).then(); - } - else { - this.optionsStore.element.appendChild(this.widget); - } - if (this.optionsStore.options.display.viewMode == 'clock') { - this._eventEmitters.action.emit({ - e: null, - action: ActionTypes$1.showClock, - }); - } - this.widget - .querySelectorAll('[data-action]') - .forEach((element) => element.addEventListener('click', this._actionsClickEvent)); - // show the clock when using sideBySide - if (this._hasTime && this.optionsStore.options.display.sideBySide) { - this.timeDisplay._update(this.widget); - this.widget.getElementsByClassName(Namespace.css.clockContainer)[0].style.display = 'grid'; - } - } - this.widget.classList.add(Namespace.css.show); - if (!this.optionsStore.options.display.inline) { - this.updatePopup(); - document.addEventListener('click', this._documentClickEvent); - } - this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show }); - this._isVisible = true; - } - createPopup(element, widget, options) { - return __awaiter(this, void 0, void 0, function* () { - const { createPopper } = yield import('@popperjs/core'); - this._popperInstance = createPopper(element, widget, options); - }); - } - updatePopup() { - var _a; - (_a = this._popperInstance) === null || _a === void 0 ? void 0 : _a.update(); - } - /** - * Changes the calendar view mode. E.g. month <-> year - * @param direction -/+ number to move currentViewMode - * @private - */ - _showMode(direction) { - if (!this.widget) { - return; - } - if (direction) { - const max = Math.max(this.optionsStore.minimumCalendarViewMode, Math.min(3, this.optionsStore.currentCalendarViewMode + direction)); - if (this.optionsStore.currentCalendarViewMode == max) - return; - this.optionsStore.currentCalendarViewMode = max; - } - this.widget - .querySelectorAll(`.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`) - .forEach((e) => (e.style.display = 'none')); - const datePickerMode = CalendarModes[this.optionsStore.currentCalendarViewMode]; - let picker = this.widget.querySelector(`.${datePickerMode.className}`); - switch (datePickerMode.className) { - case Namespace.css.decadesContainer: - this.decadeDisplay._update(this.widget, this.paint); - break; - case Namespace.css.yearsContainer: - this.yearDisplay._update(this.widget, this.paint); - break; - case Namespace.css.monthsContainer: - this.monthDisplay._update(this.widget, this.paint); - break; - case Namespace.css.daysContainer: - this.dateDisplay._update(this.widget, this.paint); - break; - } - picker.style.display = 'grid'; - this._updateCalendarHeader(); - this._eventEmitters.viewUpdate.emit(); - } - /** - * Changes the theme. E.g. light, dark or auto - * @param theme the theme name - * @private - */ - _updateTheme(theme) { - if (!this.widget) { - return; - } - if (theme) { - if (this.optionsStore.options.display.theme === theme) - return; - this.optionsStore.options.display.theme = theme; - } - this.widget.classList.remove('light', 'dark'); - this.widget.classList.add(this._getThemeClass()); - if (this.optionsStore.options.display.theme === 'auto') { - window - .matchMedia(Namespace.css.isDarkPreferredQuery) - .addEventListener('change', () => this._updateTheme()); - } - else { - window - .matchMedia(Namespace.css.isDarkPreferredQuery) - .removeEventListener('change', () => this._updateTheme()); - } - } - _getThemeClass() { - const currentTheme = this.optionsStore.options.display.theme || 'auto'; - const isDarkMode = window.matchMedia && - window.matchMedia(Namespace.css.isDarkPreferredQuery).matches; - switch (currentTheme) { - case 'light': - return Namespace.css.lightTheme; - case 'dark': - return Namespace.css.darkTheme; - case 'auto': - return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme; - } - } - _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.widget - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName('div'); - switch (showing) { - case Namespace.css.decadesContainer: - previous.setAttribute('title', this.optionsStore.options.localization.previousCentury); - switcher.setAttribute('title', ''); - next.setAttribute('title', this.optionsStore.options.localization.nextCentury); - break; - case Namespace.css.yearsContainer: - previous.setAttribute('title', this.optionsStore.options.localization.previousDecade); - switcher.setAttribute('title', this.optionsStore.options.localization.selectDecade); - next.setAttribute('title', this.optionsStore.options.localization.nextDecade); - break; - case Namespace.css.monthsContainer: - previous.setAttribute('title', this.optionsStore.options.localization.previousYear); - switcher.setAttribute('title', this.optionsStore.options.localization.selectYear); - next.setAttribute('title', this.optionsStore.options.localization.nextYear); - break; - case Namespace.css.daysContainer: - previous.setAttribute('title', this.optionsStore.options.localization.previousMonth); - switcher.setAttribute('title', this.optionsStore.options.localization.selectMonth); - next.setAttribute('title', this.optionsStore.options.localization.nextMonth); - switcher.innerText = this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat); - break; - } - switcher.innerText = switcher.getAttribute(showing); - } - /** - * Hides the picker if needed. - * Remove document click event to hide when clicking outside the picker. - * fires Events#hide - */ - hide() { - if (!this.widget || !this._isVisible) - return; - this.widget.classList.remove(Namespace.css.show); - if (this._isVisible) { - this._eventEmitters.triggerEvent.emit({ - type: Namespace.events.hide, - date: this.optionsStore.unset - ? null - : this.dates.lastPicked - ? this.dates.lastPicked.clone - : void 0, - }); - this._isVisible = false; - } - document.removeEventListener('click', this._documentClickEvent); - } - /** - * Toggles the picker's open state. Fires a show/hide event depending. - */ - toggle() { - return this._isVisible ? this.hide() : this.show(); - } - /** - * Removes document and data-action click listener and reset the widget - * @private - */ - _dispose() { - document.removeEventListener('click', this._documentClickEvent); - if (!this.widget) - return; - this.widget - .querySelectorAll('[data-action]') - .forEach((element) => element.removeEventListener('click', this._actionsClickEvent)); - this.widget.parentNode.removeChild(this.widget); - this._widget = undefined; - } - /** - * Builds the widgets html template. - * @private - */ - _buildWidget() { - const template = document.createElement('div'); - template.classList.add(Namespace.css.widget); - const dateView = document.createElement('div'); - dateView.classList.add(Namespace.css.dateContainer); - dateView.append(this.getHeadTemplate(), this.decadeDisplay.getPicker(), this.yearDisplay.getPicker(), this.monthDisplay.getPicker(), this.dateDisplay.getPicker()); - const timeView = document.createElement('div'); - timeView.classList.add(Namespace.css.timeContainer); - timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))); - timeView.appendChild(this.hourDisplay.getPicker()); - timeView.appendChild(this.minuteDisplay.getPicker()); - timeView.appendChild(this.secondDisplay.getPicker()); - const toolbar = document.createElement('div'); - toolbar.classList.add(Namespace.css.toolbar); - toolbar.append(...this.getToolbarElements()); - if (this.optionsStore.options.display.inline) { - template.classList.add(Namespace.css.inline); - } - if (this.optionsStore.options.display.calendarWeeks) { - template.classList.add('calendarWeeks'); - } - if (this.optionsStore.options.display.sideBySide && - this._hasDate && - this._hasTime) { - template.classList.add(Namespace.css.sideBySide); - if (this.optionsStore.options.display.toolbarPlacement === 'top') { - template.appendChild(toolbar); - } - const row = document.createElement('div'); - row.classList.add('td-row'); - dateView.classList.add('td-half'); - timeView.classList.add('td-half'); - row.appendChild(dateView); - row.appendChild(timeView); - template.appendChild(row); - if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { - template.appendChild(toolbar); - } - this._widget = template; - return; - } - if (this.optionsStore.options.display.toolbarPlacement === 'top') { - template.appendChild(toolbar); - } - if (this._hasDate) { - if (this._hasTime) { - dateView.classList.add(Namespace.css.collapse); - if (this.optionsStore.options.display.viewMode !== 'clock') - dateView.classList.add(Namespace.css.show); - } - template.appendChild(dateView); - } - if (this._hasTime) { - if (this._hasDate) { - timeView.classList.add(Namespace.css.collapse); - if (this.optionsStore.options.display.viewMode === 'clock') - timeView.classList.add(Namespace.css.show); - } - template.appendChild(timeView); - } - if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { - template.appendChild(toolbar); - } - const arrow = document.createElement('div'); - arrow.classList.add('arrow'); - arrow.setAttribute('data-popper-arrow', ''); - template.appendChild(arrow); - this._widget = template; - } - /** - * Returns true if the hours, minutes, or seconds component is turned on - */ - get _hasTime() { - return (this.optionsStore.options.display.components.clock && - (this.optionsStore.options.display.components.hours || - this.optionsStore.options.display.components.minutes || - this.optionsStore.options.display.components.seconds)); - } - /** - * Returns true if the year, month, or date component is turned on - */ - get _hasDate() { - return (this.optionsStore.options.display.components.calendar && - (this.optionsStore.options.display.components.year || - this.optionsStore.options.display.components.month || - this.optionsStore.options.display.components.date)); - } - /** - * Get the toolbar html based on options like buttons.today - * @private - */ - getToolbarElements() { - const toolbar = []; - if (this.optionsStore.options.display.buttons.today) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.today); - div.setAttribute('title', this.optionsStore.options.localization.today); - div.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)); - toolbar.push(div); - } - if (!this.optionsStore.options.display.sideBySide && - this._hasDate && - this._hasTime) { - let title, icon; - if (this.optionsStore.options.display.viewMode === 'clock') { - title = this.optionsStore.options.localization.selectDate; - icon = this.optionsStore.options.display.icons.date; - } - else { - title = this.optionsStore.options.localization.selectTime; - icon = this.optionsStore.options.display.icons.time; - } - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.togglePicker); - div.setAttribute('title', title); - div.appendChild(this._iconTag(icon)); - toolbar.push(div); - } - if (this.optionsStore.options.display.buttons.clear) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.clear); - div.setAttribute('title', this.optionsStore.options.localization.clear); - div.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)); - toolbar.push(div); - } - if (this.optionsStore.options.display.buttons.close) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes$1.close); - div.setAttribute('title', this.optionsStore.options.localization.close); - div.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)); - toolbar.push(div); - } - return toolbar; - } - /*** - * Builds the base header template with next and previous icons - * @private - */ - getHeadTemplate() { - const calendarHeader = document.createElement('div'); - calendarHeader.classList.add(Namespace.css.calendarHeader); - const previous = document.createElement('div'); - previous.classList.add(Namespace.css.previous); - previous.setAttribute('data-action', ActionTypes$1.previous); - previous.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous)); - const switcher = document.createElement('div'); - switcher.classList.add(Namespace.css.switch); - switcher.setAttribute('data-action', ActionTypes$1.changeCalendarView); - const next = document.createElement('div'); - next.classList.add(Namespace.css.next); - next.setAttribute('data-action', ActionTypes$1.next); - next.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)); - calendarHeader.append(previous, switcher, next); - return calendarHeader; - } - /** - * Builds an icon tag as either an `` - * or with icons.type is `sprites` then a svg tag instead - * @param iconClass - * @private - */ - _iconTag(iconClass) { - if (this.optionsStore.options.display.icons.type === 'sprites') { - const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - const icon = document.createElementNS('http://www.w3.org/2000/svg', 'use'); - icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility - icon.setAttribute('href', iconClass); - svg.appendChild(icon); - return svg; - } - const icon = document.createElement('i'); - icon.classList.add(...iconClass.split(' ')); - return icon; - } - /** - * Causes the widget to get rebuilt on next show. If the picker is already open - * then hide and reshow it. - * @private - */ - _rebuild() { - const wasVisible = this._isVisible; - if (wasVisible) - this.hide(); - this._dispose(); - if (wasVisible) { - this.show(); - } - } - } - - /** - * - */ - class Actions { - constructor() { - this.optionsStore = serviceLocator.locate(OptionsStore); - this.dates = serviceLocator.locate(Dates); - this.validation = serviceLocator.locate(Validation); - this.display = serviceLocator.locate(Display); - this._eventEmitters = serviceLocator.locate(EventEmitters); - this._eventEmitters.action.subscribe((result) => { - this.do(result.e, result.action); - }); - } - /** - * Performs the selected `action`. See ActionTypes - * @param e This is normally a click event - * @param action If not provided, then look for a [data-action] - */ - do(e, action) { - var _a, _b; - const currentTarget = e === null || e === void 0 ? void 0 : e.currentTarget; - if ((_a = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.classList) === null || _a === void 0 ? void 0 : _a.contains(Namespace.css.disabled)) - return false; - action = action || ((_b = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.dataset) === null || _b === void 0 ? void 0 : _b.action); - const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate) - .clone; - switch (action) { - case ActionTypes$1.next: - case ActionTypes$1.previous: - this.handleNextPrevious(action); - break; - case ActionTypes$1.changeCalendarView: - this.display._showMode(1); - this.display._updateCalendarHeader(); - break; - case ActionTypes$1.selectMonth: - case ActionTypes$1.selectYear: - case ActionTypes$1.selectDecade: - const value = +currentTarget.dataset.value; - switch (action) { - case ActionTypes$1.selectMonth: - this.optionsStore.viewDate.month = value; - break; - case ActionTypes$1.selectYear: - case ActionTypes$1.selectDecade: - this.optionsStore.viewDate.year = value; - break; - } - if (this.optionsStore.currentCalendarViewMode === - this.optionsStore.minimumCalendarViewMode) { - this.dates.setValue(this.optionsStore.viewDate, this.dates.lastPickedIndex); - if (!this.optionsStore.options.display.inline) { - this.display.hide(); - } - } - else { - this.display._showMode(-1); - } - break; - case ActionTypes$1.selectDay: - const day = this.optionsStore.viewDate.clone; - if (currentTarget.classList.contains(Namespace.css.old)) { - day.manipulate(-1, exports.Unit.month); - } - if (currentTarget.classList.contains(Namespace.css.new)) { - day.manipulate(1, exports.Unit.month); - } - day.date = +currentTarget.dataset.day; - let index = 0; - if (this.optionsStore.options.multipleDates) { - index = this.dates.pickedIndex(day, exports.Unit.date); - if (index !== -1) { - this.dates.setValue(null, index); //deselect multi-date - } - else { - this.dates.setValue(day, this.dates.lastPickedIndex + 1); - } - } - else { - this.dates.setValue(day, this.dates.lastPickedIndex); - } - if (!this.display._hasTime && - !this.optionsStore.options.display.keepOpen && - !this.optionsStore.options.display.inline && - !this.optionsStore.options.multipleDates) { - this.display.hide(); - } - break; - case ActionTypes$1.selectHour: - let hour = +currentTarget.dataset.value; - if (lastPicked.hours >= 12 && - !this.optionsStore.options.display.components.useTwentyfourHour) - hour += 12; - lastPicked.hours = hour; - this.dates.setValue(lastPicked, this.dates.lastPickedIndex); - this.hideOrClock(e); - break; - case ActionTypes$1.selectMinute: - lastPicked.minutes = +currentTarget.dataset.value; - this.dates.setValue(lastPicked, this.dates.lastPickedIndex); - this.hideOrClock(e); - break; - case ActionTypes$1.selectSecond: - lastPicked.seconds = +currentTarget.dataset.value; - this.dates.setValue(lastPicked, this.dates.lastPickedIndex); - this.hideOrClock(e); - break; - case ActionTypes$1.incrementHours: - this.manipulateAndSet(lastPicked, exports.Unit.hours); - break; - case ActionTypes$1.incrementMinutes: - this.manipulateAndSet(lastPicked, exports.Unit.minutes, this.optionsStore.options.stepping); - break; - case ActionTypes$1.incrementSeconds: - this.manipulateAndSet(lastPicked, exports.Unit.seconds); - break; - case ActionTypes$1.decrementHours: - this.manipulateAndSet(lastPicked, exports.Unit.hours, -1); - break; - case ActionTypes$1.decrementMinutes: - this.manipulateAndSet(lastPicked, exports.Unit.minutes, this.optionsStore.options.stepping * -1); - break; - case ActionTypes$1.decrementSeconds: - this.manipulateAndSet(lastPicked, exports.Unit.seconds, -1); - break; - case ActionTypes$1.toggleMeridiem: - this.manipulateAndSet(lastPicked, exports.Unit.hours, this.dates.lastPicked.hours >= 12 ? -12 : 12); - break; - case ActionTypes$1.togglePicker: - if (currentTarget.getAttribute('title') === - this.optionsStore.options.localization.selectDate) { - currentTarget.setAttribute('title', this.optionsStore.options.localization.selectTime); - currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML; - this.display._updateCalendarHeader(); - this.optionsStore.refreshCurrentView(); - } - else { - currentTarget.setAttribute('title', this.optionsStore.options.localization.selectDate); - currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML; - if (this.display._hasTime) { - this.handleShowClockContainers(ActionTypes$1.showClock); - this.display._update('clock'); - } - } - this.display.widget - .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) - .forEach((htmlElement) => Collapse.toggle(htmlElement)); - this._eventEmitters.viewUpdate.emit(); - break; - case ActionTypes$1.showClock: - case ActionTypes$1.showHours: - case ActionTypes$1.showMinutes: - case ActionTypes$1.showSeconds: - //make sure the clock is actually displaying - if (!this.optionsStore.options.display.sideBySide && this.optionsStore.currentView !== 'clock') { - //hide calendar - Collapse.hideImmediately(this.display.widget.querySelector(`div.${Namespace.css.dateContainer}`)); - //show clock - Collapse.showImmediately(this.display.widget.querySelector(`div.${Namespace.css.timeContainer}`)); - } - this.handleShowClockContainers(action); - break; - case ActionTypes$1.clear: - this.dates.setValue(null); - this.display._updateCalendarHeader(); - break; - case ActionTypes$1.close: - this.display.hide(); - break; - case ActionTypes$1.today: - const today = new DateTime().setLocale(this.optionsStore.options.localization.locale); - this.optionsStore.viewDate = today; - if (this.validation.isValid(today, exports.Unit.date)) - this.dates.setValue(today, this.dates.lastPickedIndex); - break; - } - } - handleShowClockContainers(action) { - if (!this.display._hasTime) { - Namespace.errorMessages.throwError('Cannot show clock containers when time is disabled.'); - return; - } - this.optionsStore.currentView = 'clock'; - this.display.widget - .querySelectorAll(`.${Namespace.css.timeContainer} > div`) - .forEach((htmlElement) => (htmlElement.style.display = 'none')); - let classToUse = ''; - switch (action) { - case ActionTypes$1.showClock: - classToUse = Namespace.css.clockContainer; - this.display._update('clock'); - break; - case ActionTypes$1.showHours: - classToUse = Namespace.css.hourContainer; - this.display._update(exports.Unit.hours); - break; - case ActionTypes$1.showMinutes: - classToUse = Namespace.css.minuteContainer; - this.display._update(exports.Unit.minutes); - break; - case ActionTypes$1.showSeconds: - classToUse = Namespace.css.secondContainer; - this.display._update(exports.Unit.seconds); - break; - } - (this.display.widget.getElementsByClassName(classToUse)[0]).style.display = 'grid'; - } - handleNextPrevious(action) { - const { unit, step } = CalendarModes[this.optionsStore.currentCalendarViewMode]; - if (action === ActionTypes$1.next) - this.optionsStore.viewDate.manipulate(step, unit); - else - this.optionsStore.viewDate.manipulate(step * -1, unit); - this._eventEmitters.viewUpdate.emit(); - this.display._showMode(); - } - /** - * After setting the value it will either show the clock or hide the widget. - * @param e - */ - hideOrClock(e) { - if (this.optionsStore.options.display.components.useTwentyfourHour && - !this.optionsStore.options.display.components.minutes && - !this.optionsStore.options.display.keepOpen && - !this.optionsStore.options.display.inline) { - this.display.hide(); - } - else { - this.do(e, ActionTypes$1.showClock); - } - } - /** - * Common function to manipulate {@link lastPicked} by `unit`. - * @param lastPicked - * @param unit - * @param value Value to change by - */ - manipulateAndSet(lastPicked, unit, value = 1) { - const newDate = lastPicked.manipulate(value, unit); - if (this.validation.isValid(newDate, unit)) { - this.dates.setValue(newDate, this.dates.lastPickedIndex); - } - } - } - - /** - * A robust and powerful date/time picker component. - */ - class TempusDominus { - constructor(element, options = {}) { - this._subscribers = {}; - this._isDisabled = false; - /** - * Event for when the input field changes. This is a class level method so there's - * something for the remove listener function. - * @private - */ - this._inputChangeEvent = (event) => { - const internallyTriggered = event === null || event === void 0 ? void 0 : event.detail; - if (internallyTriggered) - return; - const setViewDate = () => { - if (this.dates.lastPicked) - this.optionsStore.viewDate = this.dates.lastPicked.clone; - }; - const value = this.optionsStore.input.value; - if (this.optionsStore.options.multipleDates) { - try { - const valueSplit = value.split(this.optionsStore.options.multipleDatesSeparator); - for (let i = 0; i < valueSplit.length; i++) { - this.dates.setFromInput(valueSplit[i], i); - } - setViewDate(); - } - catch (_a) { - console.warn('TD: Something went wrong trying to set the multipleDates values from the input field.'); - } - } - else { - this.dates.setFromInput(value, 0); - setViewDate(); - } - }; - /** - * Event for when the toggle is clicked. This is a class level method so there's - * something for the remove listener function. - * @private - */ - this._toggleClickEvent = () => { - var _a, _b; - if (((_a = this.optionsStore.element) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.disabled)) - return; - this.toggle(); - }; - setupServiceLocator(); - this._eventEmitters = serviceLocator.locate(EventEmitters); - this.optionsStore = serviceLocator.locate(OptionsStore); - this.display = serviceLocator.locate(Display); - this.dates = serviceLocator.locate(Dates); - this.actions = serviceLocator.locate(Actions); - if (!element) { - Namespace.errorMessages.mustProvideElement(); - } - this.optionsStore.element = element; - this._initializeOptions(options, DefaultOptions, true); - this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale); - this.optionsStore.unset = true; - this._initializeInput(); - this._initializeToggle(); - if (this.optionsStore.options.display.inline) - this.display.show(); - this._eventEmitters.triggerEvent.subscribe((e) => { - this._triggerEvent(e); - }); - this._eventEmitters.viewUpdate.subscribe(() => { - this._viewUpdate(); - }); - } - get viewDate() { - return this.optionsStore.viewDate; - } - // noinspection JSUnusedGlobalSymbols - /** - * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. - * @param options - * @param reset - * @public - */ - updateOptions(options, reset = false) { - if (reset) - this._initializeOptions(options, DefaultOptions); - else - this._initializeOptions(options, this.optionsStore.options); - this.display._rebuild(); - } - // noinspection JSUnusedGlobalSymbols - /** - * Toggles the picker open or closed. If the picker is disabled, nothing will happen. - * @public - */ - toggle() { - if (this._isDisabled) - return; - this.display.toggle(); - } - // noinspection JSUnusedGlobalSymbols - /** - * Shows the picker unless the picker is disabled. - * @public - */ - show() { - if (this._isDisabled) - return; - this.display.show(); - } - // noinspection JSUnusedGlobalSymbols - /** - * Hides the picker unless the picker is disabled. - * @public - */ - hide() { - this.display.hide(); - } - // noinspection JSUnusedGlobalSymbols - /** - * Disables the picker and the target input field. - * @public - */ - disable() { - var _a; - this._isDisabled = true; - // todo this might be undesired. If a dev disables the input field to - // only allow using the picker, this will break that. - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled'); - this.display.hide(); - } - // noinspection JSUnusedGlobalSymbols - /** - * Enables the picker and the target input field. - * @public - */ - enable() { - var _a; - this._isDisabled = false; - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeAttribute('disabled'); - } - // noinspection JSUnusedGlobalSymbols - /** - * Clears all the selected dates - * @public - */ - clear() { - this.optionsStore.input.value = ''; - this.dates.clear(); - } - // noinspection JSUnusedGlobalSymbols - /** - * Allows for a direct subscription to picker events, without having to use addEventListener on the element. - * @param eventTypes See Namespace.Events - * @param callbacks Function to call when event is triggered - * @public - */ - subscribe(eventTypes, callbacks) { - if (typeof eventTypes === 'string') { - eventTypes = [eventTypes]; - } - let callBackArray; - if (!Array.isArray(callbacks)) { - callBackArray = [callbacks]; - } - else { - callBackArray = callbacks; - } - if (eventTypes.length !== callBackArray.length) { - Namespace.errorMessages.subscribeMismatch(); - } - const returnArray = []; - for (let i = 0; i < eventTypes.length; i++) { - const eventType = eventTypes[i]; - if (!Array.isArray(this._subscribers[eventType])) { - this._subscribers[eventType] = []; - } - this._subscribers[eventType].push(callBackArray[i]); - returnArray.push({ - unsubscribe: this._unsubscribe.bind(this, eventType, this._subscribers[eventType].length - 1), - }); - if (eventTypes.length === 1) { - return returnArray[0]; - } - } - return returnArray; - } - // noinspection JSUnusedGlobalSymbols - /** - * Hides the picker and removes event listeners - */ - dispose() { - var _a, _b, _c; - this.display.hide(); - // this will clear the document click event listener - this.display._dispose(); - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._inputChangeEvent); - if (this.optionsStore.options.allowInputToggle) { - (_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this._toggleClickEvent); - } - (_c = this._toggle) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', this._toggleClickEvent); - this._subscribers = {}; - } - /** - * Updates the options to use the provided language. - * THe language file must be loaded first. - * @param language - */ - locale(language) { - let asked = loadedLocales[language]; - if (!asked) - return; - this.updateOptions({ - localization: asked, - }); - } - /** - * Triggers an event like ChangeEvent when the picker has updated the value - * of a selected date. - * @param event Accepts a BaseEvent object. - * @private - */ - _triggerEvent(event) { - var _a, _b; - event.viewMode = this.optionsStore.currentView; - const isChangeEvent = event.type === Namespace.events.change; - if (isChangeEvent) { - const { date, oldDate, isClear } = event; - if ((date && oldDate && date.isSame(oldDate)) || - (!isClear && !date && !oldDate)) { - return; - } - this._handleAfterChangeEvent(event); - (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(event.type, { detail: event })); - (_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.dispatchEvent(new CustomEvent('change', { detail: event })); - } - this.optionsStore.element.dispatchEvent(new CustomEvent(event.type, { detail: event })); - if (window.jQuery) { - const $ = window.jQuery; - if (isChangeEvent && this.optionsStore.input) { - $(this.optionsStore.input).trigger(event); - } - else { - $(this.optionsStore.element).trigger(event); - } - } - this._publish(event); - } - _publish(event) { - // return if event is not subscribed - if (!Array.isArray(this._subscribers[event.type])) { - return; - } - // Trigger callback for each subscriber - this._subscribers[event.type].forEach((callback) => { - callback(event); - }); - } - /** - * Fires a ViewUpdate event when, for example, the month view is changed. - * @private - */ - _viewUpdate() { - this._triggerEvent({ - type: Namespace.events.update, - viewDate: this.optionsStore.viewDate.clone, - }); - } - _unsubscribe(eventName, index) { - this._subscribers[eventName].splice(index, 1); - } - /** - * Merges two Option objects together and validates options type - * @param config new Options - * @param mergeTo Options to merge into - * @param includeDataset When true, the elements data-td attributes will be included in the - * @private - */ - _initializeOptions(config, mergeTo, includeDataset = false) { - var _a, _b; - let newConfig = OptionConverter.deepCopy(config); - newConfig = OptionConverter._mergeOptions(newConfig, mergeTo); - if (includeDataset) - newConfig = OptionConverter._dataToOptions(this.optionsStore.element, newConfig); - OptionConverter._validateConflicts(newConfig); - newConfig.viewDate = newConfig.viewDate.setLocale(newConfig.localization.locale); - if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) { - this.optionsStore.viewDate = newConfig.viewDate; - } - /** - * Sets the minimum view allowed by the picker. For example the case of only - * allowing year and month to be selected but not date. - */ - if (newConfig.display.components.year) { - this.optionsStore.minimumCalendarViewMode = 2; - } - if (newConfig.display.components.month) { - this.optionsStore.minimumCalendarViewMode = 1; - } - if (newConfig.display.components.date) { - this.optionsStore.minimumCalendarViewMode = 0; - } - this.optionsStore.currentCalendarViewMode = Math.max(this.optionsStore.minimumCalendarViewMode, this.optionsStore.currentCalendarViewMode); - // Update view mode if needed - if (CalendarModes[this.optionsStore.currentCalendarViewMode].name !== - newConfig.display.viewMode) { - this.optionsStore.currentCalendarViewMode = Math.max(CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode), this.optionsStore.minimumCalendarViewMode); - } - if ((_a = this.display) === null || _a === void 0 ? void 0 : _a.isVisible) { - this.display._update('all'); - } - if (newConfig.display.components.useTwentyfourHour === undefined) { - newConfig.display.components.useTwentyfourHour = !!!((_b = newConfig.viewDate.parts()) === null || _b === void 0 ? void 0 : _b.dayPeriod); - } - this.optionsStore.options = newConfig; - } - /** - * Checks if an input field is being used, attempts to locate one and sets an - * event listener if found. - * @private - */ - _initializeInput() { - if (this.optionsStore.element.tagName == 'INPUT') { - this.optionsStore.input = this.optionsStore.element; - } - else { - let query = this.optionsStore.element.dataset.tdTargetInput; - if (query == undefined || query == 'nearest') { - this.optionsStore.input = - this.optionsStore.element.querySelector('input'); - } - else { - this.optionsStore.input = - this.optionsStore.element.querySelector(query); - } - } - if (!this.optionsStore.input) - return; - this.optionsStore.input.addEventListener('change', this._inputChangeEvent); - if (this.optionsStore.options.allowInputToggle) { - this.optionsStore.input.addEventListener('click', this._toggleClickEvent); - } - if (this.optionsStore.input.value) { - this._inputChangeEvent(); - } - } - /** - * Attempts to locate a toggle for the picker and sets an event listener - * @private - */ - _initializeToggle() { - if (this.optionsStore.options.display.inline) - return; - let query = this.optionsStore.element.dataset.tdTargetToggle; - if (query == 'nearest') { - query = '[data-td-toggle="datetimepicker"]'; - } - this._toggle = - query == undefined - ? this.optionsStore.element - : this.optionsStore.element.querySelector(query); - this._toggle.addEventListener('click', this._toggleClickEvent); - } - /** - * If the option is enabled this will render the clock view after a date pick. - * @param e change event - * @private - */ - _handleAfterChangeEvent(e) { - var _a, _b; - if ( - // options is disabled - !this.optionsStore.options.promptTimeOnDateChange || - this.optionsStore.options.display.inline || - this.optionsStore.options.display.sideBySide || - // time is disabled - !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))) - return; - // First time ever. If useCurrent option is set to true (default), do nothing - // because the first date is selected automatically. - // or date didn't change (time did) or date changed because time did. - if ((!e.oldDate && this.optionsStore.options.useCurrent) || - (e.oldDate && ((_b = e.date) === null || _b === void 0 ? void 0 : _b.isSame(e.oldDate)))) { - return; - } - clearTimeout(this._currentPromptTimeTimeout); - this._currentPromptTimeTimeout = setTimeout(() => { - if (this.display.widget) { - this._eventEmitters.action.emit({ - e: { - currentTarget: this.display.widget.querySelector(`.${Namespace.css.switch} div`), - }, - action: ActionTypes$1.togglePicker, - }); - } - }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay); - } - } - /** - * Whenever a locale is loaded via a plugin then store it here based on the - * locale name. E.g. loadedLocales['ru'] - */ - const loadedLocales = {}; - // noinspection JSUnusedGlobalSymbols - /** - * Called from a locale plugin. - * @param l locale object for localization options - */ - const loadLocale = (l) => { - if (loadedLocales[l.name]) - return; - loadedLocales[l.name] = l.localization; - }; - /** - * A sets the global localization options to the provided locale name. - * `loadLocale` MUST be called first. - * @param l - */ - const locale = (l) => { - let asked = loadedLocales[l]; - if (!asked) - return; - DefaultOptions.localization = asked; - }; - // noinspection JSUnusedGlobalSymbols - /** - * Called from a plugin to extend or override picker defaults. - * @param plugin - * @param option - */ - const extend = function (plugin, option) { - if (!plugin) - return tempusDominus; - if (!plugin.installed) { - // install plugin only once - plugin(option, { TempusDominus, Dates, Display, DateTime, ErrorMessages }, tempusDominus); - plugin.installed = true; - } - return tempusDominus; - }; - const version = '6.1.2'; - const tempusDominus = { - TempusDominus, - extend, - loadLocale, - locale, - Namespace, - DefaultOptions, - DateTime, - Unit: exports.Unit, - version - }; - - exports.DateTime = DateTime; - exports.DefaultOptions = DefaultOptions; - exports.Namespace = Namespace; - exports.TempusDominus = TempusDominus; - exports.extend = extend; - exports.loadLocale = loadLocale; - exports.locale = locale; - exports.version = version; - - Object.defineProperty(exports, '__esModule', { value: true }); + Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=tempus-dominus.js.map diff --git a/dist/js/tempus-dominus.js.map b/dist/js/tempus-dominus.js.map index 797c32c1c..8b16b53ef 100644 --- a/dist/js/tempus-dominus.js.map +++ b/dist/js/tempus-dominus.js.map @@ -1 +1 @@ -{"version":3,"file":"tempus-dominus.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/js/datetime.ts","../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/service-locator.ts","../../src/js/utilities/calendar-modes.ts","../../src/js/utilities/optionsStore.ts","../../src/js/validation.ts","../../src/js/utilities/event-emitter.ts","../../src/js/utilities/default-options.ts","../../src/js/utilities/optionConverter.ts","../../src/js/dates.ts","../../src/js/utilities/action-types.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.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/collapse.ts","../../src/js/display/index.ts","../../src/js/actions.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export enum Unit {\r\n seconds = 'seconds',\r\n minutes = 'minutes',\r\n hours = 'hours',\r\n date = 'date',\r\n month = 'month',\r\n year = 'year',\r\n}\r\n\r\nconst twoDigitTemplate = {\r\n month: '2-digit',\r\n day: '2-digit',\r\n year: 'numeric',\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n second: '2-digit',\r\n hour12: true,\r\n}\r\n\r\nconst twoDigitTwentyFourTemplate = {\r\n hour: '2-digit',\r\n hour12: false\r\n}\r\n\r\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\r\n timeStyle?: 'short' | 'medium' | 'long';\r\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\r\n numberingSystem?: string;\r\n}\r\n\r\nexport const getFormatByUnit = (unit: Unit): object => {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric'\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n};\r\n\r\n/**\r\n * For the most part this object behaves exactly the same way\r\n * as the native Date object with a little extra spice.\r\n */\r\nexport class DateTime extends Date {\r\n /**\r\n * Used with Intl.DateTimeFormat\r\n */\r\n locale = 'default';\r\n\r\n /**\r\n * Chainable way to set the {@link locale}\r\n * @param value\r\n */\r\n setLocale(value: string): this {\r\n this.locale = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts a plain JS date object to a DateTime object.\r\n * Doing this allows access to format, etc.\r\n * @param date\r\n * @param locale\r\n */\r\n static convert(date: Date, locale: string = 'default'): DateTime {\r\n if (!date) throw new Error(`A date is required`);\r\n return new DateTime(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n ).setLocale(locale);\r\n }\r\n\r\n /**\r\n * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates.\r\n * @param input\r\n * @param localization\r\n */\r\n static fromString(input: string, localization: any): DateTime {\r\n return new DateTime(input);\r\n }\r\n\r\n /**\r\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\r\n */\r\n get clone() {\r\n return new DateTime(\r\n this.year,\r\n this.month,\r\n this.date,\r\n this.hours,\r\n this.minutes,\r\n this.seconds,\r\n this.getMilliseconds()\r\n ).setLocale(this.locale);\r\n }\r\n\r\n /**\r\n * Sets the current date to the start of the {@link unit} provided\r\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')\r\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\r\n * @param unit\r\n * @param startOfTheWeek Allows for the changing the start of the week.\r\n */\r\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(0);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(0, 0);\r\n break;\r\n case 'hours':\r\n this.setMinutes(0, 0, 0);\r\n break;\r\n case 'date':\r\n this.setHours(0, 0, 0, 0);\r\n break;\r\n case 'weekDay':\r\n this.startOf(Unit.date);\r\n if (this.weekDay === startOfTheWeek) break;\r\n let goBack = this.weekDay;\r\n if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek;\r\n this.manipulate(startOfTheWeek - goBack, Unit.date);\r\n break;\r\n case 'month':\r\n this.startOf(Unit.date);\r\n this.setDate(1);\r\n break;\r\n case 'year':\r\n this.startOf(Unit.date);\r\n this.setMonth(0, 1);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the current date to the end of the {@link unit} provided\r\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')\r\n * would return April 30, 2021, 11:59:59.999 PM\r\n * @param unit\r\n * @param startOfTheWeek\r\n */\r\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(999);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(59, 999);\r\n break;\r\n case 'hours':\r\n this.setMinutes(59, 59, 999);\r\n break;\r\n case 'date':\r\n this.setHours(23, 59, 59, 999);\r\n break;\r\n case 'weekDay':\r\n this.endOf(Unit.date);\r\n this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date);\r\n break;\r\n case 'month':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.month);\r\n this.setDate(0);\r\n break;\r\n case 'year':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.year);\r\n this.setDate(0);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Change a {@link unit} value. Value can be positive or negative\r\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')\r\n * would return May 30, 2021, 11:45:32.984 AM\r\n * @param value A positive or negative number\r\n * @param unit\r\n */\r\n manipulate(value: number, unit: Unit): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n this[unit] += value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a string format.\r\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\r\n * for valid templates and locale objects\r\n * @param template An object. Uses browser defaults otherwise.\r\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\r\n */\r\n format(template: DateTimeFormatOptions, locale = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, template).format(this);\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is before this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isBefore(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() < compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is after this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isAfter(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() > compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is same this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isSame(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() === compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n compare = DateTime.convert(compare);\r\n return (\r\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\r\n * @param left\r\n * @param right\r\n * @param unit.\r\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\r\n * If the inclusivity parameter is used, both indicators must be passed.\r\n */\r\n isBetween(\r\n left: DateTime,\r\n right: DateTime,\r\n unit?: Unit,\r\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\r\n ): boolean {\r\n if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n const leftInclusivity = inclusivity[0] === '(';\r\n const rightInclusivity = inclusivity[1] === ')';\r\n\r\n return (\r\n ((leftInclusivity\r\n ? this.isAfter(left, unit)\r\n : !this.isBefore(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isBefore(right, unit)\r\n : !this.isAfter(right, unit))) ||\r\n ((leftInclusivity\r\n ? this.isBefore(left, unit)\r\n : !this.isAfter(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isAfter(right, unit)\r\n : !this.isBefore(right, unit)))\r\n );\r\n }\r\n\r\n /**\r\n * Returns flattened object of the date. Does not include literals\r\n * @param locale\r\n * @param template\r\n */\r\n parts(\r\n locale = this.locale,\r\n template: any = { dateStyle: 'full', timeStyle: 'long' }\r\n ): any {\r\n const parts = {};\r\n new Intl.DateTimeFormat(locale, template)\r\n .formatToParts(this)\r\n .filter((x) => x.type !== 'literal')\r\n .forEach((x) => (parts[x.type] = x.value));\r\n return parts;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getSeconds()\r\n */\r\n get seconds(): number {\r\n return this.getSeconds();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setSeconds()\r\n */\r\n set seconds(value: number) {\r\n this.setSeconds(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get secondsFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).second;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMinutes()\r\n */\r\n get minutes(): number {\r\n return this.getMinutes();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMinutes()\r\n */\r\n set minutes(value: number) {\r\n this.setMinutes(value);\r\n }\r\n\r\n /**\r\n * Returns two digit minutes\r\n */\r\n get minutesFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).minute;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getHours()\r\n */\r\n get hours(): number {\r\n return this.getHours();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setHours()\r\n */\r\n set hours(value: number) {\r\n this.setHours(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get hoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTwentyFourTemplate).hour;\r\n }\r\n\r\n /**\r\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\r\n */\r\n get twelveHoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).hour;\r\n }\r\n\r\n /**\r\n * Get the meridiem of the date. E.g. AM or PM.\r\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\r\n * otherwise it will return AM or PM.\r\n * @param locale\r\n */\r\n meridiem(locale: string = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, {\r\n hour: 'numeric',\r\n hour12: true\r\n } as any)\r\n .formatToParts(this)\r\n .find((p) => p.type === 'dayPeriod')?.value;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDate()\r\n */\r\n get date(): number {\r\n return this.getDate();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setDate()\r\n */\r\n set date(value: number) {\r\n this.setDate(value);\r\n }\r\n\r\n /**\r\n * Return two digit date\r\n */\r\n get dateFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).day;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDay()\r\n */\r\n get weekDay(): number {\r\n return this.getDay();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMonth()\r\n */\r\n get month(): number {\r\n return this.getMonth();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMonth()\r\n */\r\n set month(value: number) {\r\n const targetMonth = new Date(this.year, value + 1);\r\n targetMonth.setDate(0);\r\n const endOfMonth = targetMonth.getDate();\r\n if (this.date > endOfMonth) {\r\n this.date = endOfMonth;\r\n }\r\n this.setMonth(value);\r\n }\r\n\r\n /**\r\n * Return two digit, human expected month. E.g. January = 1, December = 12\r\n */\r\n get monthFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).month;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getFullYear()\r\n */\r\n get year(): number {\r\n return this.getFullYear();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setFullYear()\r\n */\r\n set year(value: number) {\r\n this.setFullYear(value);\r\n }\r\n\r\n // borrowed a bunch of stuff from Luxon\r\n /**\r\n * Gets the week of the year\r\n */\r\n get week(): number {\r\n const ordinal = this.computeOrdinal(),\r\n weekday = this.getUTCDay();\r\n\r\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\r\n\r\n if (weekNumber < 1) {\r\n weekNumber = this.weeksInWeekYear(this.year - 1);\r\n } else if (weekNumber > this.weeksInWeekYear(this.year)) {\r\n weekNumber = 1;\r\n }\r\n\r\n return weekNumber;\r\n }\r\n\r\n weeksInWeekYear(weekYear) {\r\n const p1 =\r\n (weekYear +\r\n Math.floor(weekYear / 4) -\r\n Math.floor(weekYear / 100) +\r\n Math.floor(weekYear / 400)) %\r\n 7,\r\n last = weekYear - 1,\r\n p2 =\r\n (last +\r\n Math.floor(last / 4) -\r\n Math.floor(last / 100) +\r\n Math.floor(last / 400)) %\r\n 7;\r\n return p1 === 4 || p2 === 3 ? 53 : 52;\r\n }\r\n\r\n get isLeapYear() {\r\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\r\n }\r\n\r\n private computeOrdinal() {\r\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\r\n }\r\n\r\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\r\n}\r\n","export class TdError extends Error {\r\n code: number;\r\n}\r\n\r\nexport class ErrorMessages {\r\n private base = 'TD:';\r\n\r\n //#region out to console\r\n\r\n /**\r\n * Throws an error indicating that a key in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOption(optionName: string) {\r\n const error = new TdError(\r\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\r\n );\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error indicating that one more keys in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOptions(optionName: string[]) {\r\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option is provide an unsupported value.\r\n * For example a value of 'cheese' for toolbarPlacement which only supports\r\n * 'top', 'bottom', 'default'.\r\n * @param optionName\r\n * @param badValue\r\n * @param validOptions\r\n */\r\n unexpectedOptionValue(\r\n optionName: string,\r\n badValue: string,\r\n validOptions: string[]\r\n ) {\r\n const error = new TdError(\r\n `${\r\n this.base\r\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\r\n ', '\r\n )}`\r\n );\r\n error.code = 2;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is the wrong type.\r\n * For example a string value was provided to multipleDates which only\r\n * supports true or false.\r\n * @param optionName\r\n * @param badType\r\n * @param expectedType\r\n */\r\n typeMismatch(optionName: string, badType: string, expectedType: string) {\r\n const error = new TdError(\r\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\r\n );\r\n error.code = 3;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is outside of the expected range.\r\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\r\n * @param optionName\r\n * @param lower\r\n * @param upper\r\n */\r\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\r\n const error = new TdError(\r\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\r\n );\r\n error.code = 4;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when a value for a date options couldn't be parsed. Either\r\n * the option was an invalid string or an invalid Date object.\r\n * @param optionName\r\n * @param date\r\n * @param soft If true, logs a warning instead of an error.\r\n */\r\n failedToParseDate(optionName: string, date: any, soft = false) {\r\n const error = new TdError(\r\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\r\n );\r\n error.code = 5;\r\n if (!soft) throw error;\r\n console.warn(error);\r\n }\r\n\r\n /**\r\n * Throws when an element to attach to was not provided in the constructor.\r\n */\r\n mustProvideElement() {\r\n const error = new TdError(`${this.base} No element was provided.`);\r\n error.code = 6;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if providing an array for the events to subscribe method doesn't have\r\n * the same number of callbacks. E.g., subscribe([1,2], [1])\r\n */\r\n subscribeMismatch() {\r\n const error = new TdError(\r\n `${this.base} The subscribed events does not match the number of callbacks`\r\n );\r\n error.code = 7;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\r\n */\r\n conflictingConfiguration(message?: string) {\r\n const error = new TdError(\r\n `${this.base} A configuration value conflicts with another rule. ${message}`\r\n );\r\n error.code = 8;\r\n throw error;\r\n }\r\n\r\n /**\r\n * customDateFormat errors\r\n */\r\n customDateFormatError(message?: string) {\r\n const error = new TdError(\r\n `${this.base} customDateFormat: ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Logs a warning if a date option value is provided as a string, instead of\r\n * a date/datetime object.\r\n */\r\n dateString() {\r\n console.warn(\r\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`\r\n );\r\n }\r\n\r\n throwError(message) {\r\n const error = new TdError(\r\n `${this.base} ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region used with notify.error\r\n\r\n /**\r\n * Used with an Error Event type if the user selects a date that\r\n * fails restriction validation.\r\n */\r\n failedToSetInvalidDate = 'Failed to set invalid date';\r\n\r\n /**\r\n * Used with an Error Event type when a user changes the value of the\r\n * input field directly, and does not provide a valid date.\r\n */\r\n failedToParseInput = 'Failed parse input field';\r\n\r\n //#endregion\r\n}\r\n","import { ErrorMessages } from './errors';\r\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\r\nconst NAME = 'tempus-dominus',\r\n dataKey = 'td';\r\n\r\n/**\r\n * Events\r\n */\r\nclass Events {\r\n key = `.${dataKey}`;\r\n\r\n /**\r\n * Change event. Fired when the user selects a date.\r\n * See also EventTypes.ChangeEvent\r\n */\r\n change = `change${this.key}`;\r\n\r\n /**\r\n * Emit when the view changes for example from month view to the year view.\r\n * See also EventTypes.ViewUpdateEvent\r\n */\r\n update = `update${this.key}`;\r\n\r\n /**\r\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\r\n * See also EventTypes.FailEvent\r\n */\r\n error = `error${this.key}`;\r\n\r\n /**\r\n * Show event\r\n * @event Events#show\r\n */\r\n show = `show${this.key}`;\r\n\r\n /**\r\n * Hide event\r\n * @event Events#hide\r\n */\r\n hide = `hide${this.key}`;\r\n\r\n // blur and focus are used in the jQuery provider but are otherwise unused.\r\n // keyup/down will be used later for keybinding options\r\n\r\n blur = `blur${this.key}`;\r\n focus = `focus${this.key}`;\r\n keyup = `keyup${this.key}`;\r\n keydown = `keydown${this.key}`;\r\n}\r\n\r\nclass Css {\r\n /**\r\n * The outer element for the widget.\r\n */\r\n widget = `${NAME}-widget`;\r\n\r\n /**\r\n * Hold the previous, next and switcher divs\r\n */\r\n calendarHeader = 'calendar-header';\r\n\r\n /**\r\n * The element for the action to change the calendar view. E.g. month -> year.\r\n */\r\n switch = 'picker-switch';\r\n\r\n /**\r\n * The elements for all the toolbar options\r\n */\r\n toolbar = 'toolbar';\r\n\r\n /**\r\n * Disables the hover and rounding affect.\r\n */\r\n noHighlight = 'no-highlight';\r\n\r\n /**\r\n * Applied to the widget element when the side by side option is in use.\r\n */\r\n sideBySide = 'timepicker-sbs';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> July\r\n */\r\n previous = 'previous';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> September\r\n */\r\n next = 'next';\r\n\r\n /**\r\n * Applied to any action that would violate any restriction options. ALso applied\r\n * to an input field if the disabled function is called.\r\n */\r\n disabled = 'disabled';\r\n\r\n /**\r\n * Applied to any date that is less than requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n old = 'old';\r\n\r\n /**\r\n * Applied to any date that is greater than of requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n new = 'new';\r\n\r\n /**\r\n * Applied to any date that is currently selected.\r\n */\r\n active = 'active';\r\n\r\n //#region date element\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n dateContainer = 'date-container';\r\n\r\n /**\r\n * The outer element for the decades view.\r\n */\r\n decadesContainer = `${this.dateContainer}-decades`;\r\n\r\n /**\r\n * Applied to elements within the decades container, e.g. 2020, 2030\r\n */\r\n decade = 'decade';\r\n\r\n /**\r\n * The outer element for the years view.\r\n */\r\n yearsContainer = `${this.dateContainer}-years`;\r\n\r\n /**\r\n * Applied to elements within the years container, e.g. 2021, 2021\r\n */\r\n year = 'year';\r\n\r\n /**\r\n * The outer element for the month view.\r\n */\r\n monthsContainer = `${this.dateContainer}-months`;\r\n\r\n /**\r\n * Applied to elements within the month container, e.g. January, February\r\n */\r\n month = 'month';\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n daysContainer = `${this.dateContainer}-days`;\r\n\r\n /**\r\n * Applied to elements within the day container, e.g. 1, 2..31\r\n */\r\n day = 'day';\r\n\r\n /**\r\n * If display.calendarWeeks is enabled, a column displaying the week of year\r\n * is shown. This class is applied to each cell in that column.\r\n */\r\n calendarWeeks = 'cw';\r\n\r\n /**\r\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\r\n */\r\n dayOfTheWeek = 'dow';\r\n\r\n /**\r\n * Applied to the current date on the calendar view.\r\n */\r\n today = 'today';\r\n\r\n /**\r\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\r\n */\r\n weekend = 'weekend';\r\n\r\n //#endregion\r\n\r\n //#region time element\r\n\r\n /**\r\n * The outer element for all time related elements.\r\n */\r\n timeContainer = 'time-container';\r\n\r\n /**\r\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\r\n */\r\n separator = 'separator';\r\n\r\n /**\r\n * The outer element for the clock view.\r\n */\r\n clockContainer = `${this.timeContainer}-clock`;\r\n\r\n /**\r\n * The outer element for the hours selection view.\r\n */\r\n hourContainer = `${this.timeContainer}-hour`;\r\n\r\n /**\r\n * The outer element for the minutes selection view.\r\n */\r\n minuteContainer = `${this.timeContainer}-minute`;\r\n\r\n /**\r\n * The outer element for the seconds selection view.\r\n */\r\n secondContainer = `${this.timeContainer}-second`;\r\n\r\n /**\r\n * Applied to each element in the hours selection view.\r\n */\r\n hour = 'hour';\r\n\r\n /**\r\n * Applied to each element in the minutes selection view.\r\n */\r\n minute = 'minute';\r\n\r\n /**\r\n * Applied to each element in the seconds selection view.\r\n */\r\n second = 'second';\r\n\r\n /**\r\n * Applied AM/PM toggle button.\r\n */\r\n toggleMeridiem = 'toggleMeridiem';\r\n\r\n //#endregion\r\n\r\n //#region collapse\r\n\r\n /**\r\n * Applied the element of the current view mode, e.g. calendar or clock.\r\n */\r\n show = 'show';\r\n\r\n /**\r\n * Applied to the currently showing view mode during a transition\r\n * between calendar and clock views\r\n */\r\n collapsing = 'td-collapsing';\r\n\r\n /**\r\n * Applied to the currently hidden view mode.\r\n */\r\n collapse = 'td-collapse';\r\n\r\n //#endregion\r\n\r\n /**\r\n * Applied to the widget when the option display.inline is enabled.\r\n */\r\n inline = 'inline';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is light.\r\n */\r\n lightTheme = 'light';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is dark.\r\n */\r\n darkTheme = 'dark';\r\n\r\n /**\r\n * Used for detecting if the system color preference is dark mode\r\n */\r\n isDarkPreferredQuery = '(prefers-color-scheme: dark)';\r\n}\r\n\r\nexport default class Namespace {\r\n static NAME = NAME;\r\n // noinspection JSUnusedGlobalSymbols\r\n static dataKey = dataKey;\r\n\r\n static events = new Events();\r\n\r\n static css = new Css();\r\n\r\n static errorMessages = new ErrorMessages();\r\n}\r\n","export declare type Constructable = new (...args: any[]) => T;\r\n\r\nclass ServiceLocator {\r\n private cache: Map, unknown | Symbol> = new Map();\r\n\r\n locate(identifier: Constructable): T {\r\n const service = this.cache.get(identifier);\r\n if (service) return service as T;\r\n const value = new identifier();\r\n this.cache.set(identifier, value);\r\n return value;\r\n }\r\n}\r\nexport const setupServiceLocator = () => {\r\n serviceLocator = new ServiceLocator();\r\n}\r\n\r\nexport let serviceLocator: ServiceLocator;\r\n","import { Unit } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\n\nconst CalendarModes: {\n name: keyof ViewMode;\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 default CalendarModes;\n","import {DateTime} from \"../datetime\";\r\nimport CalendarModes from \"./calendar-modes\";\r\nimport ViewMode from \"./view-mode\";\r\nimport Options from \"./options\";\r\n\r\nexport class OptionsStore {\r\n options: Options;\r\n element: HTMLElement;\r\n viewDate = new DateTime();\r\n input: HTMLInputElement;\r\n unset: boolean;\r\n private _currentCalendarViewMode = 0;\r\n get currentCalendarViewMode() {\r\n return this._currentCalendarViewMode;\r\n }\r\n\r\n set currentCalendarViewMode(value) {\r\n this._currentCalendarViewMode = value;\r\n this.currentView = CalendarModes[value].name;\r\n }\r\n\r\n /**\r\n * When switching back to the calendar from the clock,\r\n * this sets currentView to the correct calendar view.\r\n */\r\n refreshCurrentView() {\r\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\r\n }\r\n\r\n minimumCalendarViewMode = 0;\r\n currentView: keyof ViewMode = 'calendar';\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\n\r\n/**\r\n * Main class for date validation rules based on the options provided.\r\n */\r\nexport default class Validation {\r\n private optionsStore: OptionsStore;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n }\r\n\r\n /**\r\n * Checks to see if the target date is valid based on the rules provided in the options.\r\n * Granularity can be provided to check portions of the date instead of the whole.\r\n * @param targetDate\r\n * @param granularity\r\n */\r\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\r\n if (\r\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\r\n this._isInDisabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\r\n !this._isInEnabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n granularity !== Unit.month &&\r\n granularity !== Unit.year &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\r\n targetDate.weekDay\r\n ) !== -1\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.optionsStore.options.restrictions.minDate &&\r\n targetDate.isBefore(\r\n this.optionsStore.options.restrictions.minDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.maxDate &&\r\n targetDate.isAfter(\r\n this.optionsStore.options.restrictions.maxDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n granularity === Unit.hours ||\r\n granularity === Unit.minutes ||\r\n granularity === Unit.seconds\r\n ) {\r\n if (\r\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\r\n this._isInDisabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\r\n !this._isInEnabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0\r\n ) {\r\n for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) {\r\n if (\r\n targetDate.isBetween(\r\n disabledTimeIntervals.from,\r\n disabledTimeIntervals.to\r\n )\r\n )\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledDates ||\r\n this.optionsStore.options.restrictions.disabledDates.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.disabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledDates ||\r\n this.optionsStore.options.restrictions.enabledDates.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.enabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledHours ||\r\n this.optionsStore.options.restrictions.disabledHours.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.disabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledHours ||\r\n this.optionsStore.options.restrictions.enabledHours.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.enabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n}\r\n","import { Unit } from '../datetime';\r\nimport ActionTypes from './action-types';\r\nimport { BaseEvent } from './event-types';\r\n\r\nexport type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all';\r\n\r\nexport class EventEmitter {\r\n private subscribers: ((value?: T) => void)[] = [];\r\n\r\n subscribe(callback: (value: T) => void) {\r\n this.subscribers.push(callback);\r\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\r\n }\r\n\r\n unsubscribe(index: number) {\r\n this.subscribers.splice(index, 1);\r\n }\r\n\r\n emit(value?: T) {\r\n this.subscribers.forEach((callback) => {\r\n callback(value);\r\n });\r\n }\r\n\r\n destroy() {\r\n this.subscribers = null;\r\n this.subscribers = [];\r\n }\r\n}\r\n\r\nexport class EventEmitters {\r\n triggerEvent = new EventEmitter();\r\n viewUpdate = new EventEmitter();\r\n updateDisplay = new EventEmitter();\r\n action = new EventEmitter<{ e: any; action?: ActionTypes }>();\r\n\r\n destroy() {\r\n this.triggerEvent.destroy();\r\n this.viewUpdate.destroy();\r\n this.updateDisplay.destroy();\r\n this.action.destroy();\r\n }\r\n}\r\n","import Options from './options';\r\nimport { DateTime } from '../datetime';\r\n\r\nconst DefaultOptions: Options = {\r\n restrictions: {\r\n minDate: undefined,\r\n maxDate: undefined,\r\n disabledDates: [],\r\n enabledDates: [],\r\n daysOfWeekDisabled: [],\r\n disabledTimeIntervals: [],\r\n disabledHours: [],\r\n enabledHours: []\r\n },\r\n display: {\r\n icons: {\r\n type: 'icons',\r\n time: 'fa-solid fa-clock',\r\n date: 'fa-solid fa-calendar',\r\n up: 'fa-solid fa-arrow-up',\r\n down: 'fa-solid fa-arrow-down',\r\n previous: 'fa-solid fa-chevron-left',\r\n next: 'fa-solid fa-chevron-right',\r\n today: 'fa-solid fa-calendar-check',\r\n clear: 'fa-solid fa-trash',\r\n close: 'fa-solid fa-xmark'\r\n },\r\n sideBySide: false,\r\n calendarWeeks: false,\r\n viewMode: 'calendar',\r\n toolbarPlacement: 'bottom',\r\n keepOpen: false,\r\n buttons: {\r\n today: false,\r\n clear: false,\r\n close: false\r\n },\r\n components: {\r\n calendar: true,\r\n date: true,\r\n month: true,\r\n year: true,\r\n decades: true,\r\n clock: true,\r\n hours: true,\r\n minutes: true,\r\n seconds: false,\r\n useTwentyfourHour: undefined\r\n },\r\n inline: false,\r\n theme: 'auto'\r\n },\r\n stepping: 1,\r\n useCurrent: true,\r\n defaultDate: undefined,\r\n localization: {\r\n today: 'Go to today',\r\n clear: 'Clear selection',\r\n close: 'Close the picker',\r\n selectMonth: 'Select Month',\r\n previousMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n selectYear: 'Select Year',\r\n previousYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n selectDecade: 'Select Decade',\r\n previousDecade: 'Previous Decade',\r\n nextDecade: 'Next Decade',\r\n previousCentury: 'Previous Century',\r\n nextCentury: 'Next Century',\r\n pickHour: 'Pick Hour',\r\n incrementHour: 'Increment Hour',\r\n decrementHour: 'Decrement Hour',\r\n pickMinute: 'Pick Minute',\r\n incrementMinute: 'Increment Minute',\r\n decrementMinute: 'Decrement Minute',\r\n pickSecond: 'Pick Second',\r\n incrementSecond: 'Increment Second',\r\n decrementSecond: 'Decrement Second',\r\n toggleMeridiem: 'Toggle Meridiem',\r\n selectTime: 'Select Time',\r\n selectDate: 'Select Date',\r\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\r\n locale: 'default',\r\n startOfTheWeek: 0,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n dateFormats: {\r\n LTS: 'h:mm:ss T',\r\n LT: 'h:mm T',\r\n L: 'MM/dd/yyyy',\r\n LL: 'MMMM d, yyyy',\r\n LLL: 'MMMM d, yyyy h:mm T',\r\n LLLL: 'dddd, MMMM d, yyyy h:mm T',\r\n },\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n ordinal: (n) => n,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n format: 'L'\r\n },\r\n keepInvalid: false,\r\n debug: false,\r\n allowInputToggle: false,\r\n viewDate: new DateTime(),\r\n multipleDates: false,\r\n multipleDatesSeparator: '; ',\r\n promptTimeOnDateChange: false,\r\n promptTimeOnDateChangeTransitionDelay: 200,\r\n meta: {},\r\n container: undefined\r\n};\r\n\r\nexport default DefaultOptions;\r\n","import Namespace from './namespace';\r\nimport { DateTime } from '../datetime';\r\nimport DefaultOptions from './default-options';\r\nimport Options, { FormatLocalization } from './options';\r\n\r\nexport class OptionConverter {\r\n\r\n private static ignoreProperties = ['meta', 'dayViewHeaderFormat',\r\n 'container', 'dateForms', 'ordinal'];\r\n\r\n static deepCopy(input): Options {\r\n const o = {};\r\n\r\n Object.keys(input).forEach((key) => {\r\n const inputElement = input[key];\r\n o[key] = inputElement;\r\n if (typeof inputElement !== 'object' ||\r\n inputElement instanceof HTMLElement ||\r\n inputElement instanceof Element ||\r\n inputElement instanceof Date) return;\r\n if (!Array.isArray(inputElement)) {\r\n o[key] = OptionConverter.deepCopy(inputElement);\r\n }\r\n });\r\n\r\n return o;\r\n }\r\n\r\n private static isValue = a => a != null; // everything except undefined + null\r\n\r\n /**\r\n * Finds value out of an object based on a string, period delimited, path\r\n * @param paths\r\n * @param obj\r\n */\r\n static objectPath(paths: string, obj) {\r\n if (paths.charAt(0) === '.')\r\n paths = paths.slice(1);\r\n if (!paths) return obj;\r\n return paths.split('.')\r\n .reduce((value, key) => (OptionConverter.isValue(value) || OptionConverter.isValue(value[key]) ?\r\n value[key] :\r\n undefined), obj);\r\n }\r\n\r\n /**\r\n * The spread operator caused sub keys to be missing after merging.\r\n * This is to fix that issue by using spread on the child objects first.\r\n * Also handles complex options like disabledDates\r\n * @param provided An option from new providedOptions\r\n * @param copyTo Destination object. This was added to prevent reference copies\r\n * @param path\r\n * @param localization\r\n */\r\n static spread(provided, copyTo, path = '', localization: FormatLocalization) {\r\n const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);\r\n\r\n const unsupportedOptions = Object.keys(provided).filter(\r\n (x) => !Object.keys(defaultOptions).includes(x)\r\n );\r\n\r\n if (unsupportedOptions.length > 0) {\r\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\r\n\r\n const errors = unsupportedOptions.map((x) => {\r\n let error = `\"${path}.${x}\" in not a known option.`;\r\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\r\n if (didYouMean) error += ` Did you mean \"${didYouMean}\"?`;\r\n return error;\r\n });\r\n Namespace.errorMessages.unexpectedOptions(errors);\r\n }\r\n\r\n Object.keys(provided).filter(key => key !== '__proto__' && key !== 'constructor').forEach((key) => {\r\n path += `.${key}`;\r\n if (path.charAt(0) === '.') path = path.slice(1);\r\n\r\n const defaultOptionValue = defaultOptions[key];\r\n let providedType = typeof provided[key];\r\n let defaultType = typeof defaultOptionValue;\r\n let value = provided[key];\r\n\r\n if (value === undefined || value === null) {\r\n copyTo[key] = value;\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n return;\r\n }\r\n\r\n if (typeof defaultOptionValue === 'object' &&\r\n !Array.isArray(provided[key]) &&\r\n !(defaultOptionValue instanceof Date || OptionConverter.ignoreProperties.includes(key))) {\r\n OptionConverter.spread(provided[key], copyTo[key], path, localization);\r\n } else {\r\n copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization);\r\n }\r\n\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n });\r\n }\r\n\r\n static processKey(key, value, providedType, defaultType, path, localization: FormatLocalization) {\r\n switch (key) {\r\n case 'defaultDate': {\r\n const dateTime = this.dateConversion(value, 'defaultDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'defaultDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'viewDate': {\r\n const dateTime = this.dateConversion(value, 'viewDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'viewDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'minDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.minDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.minDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'maxDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.maxDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.maxDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'disabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.disabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.disabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'enabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.enabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.enabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'daysOfWeekDisabled':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.daysOfWeekDisabled',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 6).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.daysOfWeekDisabled',\r\n 0,\r\n 6\r\n );\r\n return value;\r\n case 'enabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.enabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.disabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledTimeIntervals':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n key,\r\n providedType,\r\n 'array of { from: DateTime|Date, to: DateTime|Date }'\r\n );\r\n }\r\n const valueObject = value as { from: any; to: any }[];\r\n for (let i = 0; i < valueObject.length; i++) {\r\n Object.keys(valueObject[i]).forEach((vk) => {\r\n const subOptionName = `${key}[${i}].${vk}`;\r\n let d = valueObject[i][vk];\r\n const dateTime = this.dateConversion(d, subOptionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n subOptionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization.locale);\r\n valueObject[i][vk] = dateTime;\r\n });\r\n }\r\n return valueObject;\r\n case 'toolbarPlacement':\r\n case 'type':\r\n case 'viewMode':\r\n case 'theme':\r\n const optionValues = {\r\n toolbarPlacement: ['top', 'bottom', 'default'],\r\n type: ['icons', 'sprites'],\r\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\r\n theme: ['light', 'dark', 'auto']\r\n };\r\n const keyOptions = optionValues[key];\r\n if (!keyOptions.includes(value))\r\n Namespace.errorMessages.unexpectedOptionValue(\r\n path.substring(1),\r\n value,\r\n keyOptions\r\n );\r\n\r\n return value;\r\n case 'meta':\r\n case 'dayViewHeaderFormat':\r\n return value;\r\n case 'container':\r\n if (\r\n value &&\r\n !(\r\n value instanceof HTMLElement ||\r\n value instanceof Element ||\r\n value?.appendChild\r\n )\r\n ) {\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n typeof value,\r\n 'HTMLElement'\r\n );\r\n }\r\n return value;\r\n case 'useTwentyfourHour':\r\n if (value === undefined || providedType === 'boolean') return value;\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n break;\r\n default:\r\n switch (defaultType) {\r\n case 'boolean':\r\n return value === 'true' || value === true;\r\n case 'number':\r\n return +value;\r\n case 'string':\r\n return value.toString();\r\n case 'object':\r\n return {};\r\n case 'function':\r\n return value;\r\n default:\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n }\r\n }\r\n }\r\n\r\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\r\n const newConfig = OptionConverter.deepCopy(mergeTo);\r\n //see if the options specify a locale\r\n const localization =\r\n mergeTo.localization?.locale !== 'default'\r\n ? mergeTo.localization\r\n : providedOptions?.localization || DefaultOptions.localization;\r\n\r\n OptionConverter.spread(providedOptions, newConfig, '', localization);\r\n\r\n return newConfig;\r\n }\r\n\r\n static _dataToOptions(element, options: Options): Options {\r\n const eData = JSON.parse(JSON.stringify(element.dataset));\r\n\r\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\r\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\r\n\r\n if (\r\n !eData ||\r\n Object.keys(eData).length === 0 ||\r\n eData.constructor !== DOMStringMap\r\n )\r\n return options;\r\n let dataOptions = {} as Options;\r\n\r\n // because dataset returns camelCase including the 'td' key the option\r\n // key won't align\r\n const objectToNormalized = (object) => {\r\n const lowered = {};\r\n Object.keys(object).forEach((x) => {\r\n lowered[x.toLowerCase()] = x;\r\n });\r\n\r\n return lowered;\r\n };\r\n\r\n const rabbitHole = (\r\n split: string[],\r\n index: number,\r\n optionSubgroup: {},\r\n value: any\r\n ) => {\r\n // first round = display { ... }\r\n const normalizedOptions = objectToNormalized(optionSubgroup);\r\n\r\n const keyOption = normalizedOptions[split[index].toLowerCase()];\r\n const internalObject = {};\r\n\r\n if (keyOption === undefined) return internalObject;\r\n\r\n // if this is another object, continue down the rabbit hole\r\n if (optionSubgroup[keyOption].constructor === Object) {\r\n index++;\r\n internalObject[keyOption] = rabbitHole(\r\n split,\r\n index,\r\n optionSubgroup[keyOption],\r\n value\r\n );\r\n } else {\r\n internalObject[keyOption] = value;\r\n }\r\n return internalObject;\r\n };\r\n const optionsLower = objectToNormalized(options);\r\n\r\n Object.keys(eData)\r\n .filter((x) => x.startsWith(Namespace.dataKey))\r\n .map((x) => x.substring(2))\r\n .forEach((key) => {\r\n let keyOption = optionsLower[key.toLowerCase()];\r\n\r\n // dataset merges dashes to camelCase... yay\r\n // i.e. key = display_components_seconds\r\n if (key.includes('_')) {\r\n // [display, components, seconds]\r\n const split = key.split('_');\r\n // display\r\n keyOption = optionsLower[split[0].toLowerCase()];\r\n if (\r\n keyOption !== undefined &&\r\n options[keyOption].constructor === Object\r\n ) {\r\n dataOptions[keyOption] = rabbitHole(\r\n split,\r\n 1,\r\n options[keyOption],\r\n eData[`td${key}`]\r\n );\r\n }\r\n }\r\n // or key = multipleDate\r\n else if (keyOption !== undefined) {\r\n dataOptions[keyOption] = eData[`td${key}`];\r\n }\r\n });\r\n\r\n return this._mergeOptions(dataOptions, options);\r\n }\r\n\r\n /**\r\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\r\n * @param d If a string will attempt creating a date from it.\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n * @private\r\n */\r\n static _dateTypeCheck(d: any, localization: FormatLocalization): DateTime | null {\r\n if (d.constructor.name === DateTime.name) return d;\r\n if (d.constructor.name === Date.name) {\r\n return DateTime.convert(d);\r\n }\r\n if (typeof d === typeof '') {\r\n const dateTime = DateTime.fromString(d, localization);\r\n if (JSON.stringify(dateTime) === 'null') {\r\n return null;\r\n }\r\n return dateTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of Date or DateTime\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n * @param localization\r\n */\r\n static _typeCheckDateArray(\r\n optionName: string,\r\n value,\r\n providedType: string,\r\n localization: FormatLocalization\r\n ) {\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of DateTime or Date'\r\n );\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n let d = value[i];\r\n const dateTime = this.dateConversion(d, optionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization?.locale ?? 'default');\r\n value[i] = dateTime;\r\n }\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of numbers\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckNumberArray(\r\n optionName: string,\r\n value,\r\n providedType: string\r\n ) {\r\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of numbers'\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to convert `d` to a DateTime object\r\n * @param d value to convert\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n */\r\n static dateConversion(d: any, optionName: string, localization: FormatLocalization): DateTime {\r\n if (typeof d === typeof '' && optionName !== 'input') {\r\n Namespace.errorMessages.dateString();\r\n }\r\n\r\n const converted = this._dateTypeCheck(d, localization);\r\n\r\n if (!converted) {\r\n Namespace.errorMessages.failedToParseDate(\r\n optionName,\r\n d,\r\n optionName === 'input'\r\n );\r\n }\r\n return converted;\r\n }\r\n\r\n private static _flattenDefaults: string[];\r\n\r\n private static getFlattenDefaultOptions(): string[] {\r\n if (this._flattenDefaults) return this._flattenDefaults;\r\n const deepKeys = (t, pre = []) => {\r\n if (Array.isArray(t)) return [];\r\n if (Object(t) === t) {\r\n return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));\r\n } else {\r\n return pre.join('.');\r\n }\r\n };\r\n\r\n this._flattenDefaults = deepKeys(DefaultOptions);\r\n\r\n return this._flattenDefaults;\r\n }\r\n\r\n /**\r\n * Some options conflict like min/max date. Verify that these kinds of options\r\n * are set correctly.\r\n * @param config\r\n */\r\n static _validateConflicts(config: Options) {\r\n if (\r\n config.display.sideBySide &&\r\n (!config.display.components.clock ||\r\n !(\r\n config.display.components.hours ||\r\n config.display.components.minutes ||\r\n config.display.components.seconds\r\n ))\r\n ) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'Cannot use side by side mode without the clock components'\r\n );\r\n }\r\n\r\n if (config.restrictions.minDate && config.restrictions.maxDate) {\r\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'minDate is after maxDate'\r\n );\r\n }\r\n\r\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'maxDate is before minDate'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\r\nimport Validation from './validation';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\n\r\nexport default class Dates {\r\n private _dates: DateTime[] = [];\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n }\r\n\r\n /**\r\n * Returns the array of selected dates\r\n */\r\n get picked(): DateTime[] {\r\n return this._dates;\r\n }\r\n\r\n /**\r\n * Returns the last picked value.\r\n */\r\n get lastPicked(): DateTime {\r\n return this._dates[this.lastPickedIndex];\r\n }\r\n\r\n /**\r\n * Returns the length of picked dates -1 or 0 if none are selected.\r\n */\r\n get lastPickedIndex(): number {\r\n if (this._dates.length === 0) return 0;\r\n return this._dates.length - 1;\r\n }\r\n\r\n /**\r\n * Formats a DateTime object to a string. Used when setting the input value.\r\n * @param date\r\n */\r\n formatInput(date: DateTime): string {\r\n const components = this.optionsStore.options.display.components;\r\n if (!date) return '';\r\n return date.format({\r\n year: components.calendar && components.year ? 'numeric' : undefined,\r\n month: components.calendar && components.month ? '2-digit' : undefined,\r\n day: components.calendar && components.date ? '2-digit' : undefined,\r\n hour:\r\n components.clock && components.hours\r\n ? components.useTwentyfourHour\r\n ? '2-digit'\r\n : 'numeric'\r\n : undefined,\r\n minute: components.clock && components.minutes ? '2-digit' : undefined,\r\n second: components.clock && components.seconds ? '2-digit' : undefined,\r\n hour12: !components.useTwentyfourHour,\r\n });\r\n }\r\n \r\n /**\r\n * parse the value into a DateTime object.\r\n * this can be overwritten to supply your own parsing.\r\n */\r\n parseInput(value:any): DateTime {\r\n return OptionConverter.dateConversion(value, 'input', this.optionsStore.options.localization);\r\n }\r\n\r\n /**\r\n * Tries to convert the provided value to a DateTime object.\r\n * If value is null|undefined then clear the value of the provided index (or 0).\r\n * @param value Value to convert or null|undefined\r\n * @param index When using multidates this is the index in the array\r\n */\r\n setFromInput(value: any, index?: number) {\r\n if (!value) {\r\n this.setValue(undefined, index);\r\n return;\r\n }\r\n const converted = this.parseInput(value);\r\n if (converted) {\r\n converted.setLocale(this.optionsStore.options.localization.locale);\r\n this.setValue(converted, index);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a new DateTime to selected dates array\r\n * @param date\r\n */\r\n add(date: DateTime): void {\r\n this._dates.push(date);\r\n }\r\n\r\n /**\r\n * Returns true if the `targetDate` is part of the selected dates array.\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return (\r\n this._dates\r\n .map((x) => x.format(format))\r\n .find((x) => x === innerDateFormatted) !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the index at which `targetDate` is in the array.\r\n * This is used for updating or removing a date when multi-date is used\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\r\n if (!unit) return this._dates.indexOf(targetDate);\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\r\n }\r\n\r\n /**\r\n * Clears all selected dates.\r\n */\r\n clear() {\r\n this.optionsStore.unset = true;\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate: this.lastPicked,\r\n isClear: true,\r\n isValid: true,\r\n } as ChangeEvent);\r\n this._dates = [];\r\n }\r\n\r\n /**\r\n * Find the \"book end\" years given a `year` and a `factor`\r\n * @param factor e.g. 100 for decades\r\n * @param year e.g. 2021\r\n */\r\n static getStartEndYear(\r\n factor: number,\r\n year: number\r\n ): [number, number, number] {\r\n const step = factor / 10,\r\n startYear = Math.floor(year / factor) * factor,\r\n endYear = startYear + step * 9,\r\n focusValue = Math.floor(year / step) * step;\r\n return [startYear, endYear, focusValue];\r\n }\r\n\r\n /**\r\n * Attempts to either clear or set the `target` date at `index`.\r\n * If the `target` is null then the date will be cleared.\r\n * If multi-date is being used then it will be removed from the array.\r\n * If `target` is valid and multi-date is used then if `index` is\r\n * provided the date at that index will be replaced, otherwise it is appended.\r\n * @param target\r\n * @param index\r\n */\r\n setValue(target?: DateTime, index?: number): void {\r\n const noIndex = typeof index === 'undefined',\r\n isClear = !target && noIndex;\r\n let oldDate = this.optionsStore.unset ? null : this._dates[index];\r\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\r\n oldDate = this.lastPicked;\r\n }\r\n\r\n const updateInput = () => {\r\n if (!this.optionsStore.input) return;\r\n\r\n let newValue = this.formatInput(target);\r\n if (this.optionsStore.options.multipleDates) {\r\n newValue = this._dates\r\n .map((d) => this.formatInput(d))\r\n .join(this.optionsStore.options.multipleDatesSeparator);\r\n }\r\n if (this.optionsStore.input.value != newValue)\r\n this.optionsStore.input.value = newValue;\r\n };\r\n\r\n if (target && oldDate?.isSame(target)) {\r\n updateInput();\r\n return;\r\n }\r\n\r\n // case of calling setValue(null)\r\n if (!target) {\r\n if (\r\n !this.optionsStore.options.multipleDates ||\r\n this._dates.length === 1 ||\r\n isClear\r\n ) {\r\n this.optionsStore.unset = true;\r\n this._dates = [];\r\n } else {\r\n this._dates.splice(index, 1);\r\n }\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n\r\n this._eventEmitters.updateDisplay.emit('all');\r\n return;\r\n }\r\n\r\n index = index || 0;\r\n target = target.clone;\r\n\r\n // minute stepping is being used, force the minute to the closest value\r\n if (this.optionsStore.options.stepping !== 1) {\r\n target.minutes =\r\n Math.round(target.minutes / this.optionsStore.options.stepping) *\r\n this.optionsStore.options.stepping;\r\n target.seconds = 0;\r\n }\r\n\r\n if (this.validation.isValid(target)) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this.optionsStore.unset = false;\r\n this._eventEmitters.updateDisplay.emit('all');\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.keepInvalid) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: false,\r\n } as ChangeEvent);\r\n }\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.error,\r\n reason: Namespace.errorMessages.failedToSetInvalidDate,\r\n date: target,\r\n oldDate,\r\n } as FailEvent);\r\n }\r\n}\r\n","enum ActionTypes {\n next = 'next',\n previous = 'previous',\n changeCalendarView = 'changeCalendarView',\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 toggleMeridiem = 'toggleMeridiem',\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\nexport default ActionTypes;\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport Dates from \"../../dates\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `date`\r\n */\r\nexport default class DateDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.daysContainer);\r\n\r\n container.append(...this._daysOfTheWeek());\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\r\n container.appendChild(div);\r\n }\r\n\r\n for (let i = 0; i < 42; i++) {\r\n if (i !== 0 && i % 7 === 0) {\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n container.appendChild(div);\r\n }\r\n }\r\n\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDay);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.daysContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"calendar\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.daysContainer,\r\n this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n )\r\n );\r\n\r\n this.optionsStore.options.display.components.month\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\r\n Unit.month\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\r\n Unit.month\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.month)\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .manipulate(12, Unit.hours);\r\n\r\n container\r\n .querySelectorAll(\r\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\r\n )\r\n .forEach((containerClone: HTMLElement) => {\r\n if (\r\n this.optionsStore.options.display.calendarWeeks &&\r\n containerClone.classList.contains(Namespace.css.calendarWeeks)\r\n ) {\r\n if (containerClone.innerText === \"#\") return;\r\n containerClone.innerText = `${innerDate.week}`;\r\n return;\r\n }\r\n\r\n let classes: string[] = [];\r\n classes.push(Namespace.css.day);\r\n\r\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.old);\r\n }\r\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.new);\r\n }\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.date)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.date)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n if (innerDate.isSame(new DateTime(), Unit.date)) {\r\n classes.push(Namespace.css.today);\r\n }\r\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\r\n classes.push(Namespace.css.weekend);\r\n }\r\n\r\n paint(Unit.date, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\r\n );\r\n containerClone.setAttribute(\"data-day\", `${innerDate.date}`);\r\n containerClone.innerText = innerDate.format({ day: \"numeric\" });\r\n innerDate.manipulate(1, Unit.date);\r\n });\r\n }\r\n\r\n /***\r\n * Generates an html row that contains the days of the week.\r\n * @private\r\n */\r\n private _daysOfTheWeek(): HTMLElement[] {\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .startOf(Unit.date);\r\n const row = [];\r\n document.createElement(\"div\");\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = \"#\";\r\n row.push(htmlDivElement);\r\n }\r\n\r\n for (let i = 0; i < 7; i++) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.dayOfTheWeek,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = innerDate.format({ weekday: \"short\" });\r\n innerDate.manipulate(1, Unit.date);\r\n row.push(htmlDivElement);\r\n }\r\n\r\n return row;\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { Paint } from '../index';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `month`\r\n */\r\nexport default class MonthDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.monthsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMonth);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.monthsContainer\r\n )[0];\r\n\r\n if(this.optionsStore.currentView === 'months') {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.monthsContainer,\r\n this.optionsStore.viewDate.format({ year: 'numeric' })\r\n );\r\n\r\n this.optionsStore.options.display.components.year\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\r\n Unit.year\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\r\n Unit.year\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n let classes = [];\r\n classes.push(Namespace.css.month);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.month)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.month)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.month, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${index}`);\r\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\r\n innerDate.manipulate(1, Unit.month);\r\n });\r\n }\r\n}\r\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Dates from \"../../dates\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `year`\r\n */\r\nexport default class YearDisplay {\r\n private _startYear: DateTime;\r\n private _endYear: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.yearsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectYear);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year);\r\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.yearsContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"years\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.yearsContainer,\r\n `${this._startYear.format({ year: \"numeric\" })}-${this._endYear.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.optionsStore.options.display.components.decades\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(this._startYear, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endYear, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.year)\r\n .manipulate(-1, Unit.year);\r\n\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.year);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.year)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.year)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.year, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\"data-value\", `${innerDate.year}`);\r\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\r\n\r\n innerDate.manipulate(1, Unit.year);\r\n });\r\n }\r\n}\r\n","import Dates from \"../../dates\";\r\nimport { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class DecadeDisplay {\r\n private _startDecade: DateTime;\r\n private _endDecade: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker() {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.decadesContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDecade);\r\n container.appendChild(div);\r\n }\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n const [start, end] = Dates.getStartEndYear(\r\n 100,\r\n this.optionsStore.viewDate.year\r\n );\r\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._startDecade.year = start;\r\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._endDecade.year = end;\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.decadesContainer\r\n )[0];\r\n\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n if (this.optionsStore.currentView === 'decades') {\r\n switcher.setAttribute(\r\n Namespace.css.decadesContainer,\r\n `${this._startDecade.format({ year: \"numeric\" })}-${this._endDecade.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.validation.isValid(this._startDecade, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endDecade, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n const pickedYears = this.dates.picked.map((x) => x.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n if (index === 0) {\r\n containerClone.classList.add(Namespace.css.old);\r\n if (this._startDecade.year - 10 < 0) {\r\n containerClone.textContent = \" \";\r\n previous.classList.add(Namespace.css.disabled);\r\n containerClone.classList.add(Namespace.css.disabled);\r\n containerClone.setAttribute(\"data-value\", ``);\r\n return;\r\n } else {\r\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: \"numeric\" });\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n return;\r\n }\r\n }\r\n\r\n let classes = [];\r\n classes.push(Namespace.css.decade);\r\n const startDecadeYear = this._startDecade.year;\r\n const endDecadeYear = this._startDecade.year + 9;\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\r\n .length > 0\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n\r\n paint(\"decade\", this._startDecade, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n containerClone.innerText = `${this._startDecade.format({ year: \"numeric\" })}`;\r\n\r\n this._startDecade.manipulate(10, Unit.year);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates the clock display\r\n */\r\nexport default class TimeDisplay {\r\n private _gridColumns = '';\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the clock display\r\n * @private\r\n */\r\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.clockContainer);\r\n\r\n container.append(...this._grid(iconTag));\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the various elements with in the clock display\r\n * like the current hour and if the manipulation icons are enabled.\r\n * @private\r\n */\r\n _update(widget: HTMLElement): void {\r\n const timesDiv = (\r\n widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0]\r\n );\r\n const lastPicked = (\r\n this.dates.lastPicked || this.optionsStore.viewDate\r\n ).clone;\r\n\r\n timesDiv\r\n .querySelectorAll('.disabled')\r\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.hours}]`\r\n ).innerText = this.optionsStore.options.display.components.useTwentyfourHour\r\n ? lastPicked.hoursFormatted\r\n : lastPicked.twelveHoursFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.minutes}]`\r\n ).innerText = lastPicked.minutesFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.seconds}]`\r\n ).innerText = lastPicked.secondsFormatted;\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n const toggle = timesDiv.querySelector(\r\n `[data-action=${ActionTypes.toggleMeridiem}]`\r\n );\r\n\r\n toggle.innerText = lastPicked.meridiem();\r\n\r\n if (\r\n !this.validation.isValid(\r\n lastPicked.clone.manipulate(\r\n lastPicked.hours >= 12 ? -12 : 12,\r\n Unit.hours\r\n )\r\n )\r\n ) {\r\n toggle.classList.add(Namespace.css.disabled);\r\n } else {\r\n toggle.classList.remove(Namespace.css.disabled);\r\n }\r\n }\r\n\r\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\r\n }\r\n\r\n /**\r\n * Creates the table for the clock display depending on what options are selected.\r\n * @private\r\n */\r\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\r\n this._gridColumns = '';\r\n const top = [],\r\n middle = [],\r\n bottom = [],\r\n separator = document.createElement('div'),\r\n upIcon = iconTag(\r\n this.optionsStore.options.display.icons.up\r\n ),\r\n downIcon = iconTag(\r\n this.optionsStore.options.display.icons.down\r\n );\r\n\r\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\r\n const separatorColon = separator.cloneNode(true);\r\n separatorColon.innerHTML = ':';\r\n\r\n const getSeparator = (colon = false): HTMLElement => {\r\n return colon\r\n ? separatorColon.cloneNode(true)\r\n : separator.cloneNode(true);\r\n };\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showHours);\r\n divElement.setAttribute('data-time-component', Unit.hours);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n this._gridColumns += 'a';\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.hours) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\r\n divElement.setAttribute('data-time-component', Unit.minutes);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.minutes) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\r\n divElement.setAttribute('data-time-component', Unit.seconds);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n this._gridColumns += ' a';\r\n let divElement = getSeparator();\r\n top.push(divElement);\r\n\r\n let button = document.createElement('button');\r\n button.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.toggleMeridiem\r\n );\r\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\r\n button.setAttribute('tabindex', '-1');\r\n if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function?\r\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\r\n }\r\n else button.classList.add(Namespace.css.toggleMeridiem);\r\n\r\n divElement = document.createElement('div');\r\n divElement.classList.add(Namespace.css.noHighlight);\r\n divElement.appendChild(button);\r\n middle.push(divElement);\r\n\r\n divElement = getSeparator();\r\n bottom.push(divElement);\r\n }\r\n\r\n this._gridColumns = this._gridColumns.trim();\r\n\r\n return [...top, ...middle, ...bottom];\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `hours`\r\n */\r\nexport default class HourDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.hourContainer);\r\n\r\n for (\r\n let i = 0;\r\n i <\r\n (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12);\r\n i++\r\n ) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectHour);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.hourContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.hour);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.hours)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.hours, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\r\n containerClone.innerText = this.optionsStore.options.display.components\r\n .useTwentyfourHour\r\n ? innerDate.hoursFormatted\r\n : innerDate.twelveHoursFormatted;\r\n innerDate.manipulate(1, Unit.hours);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `minutes`\r\n */\r\nexport default class MinuteDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.minuteContainer);\r\n\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n for (let i = 0; i < 60 / step; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMinute);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.minuteContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.minute);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.minutes, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${innerDate.minutes}`\r\n );\r\n containerClone.innerText = innerDate.minutesFormatted;\r\n innerDate.manipulate(step, Unit.minutes);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class secondDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.secondContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectSecond);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.secondContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.second);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.seconds, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\r\n containerClone.innerText = innerDate.secondsFormatted;\r\n innerDate.manipulate(5, Unit.seconds);\r\n });\r\n }\r\n}\r\n","import Namespace from '../utilities/namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n static 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 * Skips any animation or timeouts and immediately set the element to show.\r\n * @param target\r\n */\r\n static showImmediately(target: HTMLElement) {\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 }\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.showImmediately(target);\r\n 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 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 * Skips any animation or timeouts and immediately set the element to hide.\r\n * @param target\r\n */\r\n static hideImmediately(target: HTMLElement) {\r\n if (!target) return;\r\n target.classList.remove(Namespace.css.collapsing, Namespace.css.show);\r\n target.classList.add(Namespace.css.collapse);\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.hideImmediately(target);\r\n 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 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 static 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 } =\r\n window.getComputedStyle(element);\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 DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport Namespace from '../utilities/namespace';\r\nimport { HideEvent } from '../utilities/event-types';\r\nimport Collapse from './collapse';\r\nimport Validation from '../validation';\r\nimport Dates from '../dates';\r\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\r\nimport { serviceLocator } from '../utilities/service-locator';\r\nimport ActionTypes from '../utilities/action-types';\r\nimport CalendarModes from '../utilities/calendar-modes';\r\nimport { OptionsStore } from '../utilities/optionsStore';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _widget: HTMLElement;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n dateDisplay: DateDisplay;\r\n monthDisplay: MonthDisplay;\r\n yearDisplay: YearDisplay;\r\n decadeDisplay: DecadeDisplay;\r\n timeDisplay: TimeDisplay;\r\n hourDisplay: HourDisplay;\r\n minuteDisplay: MinuteDisplay;\r\n secondDisplay: SecondDisplay;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.dates = serviceLocator.locate(Dates);\r\n\r\n this.dateDisplay = serviceLocator.locate(DateDisplay);\r\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\r\n this.yearDisplay = serviceLocator.locate(YearDisplay);\r\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\r\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\r\n this.hourDisplay = serviceLocator.locate(HourDisplay);\r\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\r\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this._widget = undefined;\r\n\r\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\r\n this._update(result);\r\n });\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: ViewUpdateValues): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this.secondDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.minutes:\r\n this.minuteDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.hours:\r\n this.hourDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.date:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.month:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.year:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this.timeDisplay._update(this.widget);\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n // noinspection JSUnusedLocalSymbols\r\n /**\r\n * Allows developers to add/remove classes from an element.\r\n * @param _unit\r\n * @param _date\r\n * @param _classes\r\n * @param _element\r\n */\r\n paint(\r\n _unit: Unit | 'decade',\r\n _date: DateTime,\r\n _classes: string[],\r\n _element: HTMLElement\r\n ) {\r\n // implemented in plugin\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (this.dates.picked.length == 0) {\r\n if (\r\n this.optionsStore.options.useCurrent &&\r\n !this.optionsStore.options.defaultDate\r\n ) {\r\n const date = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n if (!this.optionsStore.options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (\r\n this.optionsStore.options.restrictions.maxDate?.isBefore(date)\r\n ) {\r\n direction = -1;\r\n }\r\n while (!this.validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this.dates.setValue(date);\r\n }\r\n\r\n if (this.optionsStore.options.defaultDate) {\r\n this.dates.setValue(this.optionsStore.options.defaultDate);\r\n }\r\n }\r\n\r\n this._buildWidget();\r\n this._updateTheme();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this.optionsStore.currentView = 'clock';\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n // otherwise return to the calendar view\r\n if (!this.optionsStore.currentCalendarViewMode) {\r\n this.optionsStore.currentCalendarViewMode =\r\n this.optionsStore.minimumCalendarViewMode;\r\n }\r\n\r\n if (\r\n !onlyClock &&\r\n this.optionsStore.options.display.viewMode !== 'clock'\r\n ) {\r\n if (this._hasTime) {\r\n if(!this.optionsStore.options.display.sideBySide) {\r\n Collapse.hideImmediately(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n } else {\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n }\r\n }\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.dateContainer}`)\r\n );\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this.optionsStore.options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this.optionsStore.options?.container || document.body;\r\n container.appendChild(this.widget);\r\n this.createPopup(this.optionsStore.element, this.widget, {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start',\r\n }).then();\r\n } else {\r\n this.optionsStore.element.appendChild(this.widget);\r\n }\r\n\r\n if (this.optionsStore.options.display.viewMode == 'clock') {\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\r\n this.timeDisplay._update(this.widget);\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this.optionsStore.options.display.inline) {\r\n this.updatePopup();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n async createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise {\r\n const { createPopper } = await import('@popperjs/core');\r\n this._popperInstance = createPopper(element, widget, options);\r\n }\r\n\r\n updatePopup(): void {\r\n this._popperInstance?.update();\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\r\n );\r\n if (this.optionsStore.currentCalendarViewMode == max) return;\r\n this.optionsStore.currentCalendarViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.daysContainer:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n this._eventEmitters.viewUpdate.emit();\r\n }\r\n\r\n /**\r\n * Changes the theme. E.g. light, dark or auto\r\n * @param theme the theme name\r\n * @private\r\n */\r\n _updateTheme(theme?: 'light' | 'dark' | 'auto'): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (theme) {\r\n if (this.optionsStore.options.display.theme === theme) return;\r\n this.optionsStore.options.display.theme = theme;\r\n }\r\n\r\n this.widget.classList.remove('light', 'dark');\r\n this.widget.classList.add(this._getThemeClass());\r\n\r\n if (this.optionsStore.options.display.theme === 'auto') {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .addEventListener('change', () => this._updateTheme());\r\n } else {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .removeEventListener('change', () => this._updateTheme());\r\n }\r\n }\r\n\r\n _getThemeClass(): string {\r\n const currentTheme = this.optionsStore.options.display.theme || 'auto';\r\n\r\n const isDarkMode =\r\n window.matchMedia &&\r\n window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;\r\n\r\n switch (currentTheme) {\r\n case 'light':\r\n return Namespace.css.lightTheme;\r\n case 'dark':\r\n return Namespace.css.darkTheme;\r\n case 'auto':\r\n return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;\r\n }\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList,\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextMonth\r\n );\r\n switcher.innerText = this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n );\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.hide,\r\n date: this.optionsStore.unset\r\n ? null\r\n : this.dates.lastPicked\r\n ? this.dates.lastPicked.clone\r\n : void 0,\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this.getHeadTemplate(),\r\n this.decadeDisplay.getPicker(),\r\n this.yearDisplay.getPicker(),\r\n this.monthDisplay.getPicker(),\r\n this.dateDisplay.getPicker()\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\r\n timeView.appendChild(this.hourDisplay.getPicker());\r\n timeView.appendChild(this.minuteDisplay.getPicker());\r\n timeView.appendChild(this.secondDisplay.getPicker());\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this.getToolbarElements());\r\n\r\n if (this.optionsStore.options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.clock &&\r\n (this.optionsStore.options.display.components.hours ||\r\n this.optionsStore.options.display.components.minutes ||\r\n this.optionsStore.options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.calendar &&\r\n (this.optionsStore.options.display.components.year ||\r\n this.optionsStore.options.display.components.month ||\r\n this.optionsStore.options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n getToolbarElements(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this.optionsStore.options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this.optionsStore.options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this.optionsStore.options.display.viewMode === 'clock') {\r\n title = this.optionsStore.options.localization.selectDate;\r\n icon = this.optionsStore.options.display.icons.date;\r\n } else {\r\n title = this.optionsStore.options.localization.selectTime;\r\n icon = this.optionsStore.options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this.optionsStore.options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this.optionsStore.options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n getHeadTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.next)\r\n );\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then a svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement | SVGElement {\r\n if (this.optionsStore.options.display.icons.type === 'sprites') {\r\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\r\n\r\n const icon = document.createElementNS(\r\n 'http://www.w3.org/2000/svg',\r\n 'use'\r\n );\r\n icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility\r\n icon.setAttribute('href', iconClass);\r\n svg.appendChild(icon);\r\n\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n icon.classList.add(...iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this.optionsStore.options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._eventEmitters.action.emit({ e: e });\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n\r\nexport type Paint = (\r\n unit: Unit | 'decade',\r\n innerDate: DateTime,\r\n classes: string[],\r\n element: HTMLElement\r\n) => void;\r\n","import { DateTime, Unit } from \"./datetime\";\r\nimport Collapse from \"./display/collapse\";\r\nimport Namespace from \"./utilities/namespace\";\r\nimport Dates from \"./dates\";\r\nimport Validation from \"./validation\";\r\nimport Display from \"./display\";\r\nimport { EventEmitters } from \"./utilities/event-emitter\";\r\nimport { serviceLocator } from \"./utilities/service-locator.js\";\r\nimport ActionTypes from \"./utilities/action-types\";\r\nimport CalendarModes from \"./utilities/calendar-modes\";\r\nimport { OptionsStore } from \"./utilities/optionsStore\";\r\n\r\n/**\r\n *\r\n */\r\nexport default class Actions {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n private display: Display;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.display = serviceLocator.locate(Display);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n\r\n this._eventEmitters.action.subscribe((result) => {\r\n this.do(result.e, result.action);\r\n });\r\n }\r\n\r\n /**\r\n * Performs the selected `action`. See ActionTypes\r\n * @param e This is normally a click event\r\n * @param action If not provided, then look for a [data-action]\r\n */\r\n do(e: any, action?: ActionTypes) {\r\n const currentTarget = e?.currentTarget;\r\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\r\n return false;\r\n action = action || currentTarget?.dataset?.action;\r\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\r\n .clone;\r\n\r\n switch (action) {\r\n case ActionTypes.next:\r\n case ActionTypes.previous:\r\n this.handleNextPrevious(action);\r\n break;\r\n case ActionTypes.changeCalendarView:\r\n this.display._showMode(1);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.selectMonth:\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n const value = +currentTarget.dataset.value;\r\n switch (action) {\r\n case ActionTypes.selectMonth:\r\n this.optionsStore.viewDate.month = value;\r\n break;\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n this.optionsStore.viewDate.year = value;\r\n break;\r\n }\r\n\r\n if (\r\n this.optionsStore.currentCalendarViewMode ===\r\n this.optionsStore.minimumCalendarViewMode\r\n ) {\r\n this.dates.setValue(\r\n this.optionsStore.viewDate,\r\n this.dates.lastPickedIndex\r\n );\r\n if (!this.optionsStore.options.display.inline) {\r\n this.display.hide();\r\n }\r\n } else {\r\n this.display._showMode(-1);\r\n }\r\n break;\r\n case ActionTypes.selectDay:\r\n const day = this.optionsStore.viewDate.clone;\r\n if (currentTarget.classList.contains(Namespace.css.old)) {\r\n day.manipulate(-1, Unit.month);\r\n }\r\n if (currentTarget.classList.contains(Namespace.css.new)) {\r\n day.manipulate(1, Unit.month);\r\n }\r\n\r\n day.date = +currentTarget.dataset.day;\r\n let index = 0;\r\n if (this.optionsStore.options.multipleDates) {\r\n index = this.dates.pickedIndex(day, Unit.date);\r\n if (index !== -1) {\r\n this.dates.setValue(null, index); //deselect multi-date\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex + 1);\r\n }\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex);\r\n }\r\n\r\n if (\r\n !this.display._hasTime &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline &&\r\n !this.optionsStore.options.multipleDates\r\n ) {\r\n this.display.hide();\r\n }\r\n break;\r\n case ActionTypes.selectHour:\r\n let hour = +currentTarget.dataset.value;\r\n if (\r\n lastPicked.hours >= 12 &&\r\n !this.optionsStore.options.display.components.useTwentyfourHour\r\n )\r\n hour += 12;\r\n lastPicked.hours = hour;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectMinute:\r\n lastPicked.minutes = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectSecond:\r\n lastPicked.seconds = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.incrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours);\r\n break;\r\n case ActionTypes.incrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping\r\n );\r\n break;\r\n case ActionTypes.incrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds);\r\n break;\r\n case ActionTypes.decrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\r\n break;\r\n case ActionTypes.decrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping * -1\r\n );\r\n break;\r\n case ActionTypes.decrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\r\n break;\r\n case ActionTypes.toggleMeridiem:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.hours,\r\n this.dates.lastPicked.hours >= 12 ? -12 : 12\r\n );\r\n break;\r\n case ActionTypes.togglePicker:\r\n if (\r\n currentTarget.getAttribute('title') ===\r\n this.optionsStore.options.localization.selectDate\r\n ) {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectTime\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.time\r\n ).outerHTML;\r\n\r\n this.display._updateCalendarHeader();\r\n this.optionsStore.refreshCurrentView();\r\n } else {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDate\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.date\r\n ).outerHTML;\r\n if (this.display._hasTime) {\r\n this.handleShowClockContainers(ActionTypes.showClock);\r\n this.display._update('clock');\r\n }\r\n }\r\n\r\n this.display.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\r\n )\r\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\r\n this._eventEmitters.viewUpdate.emit();\r\n break;\r\n case ActionTypes.showClock:\r\n case ActionTypes.showHours:\r\n case ActionTypes.showMinutes:\r\n case ActionTypes.showSeconds:\r\n //make sure the clock is actually displaying\r\n if (!this.optionsStore.options.display.sideBySide && this.optionsStore.currentView !== 'clock') {\r\n //hide calendar\r\n Collapse.hideImmediately(this.display.widget.querySelector(`div.${Namespace.css.dateContainer}`));\r\n //show clock\r\n Collapse.showImmediately(this.display.widget.querySelector(`div.${Namespace.css.timeContainer}`));\r\n }\r\n this.handleShowClockContainers(action);\r\n break;\r\n case ActionTypes.clear:\r\n this.dates.setValue(null);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.close:\r\n this.display.hide();\r\n break;\r\n case ActionTypes.today:\r\n const today = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.viewDate = today;\r\n if (this.validation.isValid(today, Unit.date))\r\n this.dates.setValue(today, this.dates.lastPickedIndex);\r\n break;\r\n }\r\n }\r\n\r\n private handleShowClockContainers(action: ActionTypes) {\r\n if (!this.display._hasTime) {\r\n Namespace.errorMessages.throwError('Cannot show clock containers when time is disabled.');\r\n return;\r\n }\r\n\r\n this.optionsStore.currentView = 'clock';\r\n this.display.widget\r\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\r\n .forEach(\r\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\r\n );\r\n\r\n let classToUse = '';\r\n switch (action) {\r\n case ActionTypes.showClock:\r\n classToUse = Namespace.css.clockContainer;\r\n this.display._update('clock');\r\n break;\r\n case ActionTypes.showHours:\r\n classToUse = Namespace.css.hourContainer;\r\n this.display._update(Unit.hours);\r\n break;\r\n case ActionTypes.showMinutes:\r\n classToUse = Namespace.css.minuteContainer;\r\n this.display._update(Unit.minutes);\r\n break;\r\n case ActionTypes.showSeconds:\r\n classToUse = Namespace.css.secondContainer;\r\n this.display._update(Unit.seconds);\r\n break;\r\n }\r\n\r\n ((\r\n this.display.widget.getElementsByClassName(classToUse)[0]\r\n )).style.display = 'grid';\r\n }\r\n\r\n private handleNextPrevious(action: ActionTypes) {\r\n const {unit, step} =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n if (action === ActionTypes.next)\r\n this.optionsStore.viewDate.manipulate(step, unit);\r\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\r\n this._eventEmitters.viewUpdate.emit();\r\n\r\n this.display._showMode();\r\n }\r\n\r\n /**\r\n * After setting the value it will either show the clock or hide the widget.\r\n * @param e\r\n */\r\n private hideOrClock(e) {\r\n if (\r\n this.optionsStore.options.display.components.useTwentyfourHour &&\r\n !this.optionsStore.options.display.components.minutes &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline\r\n ) {\r\n this.display.hide();\r\n } else {\r\n this.do(e, ActionTypes.showClock);\r\n }\r\n }\r\n\r\n /**\r\n * Common function to manipulate {@link lastPicked} by `unit`.\r\n * @param lastPicked\r\n * @param unit\r\n * @param value Value to change by\r\n */\r\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\r\n const newDate = lastPicked.manipulate(value, unit);\r\n if (this.validation.isValid(newDate, unit)) {\r\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\r\n }\r\n }\r\n}\r\n","import Display from './display/index';\r\nimport Dates from './dates';\r\nimport Actions from './actions';\r\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport Options from './utilities/options';\r\nimport {\r\n BaseEvent,\r\n ChangeEvent,\r\n ViewUpdateEvent,\r\n} from './utilities/event-types';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {\r\n serviceLocator,\r\n setupServiceLocator,\r\n} from './utilities/service-locator';\r\nimport CalendarModes from './utilities/calendar-modes';\r\nimport DefaultOptions from './utilities/default-options';\r\nimport ActionTypes from './utilities/action-types';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\nimport { ErrorMessages } from './utilities/errors';\r\n\r\n/**\r\n * A robust and powerful date/time picker component.\r\n */\r\nclass TempusDominus {\r\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\r\n private _isDisabled = false;\r\n private _toggle: HTMLElement;\r\n private _currentPromptTimeTimeout: any;\r\n private actions: Actions;\r\n private optionsStore: OptionsStore;\r\n private _eventEmitters: EventEmitters;\r\n display: Display;\r\n dates: Dates;\r\n\r\n constructor(element: HTMLElement, options: Options = {} as Options) {\r\n setupServiceLocator();\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.display = serviceLocator.locate(Display);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.actions = serviceLocator.locate(Actions);\r\n\r\n if (!element) {\r\n Namespace.errorMessages.mustProvideElement();\r\n }\r\n\r\n this.optionsStore.element = element;\r\n this._initializeOptions(options, DefaultOptions, true);\r\n this.optionsStore.viewDate.setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.unset = true;\r\n\r\n this._initializeInput();\r\n this._initializeToggle();\r\n\r\n if (this.optionsStore.options.display.inline) this.display.show();\r\n\r\n this._eventEmitters.triggerEvent.subscribe((e) => {\r\n this._triggerEvent(e);\r\n });\r\n\r\n this._eventEmitters.viewUpdate.subscribe(() => {\r\n this._viewUpdate();\r\n });\r\n }\r\n\r\n get viewDate() {\r\n return this.optionsStore.viewDate;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\r\n * @param options\r\n * @param reset\r\n * @public\r\n */\r\n updateOptions(options, reset = false): void {\r\n if (reset) this._initializeOptions(options, DefaultOptions);\r\n else this._initializeOptions(options, this.optionsStore.options);\r\n this.display._rebuild();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\r\n * @public\r\n */\r\n toggle(): void {\r\n if (this._isDisabled) return;\r\n this.display.toggle();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Shows the picker unless the picker is disabled.\r\n * @public\r\n */\r\n show(): void {\r\n if (this._isDisabled) return;\r\n this.display.show();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker unless the picker is disabled.\r\n * @public\r\n */\r\n hide(): void {\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Disables the picker and the target input field.\r\n * @public\r\n */\r\n disable(): void {\r\n this._isDisabled = true;\r\n // todo this might be undesired. If a dev disables the input field to\r\n // only allow using the picker, this will break that.\r\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Enables the picker and the target input field.\r\n * @public\r\n */\r\n enable(): void {\r\n this._isDisabled = false;\r\n this.optionsStore.input?.removeAttribute('disabled');\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Clears all the selected dates\r\n * @public\r\n */\r\n clear(): void {\r\n this.optionsStore.input.value = '';\r\n this.dates.clear();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\r\n * @param eventTypes See Namespace.Events\r\n * @param callbacks Function to call when event is triggered\r\n * @public\r\n */\r\n subscribe(\r\n eventTypes: string | string[],\r\n callbacks: (event: any) => void | ((event: any) => void)[]\r\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\r\n if (typeof eventTypes === 'string') {\r\n eventTypes = [eventTypes];\r\n }\r\n let callBackArray: any[];\r\n if (!Array.isArray(callbacks)) {\r\n callBackArray = [callbacks];\r\n } else {\r\n callBackArray = callbacks;\r\n }\r\n\r\n if (eventTypes.length !== callBackArray.length) {\r\n Namespace.errorMessages.subscribeMismatch();\r\n }\r\n\r\n const returnArray = [];\r\n\r\n for (let i = 0; i < eventTypes.length; i++) {\r\n const eventType = eventTypes[i];\r\n if (!Array.isArray(this._subscribers[eventType])) {\r\n this._subscribers[eventType] = [];\r\n }\r\n\r\n this._subscribers[eventType].push(callBackArray[i]);\r\n\r\n returnArray.push({\r\n unsubscribe: this._unsubscribe.bind(\r\n this,\r\n eventType,\r\n this._subscribers[eventType].length - 1\r\n ),\r\n });\r\n\r\n if (eventTypes.length === 1) {\r\n return returnArray[0];\r\n }\r\n }\r\n\r\n return returnArray;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker and removes event listeners\r\n */\r\n dispose() {\r\n this.display.hide();\r\n // this will clear the document click event listener\r\n this.display._dispose();\r\n this.optionsStore.input?.removeEventListener(\r\n 'change',\r\n this._inputChangeEvent\r\n );\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input?.removeEventListener(\r\n 'click',\r\n this._toggleClickEvent\r\n );\r\n }\r\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\r\n this._subscribers = {};\r\n }\r\n\r\n /**\r\n * Updates the options to use the provided language.\r\n * THe language file must be loaded first.\r\n * @param language\r\n */\r\n locale(language: string) {\r\n let asked = loadedLocales[language];\r\n if (!asked) return;\r\n this.updateOptions({\r\n localization: asked,\r\n });\r\n }\r\n\r\n /**\r\n * Triggers an event like ChangeEvent when the picker has updated the value\r\n * of a selected date.\r\n * @param event Accepts a BaseEvent object.\r\n * @private\r\n */\r\n private _triggerEvent(event: BaseEvent) {\r\n event.viewMode = this.optionsStore.currentView;\r\n\r\n const isChangeEvent = event.type === Namespace.events.change;\r\n if (isChangeEvent) {\r\n const { date, oldDate, isClear } = event as ChangeEvent;\r\n if (\r\n (date && oldDate && date.isSame(oldDate)) ||\r\n (!isClear && !date && !oldDate)\r\n ) {\r\n return;\r\n }\r\n this._handleAfterChangeEvent(event as ChangeEvent);\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent('change', { detail: event as any })\r\n );\r\n }\r\n\r\n this.optionsStore.element.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n if ((window as any).jQuery) {\r\n const $ = (window as any).jQuery;\r\n\r\n if (isChangeEvent && this.optionsStore.input) {\r\n $(this.optionsStore.input).trigger(event);\r\n } else {\r\n $(this.optionsStore.element).trigger(event);\r\n }\r\n }\r\n\r\n this._publish(event);\r\n }\r\n\r\n private _publish(event: BaseEvent) {\r\n // return if event is not subscribed\r\n if (!Array.isArray(this._subscribers[event.type])) {\r\n return;\r\n }\r\n\r\n // Trigger callback for each subscriber\r\n this._subscribers[event.type].forEach((callback) => {\r\n callback(event);\r\n });\r\n }\r\n\r\n /**\r\n * Fires a ViewUpdate event when, for example, the month view is changed.\r\n * @private\r\n */\r\n private _viewUpdate() {\r\n this._triggerEvent({\r\n type: Namespace.events.update,\r\n viewDate: this.optionsStore.viewDate.clone,\r\n } as ViewUpdateEvent);\r\n }\r\n\r\n private _unsubscribe(eventName, index) {\r\n this._subscribers[eventName].splice(index, 1);\r\n }\r\n\r\n /**\r\n * Merges two Option objects together and validates options type\r\n * @param config new Options\r\n * @param mergeTo Options to merge into\r\n * @param includeDataset When true, the elements data-td attributes will be included in the\r\n * @private\r\n */\r\n private _initializeOptions(\r\n config: Options,\r\n mergeTo: Options,\r\n includeDataset = false\r\n ): void {\r\n let newConfig = OptionConverter.deepCopy(config);\r\n newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);\r\n if (includeDataset)\r\n newConfig = OptionConverter._dataToOptions(\r\n this.optionsStore.element,\r\n newConfig\r\n );\r\n\r\n OptionConverter._validateConflicts(newConfig);\r\n\r\n newConfig.viewDate = newConfig.viewDate.setLocale(newConfig.localization.locale);\r\n\r\n if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {\r\n this.optionsStore.viewDate = newConfig.viewDate;\r\n }\r\n\r\n /**\r\n * Sets the minimum view allowed by the picker. For example the case of only\r\n * allowing year and month to be selected but not date.\r\n */\r\n if (newConfig.display.components.year) {\r\n this.optionsStore.minimumCalendarViewMode = 2;\r\n }\r\n if (newConfig.display.components.month) {\r\n this.optionsStore.minimumCalendarViewMode = 1;\r\n }\r\n if (newConfig.display.components.date) {\r\n this.optionsStore.minimumCalendarViewMode = 0;\r\n }\r\n\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n this.optionsStore.currentCalendarViewMode\r\n );\r\n\r\n // Update view mode if needed\r\n if (\r\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\r\n newConfig.display.viewMode\r\n ) {\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),\r\n this.optionsStore.minimumCalendarViewMode\r\n );\r\n }\r\n\r\n if (this.display?.isVisible) {\r\n this.display._update('all');\r\n }\r\n\r\n if (newConfig.display.components.useTwentyfourHour === undefined) {\r\n newConfig.display.components.useTwentyfourHour = !!!newConfig.viewDate.parts()?.dayPeriod;\r\n }\r\n\r\n\r\n this.optionsStore.options = newConfig;\r\n }\r\n\r\n /**\r\n * Checks if an input field is being used, attempts to locate one and sets an\r\n * event listener if found.\r\n * @private\r\n */\r\n private _initializeInput() {\r\n if (this.optionsStore.element.tagName == 'INPUT') {\r\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\r\n } else {\r\n let query = this.optionsStore.element.dataset.tdTargetInput;\r\n if (query == undefined || query == 'nearest') {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector('input');\r\n } else {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector(query);\r\n }\r\n }\r\n\r\n if (!this.optionsStore.input) return;\r\n\r\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n if (this.optionsStore.input.value) {\r\n this._inputChangeEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to locate a toggle for the picker and sets an event listener\r\n * @private\r\n */\r\n private _initializeToggle() {\r\n if (this.optionsStore.options.display.inline) return;\r\n let query = this.optionsStore.element.dataset.tdTargetToggle;\r\n if (query == 'nearest') {\r\n query = '[data-td-toggle=\"datetimepicker\"]';\r\n }\r\n this._toggle =\r\n query == undefined\r\n ? this.optionsStore.element\r\n : this.optionsStore.element.querySelector(query);\r\n this._toggle.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n /**\r\n * If the option is enabled this will render the clock view after a date pick.\r\n * @param e change event\r\n * @private\r\n */\r\n private _handleAfterChangeEvent(e: ChangeEvent) {\r\n if (\r\n // options is disabled\r\n !this.optionsStore.options.promptTimeOnDateChange ||\r\n this.optionsStore.options.display.inline ||\r\n this.optionsStore.options.display.sideBySide ||\r\n // time is disabled\r\n !this.display._hasTime ||\r\n // clock component is already showing\r\n this.display.widget\r\n ?.getElementsByClassName(Namespace.css.show)[0]\r\n .classList.contains(Namespace.css.timeContainer)\r\n )\r\n return;\r\n\r\n // First time ever. If useCurrent option is set to true (default), do nothing\r\n // because the first date is selected automatically.\r\n // or date didn't change (time did) or date changed because time did.\r\n if (\r\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\r\n (e.oldDate && e.date?.isSame(e.oldDate))\r\n ) {\r\n return;\r\n }\r\n\r\n clearTimeout(this._currentPromptTimeTimeout);\r\n this._currentPromptTimeTimeout = setTimeout(() => {\r\n if (this.display.widget) {\r\n this._eventEmitters.action.emit({\r\n e: {\r\n currentTarget: this.display.widget.querySelector(\r\n `.${Namespace.css.switch} div`\r\n ),\r\n },\r\n action: ActionTypes.togglePicker,\r\n });\r\n }\r\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\r\n }\r\n\r\n /**\r\n * Event for when the input field changes. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _inputChangeEvent = (event?: any) => {\r\n const internallyTriggered = event?.detail;\r\n if (internallyTriggered) return;\r\n\r\n const setViewDate = () => {\r\n if (this.dates.lastPicked)\r\n this.optionsStore.viewDate = this.dates.lastPicked.clone;\r\n };\r\n\r\n const value = this.optionsStore.input.value;\r\n if (this.optionsStore.options.multipleDates) {\r\n try {\r\n const valueSplit = value.split(\r\n this.optionsStore.options.multipleDatesSeparator\r\n );\r\n for (let i = 0; i < valueSplit.length; i++) {\r\n this.dates.setFromInput(valueSplit[i], i);\r\n }\r\n setViewDate();\r\n } catch {\r\n console.warn(\r\n 'TD: Something went wrong trying to set the multipleDates values from the input field.'\r\n );\r\n }\r\n } else {\r\n this.dates.setFromInput(value, 0);\r\n setViewDate();\r\n }\r\n };\r\n\r\n /**\r\n * Event for when the toggle is clicked. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _toggleClickEvent = () => {\r\n if ((this.optionsStore.element as any)?.disabled || this.optionsStore.input?.disabled) return\r\n this.toggle();\r\n };\r\n}\r\n\r\n/**\r\n * Whenever a locale is loaded via a plugin then store it here based on the\r\n * locale name. E.g. loadedLocales['ru']\r\n */\r\nconst loadedLocales = {};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a locale plugin.\r\n * @param l locale object for localization options\r\n */\r\nconst loadLocale = (l) => {\r\n if (loadedLocales[l.name]) return;\r\n loadedLocales[l.name] = l.localization;\r\n};\r\n\r\n/**\r\n * A sets the global localization options to the provided locale name.\r\n * `loadLocale` MUST be called first.\r\n * @param l\r\n */\r\nconst locale = (l: string) => {\r\n let asked = loadedLocales[l];\r\n if (!asked) return;\r\n DefaultOptions.localization = asked;\r\n};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a plugin to extend or override picker defaults.\r\n * @param plugin\r\n * @param option\r\n */\r\nconst extend = function (plugin, option) {\r\n if (!plugin) return tempusDominus;\r\n if (!plugin.installed) {\r\n // install plugin only once\r\n plugin(option, { TempusDominus, Dates, Display, DateTime, ErrorMessages }, tempusDominus);\r\n plugin.installed = true;\r\n }\r\n return tempusDominus;\r\n};\r\n\r\nconst version = '6.1.2';\r\n\r\nconst tempusDominus = {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version\r\n};\r\n\r\nexport {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version\r\n}\r\n"],"names":["Unit","ActionTypes","SecondDisplay"],"mappings":";;;;;;;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAuDA;IACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;IAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;IAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;IAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;IACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,E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A,IAAI,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAC7B,IAAA,IAAI,CAAC,KAAK;YAAE,OAAO;IACnB,IAAA,cAAc,CAAC,YAAY,GAAG,KAAK,CAAC;IACtC,EAAE;IAEF;IACA;;;;IAIG;AACH,UAAM,MAAM,GAAG,UAAU,MAAM,EAAE,MAAM,EAAA;IACrC,IAAA,IAAI,CAAC,MAAM;IAAE,QAAA,OAAO,aAAa,CAAC;IAClC,IAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;;IAErB,QAAA,MAAM,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,aAAa,CAAC,CAAC;IAC1F,QAAA,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IACzB,KAAA;IACD,IAAA,OAAO,aAAa,CAAC;IACvB,EAAE;AAEI,UAAA,OAAO,GAAG,QAAQ;IAExB,MAAM,aAAa,GAAG;QACpB,aAAa;QACb,MAAM;QACN,UAAU;QACV,MAAM;QACN,SAAS;QACT,cAAc;QACd,QAAQ;cACRD,YAAI;QACJ,OAAO;KACR;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/service-locator.ts","../../src/js/utilities/calendar-modes.ts","../../src/js/utilities/optionsStore.ts","../../src/js/validation.ts","../../src/js/utilities/event-emitter.ts","../../src/js/utilities/default-options.ts","../../src/js/utilities/optionConverter.ts","../../src/js/dates.ts","../../src/js/utilities/action-types.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.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/collapse.ts","../../src/js/display/index.ts","../../src/js/actions.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\r\n seconds = 'seconds',\r\n minutes = 'minutes',\r\n hours = 'hours',\r\n date = 'date',\r\n month = 'month',\r\n year = 'year',\r\n}\r\n\r\nconst twoDigitTemplate = {\r\n month: '2-digit',\r\n day: '2-digit',\r\n year: 'numeric',\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n second: '2-digit',\r\n hour12: true,\r\n}\r\n\r\nconst twoDigitTwentyFourTemplate = {\r\n hour: '2-digit',\r\n hour12: false\r\n}\r\n\r\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\r\n timeStyle?: 'short' | 'medium' | 'long';\r\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\r\n numberingSystem?: string;\r\n}\r\n\r\nexport const getFormatByUnit = (unit: Unit): object => {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric'\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n};\r\n\r\n/**\r\n * For the most part this object behaves exactly the same way\r\n * as the native Date object with a little extra spice.\r\n */\r\nexport class DateTime extends Date {\r\n /**\r\n * Used with Intl.DateTimeFormat\r\n */\r\n locale = 'default';\r\n\r\n /**\r\n * Chainable way to set the {@link locale}\r\n * @param value\r\n */\r\n setLocale(value: string): this {\r\n this.locale = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts a plain JS date object to a DateTime object.\r\n * Doing this allows access to format, etc.\r\n * @param date\r\n * @param locale\r\n */\r\n static convert(date: Date, locale: string = 'default'): DateTime {\r\n if (!date) throw new Error(`A date is required`);\r\n return new DateTime(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n ).setLocale(locale);\r\n }\r\n\r\n /**\r\n * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates.\r\n * @param input\r\n * @param localization\r\n */\r\n static fromString(input: string, localization: any): DateTime {\r\n return new DateTime(input);\r\n }\r\n\r\n /**\r\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\r\n */\r\n get clone() {\r\n return new DateTime(\r\n this.year,\r\n this.month,\r\n this.date,\r\n this.hours,\r\n this.minutes,\r\n this.seconds,\r\n this.getMilliseconds()\r\n ).setLocale(this.locale);\r\n }\r\n\r\n /**\r\n * Sets the current date to the start of the {@link unit} provided\r\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')\r\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\r\n * @param unit\r\n * @param startOfTheWeek Allows for the changing the start of the week.\r\n */\r\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(0);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(0, 0);\r\n break;\r\n case 'hours':\r\n this.setMinutes(0, 0, 0);\r\n break;\r\n case 'date':\r\n this.setHours(0, 0, 0, 0);\r\n break;\r\n case 'weekDay':\r\n this.startOf(Unit.date);\r\n if (this.weekDay === startOfTheWeek) break;\r\n let goBack = this.weekDay;\r\n if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek;\r\n this.manipulate(startOfTheWeek - goBack, Unit.date);\r\n break;\r\n case 'month':\r\n this.startOf(Unit.date);\r\n this.setDate(1);\r\n break;\r\n case 'year':\r\n this.startOf(Unit.date);\r\n this.setMonth(0, 1);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the current date to the end of the {@link unit} provided\r\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')\r\n * would return April 30, 2021, 11:59:59.999 PM\r\n * @param unit\r\n * @param startOfTheWeek\r\n */\r\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(999);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(59, 999);\r\n break;\r\n case 'hours':\r\n this.setMinutes(59, 59, 999);\r\n break;\r\n case 'date':\r\n this.setHours(23, 59, 59, 999);\r\n break;\r\n case 'weekDay':\r\n this.endOf(Unit.date);\r\n this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date);\r\n break;\r\n case 'month':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.month);\r\n this.setDate(0);\r\n break;\r\n case 'year':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.year);\r\n this.setDate(0);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Change a {@link unit} value. Value can be positive or negative\r\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')\r\n * would return May 30, 2021, 11:45:32.984 AM\r\n * @param value A positive or negative number\r\n * @param unit\r\n */\r\n manipulate(value: number, unit: Unit): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n this[unit] += value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a string format.\r\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\r\n * for valid templates and locale objects\r\n * @param template An object. Uses browser defaults otherwise.\r\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\r\n */\r\n format(template: DateTimeFormatOptions, locale = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, template).format(this);\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is before this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isBefore(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() < compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is after this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isAfter(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() > compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is same this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isSame(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() === compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n compare = DateTime.convert(compare);\r\n return (\r\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\r\n * @param left\r\n * @param right\r\n * @param unit.\r\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\r\n * If the inclusivity parameter is used, both indicators must be passed.\r\n */\r\n isBetween(\r\n left: DateTime,\r\n right: DateTime,\r\n unit?: Unit,\r\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\r\n ): boolean {\r\n if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n const leftInclusivity = inclusivity[0] === '(';\r\n const rightInclusivity = inclusivity[1] === ')';\r\n\r\n return (\r\n ((leftInclusivity\r\n ? this.isAfter(left, unit)\r\n : !this.isBefore(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isBefore(right, unit)\r\n : !this.isAfter(right, unit))) ||\r\n ((leftInclusivity\r\n ? this.isBefore(left, unit)\r\n : !this.isAfter(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isAfter(right, unit)\r\n : !this.isBefore(right, unit)))\r\n );\r\n }\r\n\r\n /**\r\n * Returns flattened object of the date. Does not include literals\r\n * @param locale\r\n * @param template\r\n */\r\n parts(\r\n locale = this.locale,\r\n template: any = { dateStyle: 'full', timeStyle: 'long' }\r\n ): any {\r\n const parts = {};\r\n new Intl.DateTimeFormat(locale, template)\r\n .formatToParts(this)\r\n .filter((x) => x.type !== 'literal')\r\n .forEach((x) => (parts[x.type] = x.value));\r\n return parts;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getSeconds()\r\n */\r\n get seconds(): number {\r\n return this.getSeconds();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setSeconds()\r\n */\r\n set seconds(value: number) {\r\n this.setSeconds(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get secondsFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).second;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMinutes()\r\n */\r\n get minutes(): number {\r\n return this.getMinutes();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMinutes()\r\n */\r\n set minutes(value: number) {\r\n this.setMinutes(value);\r\n }\r\n\r\n /**\r\n * Returns two digit minutes\r\n */\r\n get minutesFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).minute;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getHours()\r\n */\r\n get hours(): number {\r\n return this.getHours();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setHours()\r\n */\r\n set hours(value: number) {\r\n this.setHours(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get hoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTwentyFourTemplate).hour;\r\n }\r\n\r\n /**\r\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\r\n */\r\n get twelveHoursFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).hour;\r\n }\r\n\r\n /**\r\n * Get the meridiem of the date. E.g. AM or PM.\r\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\r\n * otherwise it will return AM or PM.\r\n * @param locale\r\n */\r\n meridiem(locale: string = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, {\r\n hour: 'numeric',\r\n hour12: true\r\n } as any)\r\n .formatToParts(this)\r\n .find((p) => p.type === 'dayPeriod')?.value;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDate()\r\n */\r\n get date(): number {\r\n return this.getDate();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setDate()\r\n */\r\n set date(value: number) {\r\n this.setDate(value);\r\n }\r\n\r\n /**\r\n * Return two digit date\r\n */\r\n get dateFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).day;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDay()\r\n */\r\n get weekDay(): number {\r\n return this.getDay();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMonth()\r\n */\r\n get month(): number {\r\n return this.getMonth();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMonth()\r\n */\r\n set month(value: number) {\r\n const targetMonth = new Date(this.year, value + 1);\r\n targetMonth.setDate(0);\r\n const endOfMonth = targetMonth.getDate();\r\n if (this.date > endOfMonth) {\r\n this.date = endOfMonth;\r\n }\r\n this.setMonth(value);\r\n }\r\n\r\n /**\r\n * Return two digit, human expected month. E.g. January = 1, December = 12\r\n */\r\n get monthFormatted(): string {\r\n return this.parts(undefined, twoDigitTemplate).month;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getFullYear()\r\n */\r\n get year(): number {\r\n return this.getFullYear();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setFullYear()\r\n */\r\n set year(value: number) {\r\n this.setFullYear(value);\r\n }\r\n\r\n // borrowed a bunch of stuff from Luxon\r\n /**\r\n * Gets the week of the year\r\n */\r\n get week(): number {\r\n const ordinal = this.computeOrdinal(),\r\n weekday = this.getUTCDay();\r\n\r\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\r\n\r\n if (weekNumber < 1) {\r\n weekNumber = this.weeksInWeekYear(this.year - 1);\r\n } else if (weekNumber > this.weeksInWeekYear(this.year)) {\r\n weekNumber = 1;\r\n }\r\n\r\n return weekNumber;\r\n }\r\n\r\n weeksInWeekYear(weekYear) {\r\n const p1 =\r\n (weekYear +\r\n Math.floor(weekYear / 4) -\r\n Math.floor(weekYear / 100) +\r\n Math.floor(weekYear / 400)) %\r\n 7,\r\n last = weekYear - 1,\r\n p2 =\r\n (last +\r\n Math.floor(last / 4) -\r\n Math.floor(last / 100) +\r\n Math.floor(last / 400)) %\r\n 7;\r\n return p1 === 4 || p2 === 3 ? 53 : 52;\r\n }\r\n\r\n get isLeapYear() {\r\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\r\n }\r\n\r\n private computeOrdinal() {\r\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\r\n }\r\n\r\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\r\n}\r\n","export class TdError extends Error {\r\n code: number;\r\n}\r\n\r\nexport class ErrorMessages {\r\n private base = 'TD:';\r\n\r\n //#region out to console\r\n\r\n /**\r\n * Throws an error indicating that a key in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOption(optionName: string) {\r\n const error = new TdError(\r\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\r\n );\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error indicating that one more keys in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOptions(optionName: string[]) {\r\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option is provide an unsupported value.\r\n * For example a value of 'cheese' for toolbarPlacement which only supports\r\n * 'top', 'bottom', 'default'.\r\n * @param optionName\r\n * @param badValue\r\n * @param validOptions\r\n */\r\n unexpectedOptionValue(\r\n optionName: string,\r\n badValue: string,\r\n validOptions: string[]\r\n ) {\r\n const error = new TdError(\r\n `${\r\n this.base\r\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\r\n ', '\r\n )}`\r\n );\r\n error.code = 2;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is the wrong type.\r\n * For example a string value was provided to multipleDates which only\r\n * supports true or false.\r\n * @param optionName\r\n * @param badType\r\n * @param expectedType\r\n */\r\n typeMismatch(optionName: string, badType: string, expectedType: string) {\r\n const error = new TdError(\r\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\r\n );\r\n error.code = 3;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is outside of the expected range.\r\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\r\n * @param optionName\r\n * @param lower\r\n * @param upper\r\n */\r\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\r\n const error = new TdError(\r\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\r\n );\r\n error.code = 4;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when a value for a date options couldn't be parsed. Either\r\n * the option was an invalid string or an invalid Date object.\r\n * @param optionName\r\n * @param date\r\n * @param soft If true, logs a warning instead of an error.\r\n */\r\n failedToParseDate(optionName: string, date: any, soft = false) {\r\n const error = new TdError(\r\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\r\n );\r\n error.code = 5;\r\n if (!soft) throw error;\r\n console.warn(error);\r\n }\r\n\r\n /**\r\n * Throws when an element to attach to was not provided in the constructor.\r\n */\r\n mustProvideElement() {\r\n const error = new TdError(`${this.base} No element was provided.`);\r\n error.code = 6;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if providing an array for the events to subscribe method doesn't have\r\n * the same number of callbacks. E.g., subscribe([1,2], [1])\r\n */\r\n subscribeMismatch() {\r\n const error = new TdError(\r\n `${this.base} The subscribed events does not match the number of callbacks`\r\n );\r\n error.code = 7;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\r\n */\r\n conflictingConfiguration(message?: string) {\r\n const error = new TdError(\r\n `${this.base} A configuration value conflicts with another rule. ${message}`\r\n );\r\n error.code = 8;\r\n throw error;\r\n }\r\n\r\n /**\r\n * customDateFormat errors\r\n */\r\n customDateFormatError(message?: string) {\r\n const error = new TdError(\r\n `${this.base} customDateFormat: ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Logs a warning if a date option value is provided as a string, instead of\r\n * a date/datetime object.\r\n */\r\n dateString() {\r\n console.warn(\r\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`\r\n );\r\n }\r\n\r\n throwError(message) {\r\n const error = new TdError(\r\n `${this.base} ${message}`\r\n );\r\n error.code = 9;\r\n throw error;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region used with notify.error\r\n\r\n /**\r\n * Used with an Error Event type if the user selects a date that\r\n * fails restriction validation.\r\n */\r\n failedToSetInvalidDate = 'Failed to set invalid date';\r\n\r\n /**\r\n * Used with an Error Event type when a user changes the value of the\r\n * input field directly, and does not provide a valid date.\r\n */\r\n failedToParseInput = 'Failed parse input field';\r\n\r\n //#endregion\r\n}\r\n","import { ErrorMessages } from './errors';\r\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\r\nconst NAME = 'tempus-dominus',\r\n dataKey = 'td';\r\n\r\n/**\r\n * Events\r\n */\r\nclass Events {\r\n key = `.${dataKey}`;\r\n\r\n /**\r\n * Change event. Fired when the user selects a date.\r\n * See also EventTypes.ChangeEvent\r\n */\r\n change = `change${this.key}`;\r\n\r\n /**\r\n * Emit when the view changes for example from month view to the year view.\r\n * See also EventTypes.ViewUpdateEvent\r\n */\r\n update = `update${this.key}`;\r\n\r\n /**\r\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\r\n * See also EventTypes.FailEvent\r\n */\r\n error = `error${this.key}`;\r\n\r\n /**\r\n * Show event\r\n * @event Events#show\r\n */\r\n show = `show${this.key}`;\r\n\r\n /**\r\n * Hide event\r\n * @event Events#hide\r\n */\r\n hide = `hide${this.key}`;\r\n\r\n // blur and focus are used in the jQuery provider but are otherwise unused.\r\n // keyup/down will be used later for keybinding options\r\n\r\n blur = `blur${this.key}`;\r\n focus = `focus${this.key}`;\r\n keyup = `keyup${this.key}`;\r\n keydown = `keydown${this.key}`;\r\n}\r\n\r\nclass Css {\r\n /**\r\n * The outer element for the widget.\r\n */\r\n widget = `${NAME}-widget`;\r\n\r\n /**\r\n * Hold the previous, next and switcher divs\r\n */\r\n calendarHeader = 'calendar-header';\r\n\r\n /**\r\n * The element for the action to change the calendar view. E.g. month -> year.\r\n */\r\n switch = 'picker-switch';\r\n\r\n /**\r\n * The elements for all the toolbar options\r\n */\r\n toolbar = 'toolbar';\r\n\r\n /**\r\n * Disables the hover and rounding affect.\r\n */\r\n noHighlight = 'no-highlight';\r\n\r\n /**\r\n * Applied to the widget element when the side by side option is in use.\r\n */\r\n sideBySide = 'timepicker-sbs';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> July\r\n */\r\n previous = 'previous';\r\n\r\n /**\r\n * The element for the action to change the calendar view, e.g. August -> September\r\n */\r\n next = 'next';\r\n\r\n /**\r\n * Applied to any action that would violate any restriction options. ALso applied\r\n * to an input field if the disabled function is called.\r\n */\r\n disabled = 'disabled';\r\n\r\n /**\r\n * Applied to any date that is less than requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n old = 'old';\r\n\r\n /**\r\n * Applied to any date that is greater than of requested view,\r\n * e.g. the last day of the previous month.\r\n */\r\n new = 'new';\r\n\r\n /**\r\n * Applied to any date that is currently selected.\r\n */\r\n active = 'active';\r\n\r\n //#region date element\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n dateContainer = 'date-container';\r\n\r\n /**\r\n * The outer element for the decades view.\r\n */\r\n decadesContainer = `${this.dateContainer}-decades`;\r\n\r\n /**\r\n * Applied to elements within the decades container, e.g. 2020, 2030\r\n */\r\n decade = 'decade';\r\n\r\n /**\r\n * The outer element for the years view.\r\n */\r\n yearsContainer = `${this.dateContainer}-years`;\r\n\r\n /**\r\n * Applied to elements within the years container, e.g. 2021, 2021\r\n */\r\n year = 'year';\r\n\r\n /**\r\n * The outer element for the month view.\r\n */\r\n monthsContainer = `${this.dateContainer}-months`;\r\n\r\n /**\r\n * Applied to elements within the month container, e.g. January, February\r\n */\r\n month = 'month';\r\n\r\n /**\r\n * The outer element for the calendar view.\r\n */\r\n daysContainer = `${this.dateContainer}-days`;\r\n\r\n /**\r\n * Applied to elements within the day container, e.g. 1, 2..31\r\n */\r\n day = 'day';\r\n\r\n /**\r\n * If display.calendarWeeks is enabled, a column displaying the week of year\r\n * is shown. This class is applied to each cell in that column.\r\n */\r\n calendarWeeks = 'cw';\r\n\r\n /**\r\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\r\n */\r\n dayOfTheWeek = 'dow';\r\n\r\n /**\r\n * Applied to the current date on the calendar view.\r\n */\r\n today = 'today';\r\n\r\n /**\r\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\r\n */\r\n weekend = 'weekend';\r\n\r\n //#endregion\r\n\r\n //#region time element\r\n\r\n /**\r\n * The outer element for all time related elements.\r\n */\r\n timeContainer = 'time-container';\r\n\r\n /**\r\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\r\n */\r\n separator = 'separator';\r\n\r\n /**\r\n * The outer element for the clock view.\r\n */\r\n clockContainer = `${this.timeContainer}-clock`;\r\n\r\n /**\r\n * The outer element for the hours selection view.\r\n */\r\n hourContainer = `${this.timeContainer}-hour`;\r\n\r\n /**\r\n * The outer element for the minutes selection view.\r\n */\r\n minuteContainer = `${this.timeContainer}-minute`;\r\n\r\n /**\r\n * The outer element for the seconds selection view.\r\n */\r\n secondContainer = `${this.timeContainer}-second`;\r\n\r\n /**\r\n * Applied to each element in the hours selection view.\r\n */\r\n hour = 'hour';\r\n\r\n /**\r\n * Applied to each element in the minutes selection view.\r\n */\r\n minute = 'minute';\r\n\r\n /**\r\n * Applied to each element in the seconds selection view.\r\n */\r\n second = 'second';\r\n\r\n /**\r\n * Applied AM/PM toggle button.\r\n */\r\n toggleMeridiem = 'toggleMeridiem';\r\n\r\n //#endregion\r\n\r\n //#region collapse\r\n\r\n /**\r\n * Applied the element of the current view mode, e.g. calendar or clock.\r\n */\r\n show = 'show';\r\n\r\n /**\r\n * Applied to the currently showing view mode during a transition\r\n * between calendar and clock views\r\n */\r\n collapsing = 'td-collapsing';\r\n\r\n /**\r\n * Applied to the currently hidden view mode.\r\n */\r\n collapse = 'td-collapse';\r\n\r\n //#endregion\r\n\r\n /**\r\n * Applied to the widget when the option display.inline is enabled.\r\n */\r\n inline = 'inline';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is light.\r\n */\r\n lightTheme = 'light';\r\n\r\n /**\r\n * Applied to the widget when the option display.theme is dark.\r\n */\r\n darkTheme = 'dark';\r\n\r\n /**\r\n * Used for detecting if the system color preference is dark mode\r\n */\r\n isDarkPreferredQuery = '(prefers-color-scheme: dark)';\r\n}\r\n\r\nexport default class Namespace {\r\n static NAME = NAME;\r\n // noinspection JSUnusedGlobalSymbols\r\n static dataKey = dataKey;\r\n\r\n static events = new Events();\r\n\r\n static css = new Css();\r\n\r\n static errorMessages = new ErrorMessages();\r\n}\r\n","export declare type Constructable = new (...args: any[]) => T;\r\n\r\nclass ServiceLocator {\r\n private cache: Map, unknown | Symbol> = new Map();\r\n\r\n locate(identifier: Constructable): T {\r\n const service = this.cache.get(identifier);\r\n if (service) return service as T;\r\n const value = new identifier();\r\n this.cache.set(identifier, value);\r\n return value;\r\n }\r\n}\r\nexport const setupServiceLocator = () => {\r\n serviceLocator = new ServiceLocator();\r\n}\r\n\r\nexport let serviceLocator: ServiceLocator;\r\n","import { Unit } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\n\nconst CalendarModes: {\n name: keyof ViewMode;\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 default CalendarModes;\n","import {DateTime} from \"../datetime\";\r\nimport CalendarModes from \"./calendar-modes\";\r\nimport ViewMode from \"./view-mode\";\r\nimport Options from \"./options\";\r\n\r\nexport class OptionsStore {\r\n options: Options;\r\n element: HTMLElement;\r\n viewDate = new DateTime();\r\n input: HTMLInputElement;\r\n unset: boolean;\r\n private _currentCalendarViewMode = 0;\r\n get currentCalendarViewMode() {\r\n return this._currentCalendarViewMode;\r\n }\r\n\r\n set currentCalendarViewMode(value) {\r\n this._currentCalendarViewMode = value;\r\n this.currentView = CalendarModes[value].name;\r\n }\r\n\r\n /**\r\n * When switching back to the calendar from the clock,\r\n * this sets currentView to the correct calendar view.\r\n */\r\n refreshCurrentView() {\r\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\r\n }\r\n\r\n minimumCalendarViewMode = 0;\r\n currentView: keyof ViewMode = 'calendar';\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\n\r\n/**\r\n * Main class for date validation rules based on the options provided.\r\n */\r\nexport default class Validation {\r\n private optionsStore: OptionsStore;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n }\r\n\r\n /**\r\n * Checks to see if the target date is valid based on the rules provided in the options.\r\n * Granularity can be provided to check portions of the date instead of the whole.\r\n * @param targetDate\r\n * @param granularity\r\n */\r\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\r\n if (\r\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\r\n this._isInDisabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\r\n !this._isInEnabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n granularity !== Unit.month &&\r\n granularity !== Unit.year &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\r\n targetDate.weekDay\r\n ) !== -1\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.optionsStore.options.restrictions.minDate &&\r\n targetDate.isBefore(\r\n this.optionsStore.options.restrictions.minDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.maxDate &&\r\n targetDate.isAfter(\r\n this.optionsStore.options.restrictions.maxDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n granularity === Unit.hours ||\r\n granularity === Unit.minutes ||\r\n granularity === Unit.seconds\r\n ) {\r\n if (\r\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\r\n this._isInDisabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\r\n !this._isInEnabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0\r\n ) {\r\n for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) {\r\n if (\r\n targetDate.isBetween(\r\n disabledTimeIntervals.from,\r\n disabledTimeIntervals.to\r\n )\r\n )\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledDates ||\r\n this.optionsStore.options.restrictions.disabledDates.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.disabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledDates ||\r\n this.optionsStore.options.restrictions.enabledDates.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.enabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledHours ||\r\n this.optionsStore.options.restrictions.disabledHours.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.disabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledHours ||\r\n this.optionsStore.options.restrictions.enabledHours.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.enabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n}\r\n","import { Unit } from '../datetime';\r\nimport ActionTypes from './action-types';\r\nimport { BaseEvent } from './event-types';\r\n\r\nexport type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all';\r\n\r\nexport class EventEmitter {\r\n private subscribers: ((value?: T) => void)[] = [];\r\n\r\n subscribe(callback: (value: T) => void) {\r\n this.subscribers.push(callback);\r\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\r\n }\r\n\r\n unsubscribe(index: number) {\r\n this.subscribers.splice(index, 1);\r\n }\r\n\r\n emit(value?: T) {\r\n this.subscribers.forEach((callback) => {\r\n callback(value);\r\n });\r\n }\r\n\r\n destroy() {\r\n this.subscribers = null;\r\n this.subscribers = [];\r\n }\r\n}\r\n\r\nexport class EventEmitters {\r\n triggerEvent = new EventEmitter();\r\n viewUpdate = new EventEmitter();\r\n updateDisplay = new EventEmitter();\r\n action = new EventEmitter<{ e: any; action?: ActionTypes }>();\r\n\r\n destroy() {\r\n this.triggerEvent.destroy();\r\n this.viewUpdate.destroy();\r\n this.updateDisplay.destroy();\r\n this.action.destroy();\r\n }\r\n}\r\n","import Options from './options';\r\nimport { DateTime } from '../datetime';\r\n\r\nconst DefaultOptions: Options = {\r\n restrictions: {\r\n minDate: undefined,\r\n maxDate: undefined,\r\n disabledDates: [],\r\n enabledDates: [],\r\n daysOfWeekDisabled: [],\r\n disabledTimeIntervals: [],\r\n disabledHours: [],\r\n enabledHours: []\r\n },\r\n display: {\r\n icons: {\r\n type: 'icons',\r\n time: 'fa-solid fa-clock',\r\n date: 'fa-solid fa-calendar',\r\n up: 'fa-solid fa-arrow-up',\r\n down: 'fa-solid fa-arrow-down',\r\n previous: 'fa-solid fa-chevron-left',\r\n next: 'fa-solid fa-chevron-right',\r\n today: 'fa-solid fa-calendar-check',\r\n clear: 'fa-solid fa-trash',\r\n close: 'fa-solid fa-xmark'\r\n },\r\n sideBySide: false,\r\n calendarWeeks: false,\r\n viewMode: 'calendar',\r\n toolbarPlacement: 'bottom',\r\n keepOpen: false,\r\n buttons: {\r\n today: false,\r\n clear: false,\r\n close: false\r\n },\r\n components: {\r\n calendar: true,\r\n date: true,\r\n month: true,\r\n year: true,\r\n decades: true,\r\n clock: true,\r\n hours: true,\r\n minutes: true,\r\n seconds: false,\r\n useTwentyfourHour: undefined\r\n },\r\n inline: false,\r\n theme: 'auto'\r\n },\r\n stepping: 1,\r\n useCurrent: true,\r\n defaultDate: undefined,\r\n localization: {\r\n today: 'Go to today',\r\n clear: 'Clear selection',\r\n close: 'Close the picker',\r\n selectMonth: 'Select Month',\r\n previousMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n selectYear: 'Select Year',\r\n previousYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n selectDecade: 'Select Decade',\r\n previousDecade: 'Previous Decade',\r\n nextDecade: 'Next Decade',\r\n previousCentury: 'Previous Century',\r\n nextCentury: 'Next Century',\r\n pickHour: 'Pick Hour',\r\n incrementHour: 'Increment Hour',\r\n decrementHour: 'Decrement Hour',\r\n pickMinute: 'Pick Minute',\r\n incrementMinute: 'Increment Minute',\r\n decrementMinute: 'Decrement Minute',\r\n pickSecond: 'Pick Second',\r\n incrementSecond: 'Increment Second',\r\n decrementSecond: 'Decrement Second',\r\n toggleMeridiem: 'Toggle Meridiem',\r\n selectTime: 'Select Time',\r\n selectDate: 'Select Date',\r\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\r\n locale: 'default',\r\n startOfTheWeek: 0,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n dateFormats: {\r\n LTS: 'h:mm:ss T',\r\n LT: 'h:mm T',\r\n L: 'MM/dd/yyyy',\r\n LL: 'MMMM d, yyyy',\r\n LLL: 'MMMM d, yyyy h:mm T',\r\n LLLL: 'dddd, MMMM d, yyyy h:mm T',\r\n },\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n ordinal: (n) => n,\r\n /**\r\n * This is only used with the customDateFormat plugin\r\n */\r\n format: 'L'\r\n },\r\n keepInvalid: false,\r\n debug: false,\r\n allowInputToggle: false,\r\n viewDate: new DateTime(),\r\n multipleDates: false,\r\n multipleDatesSeparator: '; ',\r\n promptTimeOnDateChange: false,\r\n promptTimeOnDateChangeTransitionDelay: 200,\r\n meta: {},\r\n container: undefined\r\n};\r\n\r\nexport default DefaultOptions;\r\n","import Namespace from './namespace';\r\nimport { DateTime } from '../datetime';\r\nimport DefaultOptions from './default-options';\r\nimport Options, { FormatLocalization } from './options';\r\n\r\nexport class OptionConverter {\r\n\r\n private static ignoreProperties = ['meta', 'dayViewHeaderFormat',\r\n 'container', 'dateForms', 'ordinal'];\r\n\r\n static deepCopy(input): Options {\r\n const o = {};\r\n\r\n Object.keys(input).forEach((key) => {\r\n const inputElement = input[key];\r\n o[key] = inputElement;\r\n if (typeof inputElement !== 'object' ||\r\n inputElement instanceof HTMLElement ||\r\n inputElement instanceof Element ||\r\n inputElement instanceof Date) return;\r\n if (!Array.isArray(inputElement)) {\r\n o[key] = OptionConverter.deepCopy(inputElement);\r\n }\r\n });\r\n\r\n return o;\r\n }\r\n\r\n private static isValue = a => a != null; // everything except undefined + null\r\n\r\n /**\r\n * Finds value out of an object based on a string, period delimited, path\r\n * @param paths\r\n * @param obj\r\n */\r\n static objectPath(paths: string, obj) {\r\n if (paths.charAt(0) === '.')\r\n paths = paths.slice(1);\r\n if (!paths) return obj;\r\n return paths.split('.')\r\n .reduce((value, key) => (OptionConverter.isValue(value) || OptionConverter.isValue(value[key]) ?\r\n value[key] :\r\n undefined), obj);\r\n }\r\n\r\n /**\r\n * The spread operator caused sub keys to be missing after merging.\r\n * This is to fix that issue by using spread on the child objects first.\r\n * Also handles complex options like disabledDates\r\n * @param provided An option from new providedOptions\r\n * @param copyTo Destination object. This was added to prevent reference copies\r\n * @param path\r\n * @param localization\r\n */\r\n static spread(provided, copyTo, path = '', localization: FormatLocalization) {\r\n const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);\r\n\r\n const unsupportedOptions = Object.keys(provided).filter(\r\n (x) => !Object.keys(defaultOptions).includes(x)\r\n );\r\n\r\n if (unsupportedOptions.length > 0) {\r\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\r\n\r\n const errors = unsupportedOptions.map((x) => {\r\n let error = `\"${path}.${x}\" in not a known option.`;\r\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\r\n if (didYouMean) error += ` Did you mean \"${didYouMean}\"?`;\r\n return error;\r\n });\r\n Namespace.errorMessages.unexpectedOptions(errors);\r\n }\r\n\r\n Object.keys(provided).filter(key => key !== '__proto__' && key !== 'constructor').forEach((key) => {\r\n path += `.${key}`;\r\n if (path.charAt(0) === '.') path = path.slice(1);\r\n\r\n const defaultOptionValue = defaultOptions[key];\r\n let providedType = typeof provided[key];\r\n let defaultType = typeof defaultOptionValue;\r\n let value = provided[key];\r\n\r\n if (value === undefined || value === null) {\r\n copyTo[key] = value;\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n return;\r\n }\r\n\r\n if (typeof defaultOptionValue === 'object' &&\r\n !Array.isArray(provided[key]) &&\r\n !(defaultOptionValue instanceof Date || OptionConverter.ignoreProperties.includes(key))) {\r\n OptionConverter.spread(provided[key], copyTo[key], path, localization);\r\n } else {\r\n copyTo[key] = OptionConverter.processKey(key, value, providedType, defaultType, path, localization);\r\n }\r\n\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n });\r\n }\r\n\r\n static processKey(key, value, providedType, defaultType, path, localization: FormatLocalization) {\r\n switch (key) {\r\n case 'defaultDate': {\r\n const dateTime = this.dateConversion(value, 'defaultDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'defaultDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'viewDate': {\r\n const dateTime = this.dateConversion(value, 'viewDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'viewDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'minDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.minDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.minDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'maxDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this.dateConversion(value, 'restrictions.maxDate', localization);\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(localization.locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.maxDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n break;\r\n }\r\n case 'disabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.disabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.disabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'enabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.enabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.enabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'daysOfWeekDisabled':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.daysOfWeekDisabled',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 6).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.daysOfWeekDisabled',\r\n 0,\r\n 6\r\n );\r\n return value;\r\n case 'enabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.enabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.disabledDates',\r\n value,\r\n providedType,\r\n localization\r\n );\r\n return value;\r\n case 'disabledTimeIntervals':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n key,\r\n providedType,\r\n 'array of { from: DateTime|Date, to: DateTime|Date }'\r\n );\r\n }\r\n const valueObject = value as { from: any; to: any }[];\r\n for (let i = 0; i < valueObject.length; i++) {\r\n Object.keys(valueObject[i]).forEach((vk) => {\r\n const subOptionName = `${key}[${i}].${vk}`;\r\n let d = valueObject[i][vk];\r\n const dateTime = this.dateConversion(d, subOptionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n subOptionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization.locale);\r\n valueObject[i][vk] = dateTime;\r\n });\r\n }\r\n return valueObject;\r\n case 'toolbarPlacement':\r\n case 'type':\r\n case 'viewMode':\r\n case 'theme':\r\n const optionValues = {\r\n toolbarPlacement: ['top', 'bottom', 'default'],\r\n type: ['icons', 'sprites'],\r\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\r\n theme: ['light', 'dark', 'auto']\r\n };\r\n const keyOptions = optionValues[key];\r\n if (!keyOptions.includes(value))\r\n Namespace.errorMessages.unexpectedOptionValue(\r\n path.substring(1),\r\n value,\r\n keyOptions\r\n );\r\n\r\n return value;\r\n case 'meta':\r\n case 'dayViewHeaderFormat':\r\n return value;\r\n case 'container':\r\n if (\r\n value &&\r\n !(\r\n value instanceof HTMLElement ||\r\n value instanceof Element ||\r\n value?.appendChild\r\n )\r\n ) {\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n typeof value,\r\n 'HTMLElement'\r\n );\r\n }\r\n return value;\r\n case 'useTwentyfourHour':\r\n if (value === undefined || providedType === 'boolean') return value;\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n break;\r\n default:\r\n switch (defaultType) {\r\n case 'boolean':\r\n return value === 'true' || value === true;\r\n case 'number':\r\n return +value;\r\n case 'string':\r\n return value.toString();\r\n case 'object':\r\n return {};\r\n case 'function':\r\n return value;\r\n default:\r\n Namespace.errorMessages.typeMismatch(\r\n path,\r\n providedType,\r\n defaultType\r\n );\r\n }\r\n }\r\n }\r\n\r\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\r\n const newConfig = OptionConverter.deepCopy(mergeTo);\r\n //see if the options specify a locale\r\n const localization =\r\n mergeTo.localization?.locale !== 'default'\r\n ? mergeTo.localization\r\n : providedOptions?.localization || DefaultOptions.localization;\r\n\r\n OptionConverter.spread(providedOptions, newConfig, '', localization);\r\n\r\n return newConfig;\r\n }\r\n\r\n static _dataToOptions(element, options: Options): Options {\r\n const eData = JSON.parse(JSON.stringify(element.dataset));\r\n\r\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\r\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\r\n\r\n if (\r\n !eData ||\r\n Object.keys(eData).length === 0 ||\r\n eData.constructor !== DOMStringMap\r\n )\r\n return options;\r\n let dataOptions = {} as Options;\r\n\r\n // because dataset returns camelCase including the 'td' key the option\r\n // key won't align\r\n const objectToNormalized = (object) => {\r\n const lowered = {};\r\n Object.keys(object).forEach((x) => {\r\n lowered[x.toLowerCase()] = x;\r\n });\r\n\r\n return lowered;\r\n };\r\n\r\n const rabbitHole = (\r\n split: string[],\r\n index: number,\r\n optionSubgroup: {},\r\n value: any\r\n ) => {\r\n // first round = display { ... }\r\n const normalizedOptions = objectToNormalized(optionSubgroup);\r\n\r\n const keyOption = normalizedOptions[split[index].toLowerCase()];\r\n const internalObject = {};\r\n\r\n if (keyOption === undefined) return internalObject;\r\n\r\n // if this is another object, continue down the rabbit hole\r\n if (optionSubgroup[keyOption].constructor === Object) {\r\n index++;\r\n internalObject[keyOption] = rabbitHole(\r\n split,\r\n index,\r\n optionSubgroup[keyOption],\r\n value\r\n );\r\n } else {\r\n internalObject[keyOption] = value;\r\n }\r\n return internalObject;\r\n };\r\n const optionsLower = objectToNormalized(options);\r\n\r\n Object.keys(eData)\r\n .filter((x) => x.startsWith(Namespace.dataKey))\r\n .map((x) => x.substring(2))\r\n .forEach((key) => {\r\n let keyOption = optionsLower[key.toLowerCase()];\r\n\r\n // dataset merges dashes to camelCase... yay\r\n // i.e. key = display_components_seconds\r\n if (key.includes('_')) {\r\n // [display, components, seconds]\r\n const split = key.split('_');\r\n // display\r\n keyOption = optionsLower[split[0].toLowerCase()];\r\n if (\r\n keyOption !== undefined &&\r\n options[keyOption].constructor === Object\r\n ) {\r\n dataOptions[keyOption] = rabbitHole(\r\n split,\r\n 1,\r\n options[keyOption],\r\n eData[`td${key}`]\r\n );\r\n }\r\n }\r\n // or key = multipleDate\r\n else if (keyOption !== undefined) {\r\n dataOptions[keyOption] = eData[`td${key}`];\r\n }\r\n });\r\n\r\n return this._mergeOptions(dataOptions, options);\r\n }\r\n\r\n /**\r\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\r\n * @param d If a string will attempt creating a date from it.\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n * @private\r\n */\r\n static _dateTypeCheck(d: any, localization: FormatLocalization): DateTime | null {\r\n if (d.constructor.name === DateTime.name) return d;\r\n if (d.constructor.name === Date.name) {\r\n return DateTime.convert(d);\r\n }\r\n if (typeof d === typeof '') {\r\n const dateTime = DateTime.fromString(d, localization);\r\n if (JSON.stringify(dateTime) === 'null') {\r\n return null;\r\n }\r\n return dateTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of Date or DateTime\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n * @param localization\r\n */\r\n static _typeCheckDateArray(\r\n optionName: string,\r\n value,\r\n providedType: string,\r\n localization: FormatLocalization\r\n ) {\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of DateTime or Date'\r\n );\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n let d = value[i];\r\n const dateTime = this.dateConversion(d, optionName, localization);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(localization?.locale ?? 'default');\r\n value[i] = dateTime;\r\n }\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of numbers\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckNumberArray(\r\n optionName: string,\r\n value,\r\n providedType: string\r\n ) {\r\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of numbers'\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to convert `d` to a DateTime object\r\n * @param d value to convert\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param localization object containing locale and format settings. Only used with the custom formats\r\n */\r\n static dateConversion(d: any, optionName: string, localization: FormatLocalization): DateTime {\r\n if (typeof d === typeof '' && optionName !== 'input') {\r\n Namespace.errorMessages.dateString();\r\n }\r\n\r\n const converted = this._dateTypeCheck(d, localization);\r\n\r\n if (!converted) {\r\n Namespace.errorMessages.failedToParseDate(\r\n optionName,\r\n d,\r\n optionName === 'input'\r\n );\r\n }\r\n return converted;\r\n }\r\n\r\n private static _flattenDefaults: string[];\r\n\r\n private static getFlattenDefaultOptions(): string[] {\r\n if (this._flattenDefaults) return this._flattenDefaults;\r\n const deepKeys = (t, pre = []) => {\r\n if (Array.isArray(t)) return [];\r\n if (Object(t) === t) {\r\n return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));\r\n } else {\r\n return pre.join('.');\r\n }\r\n };\r\n\r\n this._flattenDefaults = deepKeys(DefaultOptions);\r\n\r\n return this._flattenDefaults;\r\n }\r\n\r\n /**\r\n * Some options conflict like min/max date. Verify that these kinds of options\r\n * are set correctly.\r\n * @param config\r\n */\r\n static _validateConflicts(config: Options) {\r\n if (\r\n config.display.sideBySide &&\r\n (!config.display.components.clock ||\r\n !(\r\n config.display.components.hours ||\r\n config.display.components.minutes ||\r\n config.display.components.seconds\r\n ))\r\n ) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'Cannot use side by side mode without the clock components'\r\n );\r\n }\r\n\r\n if (config.restrictions.minDate && config.restrictions.maxDate) {\r\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'minDate is after maxDate'\r\n );\r\n }\r\n\r\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'maxDate is before minDate'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\r\nimport Validation from './validation';\r\nimport { serviceLocator } from './utilities/service-locator';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\n\r\nexport default class Dates {\r\n private _dates: DateTime[] = [];\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n }\r\n\r\n /**\r\n * Returns the array of selected dates\r\n */\r\n get picked(): DateTime[] {\r\n return this._dates;\r\n }\r\n\r\n /**\r\n * Returns the last picked value.\r\n */\r\n get lastPicked(): DateTime {\r\n return this._dates[this.lastPickedIndex];\r\n }\r\n\r\n /**\r\n * Returns the length of picked dates -1 or 0 if none are selected.\r\n */\r\n get lastPickedIndex(): number {\r\n if (this._dates.length === 0) return 0;\r\n return this._dates.length - 1;\r\n }\r\n\r\n /**\r\n * Formats a DateTime object to a string. Used when setting the input value.\r\n * @param date\r\n */\r\n formatInput(date: DateTime): string {\r\n const components = this.optionsStore.options.display.components;\r\n if (!date) return '';\r\n return date.format({\r\n year: components.calendar && components.year ? 'numeric' : undefined,\r\n month: components.calendar && components.month ? '2-digit' : undefined,\r\n day: components.calendar && components.date ? '2-digit' : undefined,\r\n hour:\r\n components.clock && components.hours\r\n ? components.useTwentyfourHour\r\n ? '2-digit'\r\n : 'numeric'\r\n : undefined,\r\n minute: components.clock && components.minutes ? '2-digit' : undefined,\r\n second: components.clock && components.seconds ? '2-digit' : undefined,\r\n hour12: !components.useTwentyfourHour,\r\n });\r\n }\r\n \r\n /**\r\n * parse the value into a DateTime object.\r\n * this can be overwritten to supply your own parsing.\r\n */\r\n parseInput(value:any): DateTime {\r\n return OptionConverter.dateConversion(value, 'input', this.optionsStore.options.localization);\r\n }\r\n\r\n /**\r\n * Tries to convert the provided value to a DateTime object.\r\n * If value is null|undefined then clear the value of the provided index (or 0).\r\n * @param value Value to convert or null|undefined\r\n * @param index When using multidates this is the index in the array\r\n */\r\n setFromInput(value: any, index?: number) {\r\n if (!value) {\r\n this.setValue(undefined, index);\r\n return;\r\n }\r\n const converted = this.parseInput(value);\r\n if (converted) {\r\n converted.setLocale(this.optionsStore.options.localization.locale);\r\n this.setValue(converted, index);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a new DateTime to selected dates array\r\n * @param date\r\n */\r\n add(date: DateTime): void {\r\n this._dates.push(date);\r\n }\r\n\r\n /**\r\n * Returns true if the `targetDate` is part of the selected dates array.\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return (\r\n this._dates\r\n .map((x) => x.format(format))\r\n .find((x) => x === innerDateFormatted) !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the index at which `targetDate` is in the array.\r\n * This is used for updating or removing a date when multi-date is used\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\r\n if (!unit) return this._dates.indexOf(targetDate);\r\n\r\n const format = getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\r\n }\r\n\r\n /**\r\n * Clears all selected dates.\r\n */\r\n clear() {\r\n this.optionsStore.unset = true;\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate: this.lastPicked,\r\n isClear: true,\r\n isValid: true,\r\n } as ChangeEvent);\r\n this._dates = [];\r\n }\r\n\r\n /**\r\n * Find the \"book end\" years given a `year` and a `factor`\r\n * @param factor e.g. 100 for decades\r\n * @param year e.g. 2021\r\n */\r\n static getStartEndYear(\r\n factor: number,\r\n year: number\r\n ): [number, number, number] {\r\n const step = factor / 10,\r\n startYear = Math.floor(year / factor) * factor,\r\n endYear = startYear + step * 9,\r\n focusValue = Math.floor(year / step) * step;\r\n return [startYear, endYear, focusValue];\r\n }\r\n\r\n /**\r\n * Attempts to either clear or set the `target` date at `index`.\r\n * If the `target` is null then the date will be cleared.\r\n * If multi-date is being used then it will be removed from the array.\r\n * If `target` is valid and multi-date is used then if `index` is\r\n * provided the date at that index will be replaced, otherwise it is appended.\r\n * @param target\r\n * @param index\r\n */\r\n setValue(target?: DateTime, index?: number): void {\r\n const noIndex = typeof index === 'undefined',\r\n isClear = !target && noIndex;\r\n let oldDate = this.optionsStore.unset ? null : this._dates[index];\r\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\r\n oldDate = this.lastPicked;\r\n }\r\n\r\n const updateInput = () => {\r\n if (!this.optionsStore.input) return;\r\n\r\n let newValue = this.formatInput(target);\r\n if (this.optionsStore.options.multipleDates) {\r\n newValue = this._dates\r\n .map((d) => this.formatInput(d))\r\n .join(this.optionsStore.options.multipleDatesSeparator);\r\n }\r\n if (this.optionsStore.input.value != newValue)\r\n this.optionsStore.input.value = newValue;\r\n };\r\n\r\n if (target && oldDate?.isSame(target)) {\r\n updateInput();\r\n return;\r\n }\r\n\r\n // case of calling setValue(null)\r\n if (!target) {\r\n if (\r\n !this.optionsStore.options.multipleDates ||\r\n this._dates.length === 1 ||\r\n isClear\r\n ) {\r\n this.optionsStore.unset = true;\r\n this._dates = [];\r\n } else {\r\n this._dates.splice(index, 1);\r\n }\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n\r\n this._eventEmitters.updateDisplay.emit('all');\r\n return;\r\n }\r\n\r\n index = index || 0;\r\n target = target.clone;\r\n\r\n // minute stepping is being used, force the minute to the closest value\r\n if (this.optionsStore.options.stepping !== 1) {\r\n target.minutes =\r\n Math.round(target.minutes / this.optionsStore.options.stepping) *\r\n this.optionsStore.options.stepping;\r\n target.seconds = 0;\r\n }\r\n\r\n if (this.validation.isValid(target)) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this.optionsStore.unset = false;\r\n this._eventEmitters.updateDisplay.emit('all');\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.keepInvalid) {\r\n this._dates[index] = target;\r\n this.optionsStore.viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: false,\r\n } as ChangeEvent);\r\n }\r\n\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.error,\r\n reason: Namespace.errorMessages.failedToSetInvalidDate,\r\n date: target,\r\n oldDate,\r\n } as FailEvent);\r\n }\r\n}\r\n","enum ActionTypes {\n next = 'next',\n previous = 'previous',\n changeCalendarView = 'changeCalendarView',\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 toggleMeridiem = 'toggleMeridiem',\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\nexport default ActionTypes;\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport Dates from \"../../dates\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `date`\r\n */\r\nexport default class DateDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.daysContainer);\r\n\r\n container.append(...this._daysOfTheWeek());\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\r\n container.appendChild(div);\r\n }\r\n\r\n for (let i = 0; i < 42; i++) {\r\n if (i !== 0 && i % 7 === 0) {\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const div = document.createElement(\"div\");\r\n div.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n container.appendChild(div);\r\n }\r\n }\r\n\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDay);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.daysContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"calendar\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.daysContainer,\r\n this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n )\r\n );\r\n\r\n this.optionsStore.options.display.components.month\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\r\n Unit.month\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\r\n Unit.month\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.month)\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .manipulate(12, Unit.hours);\r\n\r\n container\r\n .querySelectorAll(\r\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\r\n )\r\n .forEach((containerClone: HTMLElement) => {\r\n if (\r\n this.optionsStore.options.display.calendarWeeks &&\r\n containerClone.classList.contains(Namespace.css.calendarWeeks)\r\n ) {\r\n if (containerClone.innerText === \"#\") return;\r\n containerClone.innerText = `${innerDate.week}`;\r\n return;\r\n }\r\n\r\n let classes: string[] = [];\r\n classes.push(Namespace.css.day);\r\n\r\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.old);\r\n }\r\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\r\n classes.push(Namespace.css.new);\r\n }\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.date)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.date)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n if (innerDate.isSame(new DateTime(), Unit.date)) {\r\n classes.push(Namespace.css.today);\r\n }\r\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\r\n classes.push(Namespace.css.weekend);\r\n }\r\n\r\n paint(Unit.date, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\r\n );\r\n containerClone.setAttribute(\"data-day\", `${innerDate.date}`);\r\n containerClone.innerText = innerDate.format({ day: \"numeric\" });\r\n innerDate.manipulate(1, Unit.date);\r\n });\r\n }\r\n\r\n /***\r\n * Generates an html row that contains the days of the week.\r\n * @private\r\n */\r\n private _daysOfTheWeek(): HTMLElement[] {\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(\"weekDay\", this.optionsStore.options.localization.startOfTheWeek)\r\n .startOf(Unit.date);\r\n const row = [];\r\n document.createElement(\"div\");\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.calendarWeeks,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = \"#\";\r\n row.push(htmlDivElement);\r\n }\r\n\r\n for (let i = 0; i < 7; i++) {\r\n const htmlDivElement = document.createElement(\"div\");\r\n htmlDivElement.classList.add(\r\n Namespace.css.dayOfTheWeek,\r\n Namespace.css.noHighlight\r\n );\r\n htmlDivElement.innerText = innerDate.format({ weekday: \"short\" });\r\n innerDate.manipulate(1, Unit.date);\r\n row.push(htmlDivElement);\r\n }\r\n\r\n return row;\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { Paint } from '../index';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `month`\r\n */\r\nexport default class MonthDisplay {\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.monthsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMonth);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.monthsContainer\r\n )[0];\r\n\r\n if(this.optionsStore.currentView === 'months') {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.monthsContainer,\r\n this.optionsStore.viewDate.format({ year: 'numeric' })\r\n );\r\n\r\n this.optionsStore.options.display.components.year\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\r\n Unit.year\r\n )\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\r\n Unit.year\r\n )\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n let classes = [];\r\n classes.push(Namespace.css.month);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.month)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.month)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.month, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${index}`);\r\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\r\n innerDate.manipulate(1, Unit.month);\r\n });\r\n }\r\n}\r\n","import { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Dates from \"../../dates\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `year`\r\n */\r\nexport default class YearDisplay {\r\n private _startYear: DateTime;\r\n private _endYear: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.yearsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectYear);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year);\r\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.yearsContainer\r\n )[0];\r\n\r\n if (this.optionsStore.currentView === \"years\") {\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n switcher.setAttribute(\r\n Namespace.css.yearsContainer,\r\n `${this._startYear.format({ year: \"numeric\" })}-${this._endYear.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.optionsStore.options.display.components.decades\r\n ? switcher.classList.remove(Namespace.css.disabled)\r\n : switcher.classList.add(Namespace.css.disabled);\r\n\r\n this.validation.isValid(this._startYear, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endYear, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n let innerDate = this.optionsStore.viewDate.clone\r\n .startOf(Unit.year)\r\n .manipulate(-1, Unit.year);\r\n\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.year);\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n this.dates.isPicked(innerDate, Unit.year)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this.validation.isValid(innerDate, Unit.year)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.year, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\"data-value\", `${innerDate.year}`);\r\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\r\n\r\n innerDate.manipulate(1, Unit.year);\r\n });\r\n }\r\n}\r\n","import Dates from \"../../dates\";\r\nimport { DateTime, Unit } from \"../../datetime\";\r\nimport Namespace from \"../../utilities/namespace\";\r\nimport Validation from \"../../validation\";\r\nimport { Paint } from \"../index\";\r\nimport { serviceLocator } from \"../../utilities/service-locator\";\r\nimport ActionTypes from \"../../utilities/action-types\";\r\nimport { OptionsStore } from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class DecadeDisplay {\r\n private _startDecade: DateTime;\r\n private _endDecade: DateTime;\r\n private optionsStore: OptionsStore;\r\n private dates: Dates;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker() {\r\n const container = document.createElement(\"div\");\r\n container.classList.add(Namespace.css.decadesContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement(\"div\");\r\n div.setAttribute(\"data-action\", ActionTypes.selectDecade);\r\n container.appendChild(div);\r\n }\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint) {\r\n const [start, end] = Dates.getStartEndYear(\r\n 100,\r\n this.optionsStore.viewDate.year\r\n );\r\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._startDecade.year = start;\r\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\r\n this._endDecade.year = end;\r\n\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.decadesContainer\r\n )[0];\r\n\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName(\"div\");\r\n\r\n if (this.optionsStore.currentView === 'decades') {\r\n switcher.setAttribute(\r\n Namespace.css.decadesContainer,\r\n `${this._startDecade.format({ year: \"numeric\" })}-${this._endDecade.format({ year: \"numeric\" })}`\r\n );\r\n\r\n this.validation.isValid(this._startDecade, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this.validation.isValid(this._endDecade, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n }\r\n\r\n const pickedYears = this.dates.picked.map((x) => x.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n if (index === 0) {\r\n containerClone.classList.add(Namespace.css.old);\r\n if (this._startDecade.year - 10 < 0) {\r\n containerClone.textContent = \" \";\r\n previous.classList.add(Namespace.css.disabled);\r\n containerClone.classList.add(Namespace.css.disabled);\r\n containerClone.setAttribute(\"data-value\", ``);\r\n return;\r\n } else {\r\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: \"numeric\" });\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n return;\r\n }\r\n }\r\n\r\n let classes = [];\r\n classes.push(Namespace.css.decade);\r\n const startDecadeYear = this._startDecade.year;\r\n const endDecadeYear = this._startDecade.year + 9;\r\n\r\n if (\r\n !this.optionsStore.unset &&\r\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\r\n .length > 0\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n\r\n paint(\"decade\", this._startDecade, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n \"data-value\",\r\n `${this._startDecade.year}`\r\n );\r\n containerClone.innerText = `${this._startDecade.format({ year: \"numeric\" })}`;\r\n\r\n this._startDecade.manipulate(10, Unit.year);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport Dates from '../../dates';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates the clock display\r\n */\r\nexport default class TimeDisplay {\r\n private _gridColumns = '';\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n\r\n /**\r\n * Build the container html for the clock display\r\n * @private\r\n */\r\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.clockContainer);\r\n\r\n container.append(...this._grid(iconTag));\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the various elements with in the clock display\r\n * like the current hour and if the manipulation icons are enabled.\r\n * @private\r\n */\r\n _update(widget: HTMLElement): void {\r\n const timesDiv = (\r\n widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0]\r\n );\r\n const lastPicked = (\r\n this.dates.lastPicked || this.optionsStore.viewDate\r\n ).clone;\r\n\r\n timesDiv\r\n .querySelectorAll('.disabled')\r\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\r\n Unit.hours\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.hours}]`\r\n ).innerText = this.optionsStore.options.display.components.useTwentyfourHour\r\n ? lastPicked.hoursFormatted\r\n : lastPicked.twelveHoursFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\r\n Unit.minutes\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.minutes}]`\r\n ).innerText = lastPicked.minutesFormatted;\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n\r\n if (\r\n !this.validation.isValid(\r\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\r\n Unit.seconds\r\n )\r\n ) {\r\n timesDiv\r\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\r\n .classList.add(Namespace.css.disabled);\r\n }\r\n timesDiv.querySelector(\r\n `[data-time-component=${Unit.seconds}]`\r\n ).innerText = lastPicked.secondsFormatted;\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n const toggle = timesDiv.querySelector(\r\n `[data-action=${ActionTypes.toggleMeridiem}]`\r\n );\r\n\r\n toggle.innerText = lastPicked.meridiem();\r\n\r\n if (\r\n !this.validation.isValid(\r\n lastPicked.clone.manipulate(\r\n lastPicked.hours >= 12 ? -12 : 12,\r\n Unit.hours\r\n )\r\n )\r\n ) {\r\n toggle.classList.add(Namespace.css.disabled);\r\n } else {\r\n toggle.classList.remove(Namespace.css.disabled);\r\n }\r\n }\r\n\r\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\r\n }\r\n\r\n /**\r\n * Creates the table for the clock display depending on what options are selected.\r\n * @private\r\n */\r\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\r\n this._gridColumns = '';\r\n const top = [],\r\n middle = [],\r\n bottom = [],\r\n separator = document.createElement('div'),\r\n upIcon = iconTag(\r\n this.optionsStore.options.display.icons.up\r\n ),\r\n downIcon = iconTag(\r\n this.optionsStore.options.display.icons.down\r\n );\r\n\r\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\r\n const separatorColon = separator.cloneNode(true);\r\n separatorColon.innerHTML = ':';\r\n\r\n const getSeparator = (colon = false): HTMLElement => {\r\n return colon\r\n ? separatorColon.cloneNode(true)\r\n : separator.cloneNode(true);\r\n };\r\n\r\n if (this.optionsStore.options.display.components.hours) {\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showHours);\r\n divElement.setAttribute('data-time-component', Unit.hours);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementHour\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n this._gridColumns += 'a';\r\n }\r\n\r\n if (this.optionsStore.options.display.components.minutes) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.hours) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\r\n divElement.setAttribute('data-time-component', Unit.minutes);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementMinute\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (this.optionsStore.options.display.components.seconds) {\r\n this._gridColumns += ' a';\r\n if (this.optionsStore.options.display.components.minutes) {\r\n top.push(getSeparator());\r\n middle.push(getSeparator(true));\r\n bottom.push(getSeparator());\r\n this._gridColumns += ' a';\r\n }\r\n let divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.incrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\r\n divElement.appendChild(upIcon.cloneNode(true));\r\n top.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.pickSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\r\n divElement.setAttribute('data-time-component', Unit.seconds);\r\n middle.push(divElement);\r\n\r\n divElement = document.createElement('div');\r\n divElement.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.decrementSecond\r\n );\r\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\r\n divElement.appendChild(downIcon.cloneNode(true));\r\n bottom.push(divElement);\r\n }\r\n\r\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\r\n this._gridColumns += ' a';\r\n let divElement = getSeparator();\r\n top.push(divElement);\r\n\r\n let button = document.createElement('button');\r\n button.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.toggleMeridiem\r\n );\r\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\r\n button.setAttribute('tabindex', '-1');\r\n if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function?\r\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\r\n }\r\n else button.classList.add(Namespace.css.toggleMeridiem);\r\n\r\n divElement = document.createElement('div');\r\n divElement.classList.add(Namespace.css.noHighlight);\r\n divElement.appendChild(button);\r\n middle.push(divElement);\r\n\r\n divElement = getSeparator();\r\n bottom.push(divElement);\r\n }\r\n\r\n this._gridColumns = this._gridColumns.trim();\r\n\r\n return [...top, ...middle, ...bottom];\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `hours`\r\n */\r\nexport default class HourDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.hourContainer);\r\n\r\n for (\r\n let i = 0;\r\n i <\r\n (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12);\r\n i++\r\n ) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectHour);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.hourContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.hour);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.hours)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.hours, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\r\n containerClone.innerText = this.optionsStore.options.display.components\r\n .useTwentyfourHour\r\n ? innerDate.hoursFormatted\r\n : innerDate.twelveHoursFormatted;\r\n innerDate.manipulate(1, Unit.hours);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `minutes`\r\n */\r\nexport default class MinuteDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.minuteContainer);\r\n\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n for (let i = 0; i < 60 / step; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectMinute);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.minuteContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\r\n let step =\r\n this.optionsStore.options.stepping === 1\r\n ? 5\r\n : this.optionsStore.options.stepping;\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.minute);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.minutes, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${innerDate.minutes}`\r\n );\r\n containerClone.innerText = innerDate.minutesFormatted;\r\n innerDate.manipulate(step, Unit.minutes);\r\n });\r\n }\r\n}\r\n","import { Unit } from '../../datetime';\r\nimport Namespace from '../../utilities/namespace';\r\nimport Validation from '../../validation';\r\nimport { serviceLocator } from '../../utilities/service-locator';\r\nimport { Paint } from '../index';\r\nimport ActionTypes from '../../utilities/action-types';\r\nimport {OptionsStore} from \"../../utilities/optionsStore\";\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class secondDisplay {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n }\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n getPicker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.secondContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectSecond);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update(widget: HTMLElement, paint: Paint): void {\r\n const container = widget.getElementsByClassName(\r\n Namespace.css.secondContainer\r\n )[0];\r\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\r\n .forEach((containerClone: HTMLElement) => {\r\n let classes = [];\r\n classes.push(Namespace.css.second);\r\n\r\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n paint(Unit.seconds, innerDate, classes, containerClone);\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\r\n containerClone.innerText = innerDate.secondsFormatted;\r\n innerDate.manipulate(5, Unit.seconds);\r\n });\r\n }\r\n}\r\n","import Namespace from '../utilities/namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n static 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 * Skips any animation or timeouts and immediately set the element to show.\r\n * @param target\r\n */\r\n static showImmediately(target: HTMLElement) {\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 }\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.showImmediately(target);\r\n 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 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 * Skips any animation or timeouts and immediately set the element to hide.\r\n * @param target\r\n */\r\n static hideImmediately(target: HTMLElement) {\r\n if (!target) return;\r\n target.classList.remove(Namespace.css.collapsing, Namespace.css.show);\r\n target.classList.add(Namespace.css.collapse);\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 static 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 let timeOut = null;\r\n const complete = () => {\r\n Collapse.hideImmediately(target);\r\n 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 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 static 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 } =\r\n window.getComputedStyle(element);\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 DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport Namespace from '../utilities/namespace';\r\nimport { HideEvent } from '../utilities/event-types';\r\nimport Collapse from './collapse';\r\nimport Validation from '../validation';\r\nimport Dates from '../dates';\r\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\r\nimport { serviceLocator } from '../utilities/service-locator';\r\nimport ActionTypes from '../utilities/action-types';\r\nimport CalendarModes from '../utilities/calendar-modes';\r\nimport { OptionsStore } from '../utilities/optionsStore';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _widget: HTMLElement;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n dateDisplay: DateDisplay;\r\n monthDisplay: MonthDisplay;\r\n yearDisplay: YearDisplay;\r\n decadeDisplay: DecadeDisplay;\r\n timeDisplay: TimeDisplay;\r\n hourDisplay: HourDisplay;\r\n minuteDisplay: MinuteDisplay;\r\n secondDisplay: SecondDisplay;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.dates = serviceLocator.locate(Dates);\r\n\r\n this.dateDisplay = serviceLocator.locate(DateDisplay);\r\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\r\n this.yearDisplay = serviceLocator.locate(YearDisplay);\r\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\r\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\r\n this.hourDisplay = serviceLocator.locate(HourDisplay);\r\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\r\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this._widget = undefined;\r\n\r\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\r\n this._update(result);\r\n });\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: ViewUpdateValues): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this.secondDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.minutes:\r\n this.minuteDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.hours:\r\n this.hourDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.date:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.month:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.year:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this.timeDisplay._update(this.widget);\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n // noinspection JSUnusedLocalSymbols\r\n /**\r\n * Allows developers to add/remove classes from an element.\r\n * @param _unit\r\n * @param _date\r\n * @param _classes\r\n * @param _element\r\n */\r\n paint(\r\n _unit: Unit | 'decade',\r\n _date: DateTime,\r\n _classes: string[],\r\n _element: HTMLElement\r\n ) {\r\n // implemented in plugin\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (this.dates.picked.length == 0) {\r\n if (\r\n this.optionsStore.options.useCurrent &&\r\n !this.optionsStore.options.defaultDate\r\n ) {\r\n const date = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n if (!this.optionsStore.options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (\r\n this.optionsStore.options.restrictions.maxDate?.isBefore(date)\r\n ) {\r\n direction = -1;\r\n }\r\n while (!this.validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this.dates.setValue(date);\r\n }\r\n\r\n if (this.optionsStore.options.defaultDate) {\r\n this.dates.setValue(this.optionsStore.options.defaultDate);\r\n }\r\n }\r\n\r\n this._buildWidget();\r\n this._updateTheme();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this.optionsStore.currentView = 'clock';\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n // otherwise return to the calendar view\r\n if (!this.optionsStore.currentCalendarViewMode) {\r\n this.optionsStore.currentCalendarViewMode =\r\n this.optionsStore.minimumCalendarViewMode;\r\n }\r\n\r\n if (\r\n !onlyClock &&\r\n this.optionsStore.options.display.viewMode !== 'clock'\r\n ) {\r\n if (this._hasTime) {\r\n if(!this.optionsStore.options.display.sideBySide) {\r\n Collapse.hideImmediately(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n } else {\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n }\r\n }\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.dateContainer}`)\r\n );\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this.optionsStore.options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this.optionsStore.options?.container || document.body;\r\n container.appendChild(this.widget);\r\n this.createPopup(this.optionsStore.element, this.widget, {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start',\r\n }).then();\r\n } else {\r\n this.optionsStore.element.appendChild(this.widget);\r\n }\r\n\r\n if (this.optionsStore.options.display.viewMode == 'clock') {\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\r\n this.timeDisplay._update(this.widget);\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this.optionsStore.options.display.inline) {\r\n this.updatePopup();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n async createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise {\r\n let createPopperFunction;\r\n if((window as any)?.Popper) {\r\n createPopperFunction = (window as any)?.Popper?.createPopper;\r\n }\r\n else {\r\n const { createPopper } = await import('@popperjs/core');\r\n createPopperFunction = createPopper;\r\n }\r\n if(createPopperFunction){\r\n this._popperInstance = createPopperFunction(element, widget, options);\r\n }\r\n }\r\n\r\n updatePopup(): void {\r\n this._popperInstance?.update();\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\r\n );\r\n if (this.optionsStore.currentCalendarViewMode == max) return;\r\n this.optionsStore.currentCalendarViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.daysContainer:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n this._eventEmitters.viewUpdate.emit();\r\n }\r\n\r\n /**\r\n * Changes the theme. E.g. light, dark or auto\r\n * @param theme the theme name\r\n * @private\r\n */\r\n _updateTheme(theme?: 'light' | 'dark' | 'auto'): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (theme) {\r\n if (this.optionsStore.options.display.theme === theme) return;\r\n this.optionsStore.options.display.theme = theme;\r\n }\r\n\r\n this.widget.classList.remove('light', 'dark');\r\n this.widget.classList.add(this._getThemeClass());\r\n\r\n if (this.optionsStore.options.display.theme === 'auto') {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .addEventListener('change', () => this._updateTheme());\r\n } else {\r\n window\r\n .matchMedia(Namespace.css.isDarkPreferredQuery)\r\n .removeEventListener('change', () => this._updateTheme());\r\n }\r\n }\r\n\r\n _getThemeClass(): string {\r\n const currentTheme = this.optionsStore.options.display.theme || 'auto';\r\n\r\n const isDarkMode =\r\n window.matchMedia &&\r\n window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;\r\n\r\n switch (currentTheme) {\r\n case 'light':\r\n return Namespace.css.lightTheme;\r\n case 'dark':\r\n return Namespace.css.darkTheme;\r\n case 'auto':\r\n return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;\r\n }\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList,\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextMonth\r\n );\r\n switcher.innerText = this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n );\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.hide,\r\n date: this.optionsStore.unset\r\n ? null\r\n : this.dates.lastPicked\r\n ? this.dates.lastPicked.clone\r\n : void 0,\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this.getHeadTemplate(),\r\n this.decadeDisplay.getPicker(),\r\n this.yearDisplay.getPicker(),\r\n this.monthDisplay.getPicker(),\r\n this.dateDisplay.getPicker()\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\r\n timeView.appendChild(this.hourDisplay.getPicker());\r\n timeView.appendChild(this.minuteDisplay.getPicker());\r\n timeView.appendChild(this.secondDisplay.getPicker());\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this.getToolbarElements());\r\n\r\n if (this.optionsStore.options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.clock &&\r\n (this.optionsStore.options.display.components.hours ||\r\n this.optionsStore.options.display.components.minutes ||\r\n this.optionsStore.options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.calendar &&\r\n (this.optionsStore.options.display.components.year ||\r\n this.optionsStore.options.display.components.month ||\r\n this.optionsStore.options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n getToolbarElements(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this.optionsStore.options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this.optionsStore.options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this.optionsStore.options.display.viewMode === 'clock') {\r\n title = this.optionsStore.options.localization.selectDate;\r\n icon = this.optionsStore.options.display.icons.date;\r\n } else {\r\n title = this.optionsStore.options.localization.selectTime;\r\n icon = this.optionsStore.options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this.optionsStore.options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this.optionsStore.options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n getHeadTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.next)\r\n );\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then a svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement | SVGElement {\r\n if (this.optionsStore.options.display.icons.type === 'sprites') {\r\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\r\n\r\n const icon = document.createElementNS(\r\n 'http://www.w3.org/2000/svg',\r\n 'use'\r\n );\r\n icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility\r\n icon.setAttribute('href', iconClass);\r\n svg.appendChild(icon);\r\n\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n icon.classList.add(...iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this.optionsStore.options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._eventEmitters.action.emit({ e: e });\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n\r\nexport type Paint = (\r\n unit: Unit | 'decade',\r\n innerDate: DateTime,\r\n classes: string[],\r\n element: HTMLElement\r\n) => void;\r\n","import { DateTime, Unit } from \"./datetime\";\r\nimport Collapse from \"./display/collapse\";\r\nimport Namespace from \"./utilities/namespace\";\r\nimport Dates from \"./dates\";\r\nimport Validation from \"./validation\";\r\nimport Display from \"./display\";\r\nimport { EventEmitters } from \"./utilities/event-emitter\";\r\nimport { serviceLocator } from \"./utilities/service-locator.js\";\r\nimport ActionTypes from \"./utilities/action-types\";\r\nimport CalendarModes from \"./utilities/calendar-modes\";\r\nimport { OptionsStore } from \"./utilities/optionsStore\";\r\n\r\n/**\r\n *\r\n */\r\nexport default class Actions {\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n private display: Display;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.display = serviceLocator.locate(Display);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n\r\n this._eventEmitters.action.subscribe((result) => {\r\n this.do(result.e, result.action);\r\n });\r\n }\r\n\r\n /**\r\n * Performs the selected `action`. See ActionTypes\r\n * @param e This is normally a click event\r\n * @param action If not provided, then look for a [data-action]\r\n */\r\n do(e: any, action?: ActionTypes) {\r\n const currentTarget = e?.currentTarget;\r\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\r\n return false;\r\n action = action || currentTarget?.dataset?.action;\r\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\r\n .clone;\r\n\r\n switch (action) {\r\n case ActionTypes.next:\r\n case ActionTypes.previous:\r\n this.handleNextPrevious(action);\r\n break;\r\n case ActionTypes.changeCalendarView:\r\n this.display._showMode(1);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.selectMonth:\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n const value = +currentTarget.dataset.value;\r\n switch (action) {\r\n case ActionTypes.selectMonth:\r\n this.optionsStore.viewDate.month = value;\r\n break;\r\n case ActionTypes.selectYear:\r\n case ActionTypes.selectDecade:\r\n this.optionsStore.viewDate.year = value;\r\n break;\r\n }\r\n\r\n if (\r\n this.optionsStore.currentCalendarViewMode ===\r\n this.optionsStore.minimumCalendarViewMode\r\n ) {\r\n this.dates.setValue(\r\n this.optionsStore.viewDate,\r\n this.dates.lastPickedIndex\r\n );\r\n if (!this.optionsStore.options.display.inline) {\r\n this.display.hide();\r\n }\r\n } else {\r\n this.display._showMode(-1);\r\n }\r\n break;\r\n case ActionTypes.selectDay:\r\n const day = this.optionsStore.viewDate.clone;\r\n if (currentTarget.classList.contains(Namespace.css.old)) {\r\n day.manipulate(-1, Unit.month);\r\n }\r\n if (currentTarget.classList.contains(Namespace.css.new)) {\r\n day.manipulate(1, Unit.month);\r\n }\r\n\r\n day.date = +currentTarget.dataset.day;\r\n let index = 0;\r\n if (this.optionsStore.options.multipleDates) {\r\n index = this.dates.pickedIndex(day, Unit.date);\r\n if (index !== -1) {\r\n this.dates.setValue(null, index); //deselect multi-date\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex + 1);\r\n }\r\n } else {\r\n this.dates.setValue(day, this.dates.lastPickedIndex);\r\n }\r\n\r\n if (\r\n !this.display._hasTime &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline &&\r\n !this.optionsStore.options.multipleDates\r\n ) {\r\n this.display.hide();\r\n }\r\n break;\r\n case ActionTypes.selectHour:\r\n let hour = +currentTarget.dataset.value;\r\n if (\r\n lastPicked.hours >= 12 &&\r\n !this.optionsStore.options.display.components.useTwentyfourHour\r\n )\r\n hour += 12;\r\n lastPicked.hours = hour;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectMinute:\r\n lastPicked.minutes = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.selectSecond:\r\n lastPicked.seconds = +currentTarget.dataset.value;\r\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\r\n this.hideOrClock(e);\r\n break;\r\n case ActionTypes.incrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours);\r\n break;\r\n case ActionTypes.incrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping\r\n );\r\n break;\r\n case ActionTypes.incrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds);\r\n break;\r\n case ActionTypes.decrementHours:\r\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\r\n break;\r\n case ActionTypes.decrementMinutes:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.minutes,\r\n this.optionsStore.options.stepping * -1\r\n );\r\n break;\r\n case ActionTypes.decrementSeconds:\r\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\r\n break;\r\n case ActionTypes.toggleMeridiem:\r\n this.manipulateAndSet(\r\n lastPicked,\r\n Unit.hours,\r\n this.dates.lastPicked.hours >= 12 ? -12 : 12\r\n );\r\n break;\r\n case ActionTypes.togglePicker:\r\n if (\r\n currentTarget.getAttribute('title') ===\r\n this.optionsStore.options.localization.selectDate\r\n ) {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectTime\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.time\r\n ).outerHTML;\r\n\r\n this.display._updateCalendarHeader();\r\n this.optionsStore.refreshCurrentView();\r\n } else {\r\n currentTarget.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDate\r\n );\r\n currentTarget.innerHTML = this.display._iconTag(\r\n this.optionsStore.options.display.icons.date\r\n ).outerHTML;\r\n if (this.display._hasTime) {\r\n this.handleShowClockContainers(ActionTypes.showClock);\r\n this.display._update('clock');\r\n }\r\n }\r\n\r\n this.display.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\r\n )\r\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\r\n this._eventEmitters.viewUpdate.emit();\r\n break;\r\n case ActionTypes.showClock:\r\n case ActionTypes.showHours:\r\n case ActionTypes.showMinutes:\r\n case ActionTypes.showSeconds:\r\n //make sure the clock is actually displaying\r\n if (!this.optionsStore.options.display.sideBySide && this.optionsStore.currentView !== 'clock') {\r\n //hide calendar\r\n Collapse.hideImmediately(this.display.widget.querySelector(`div.${Namespace.css.dateContainer}`));\r\n //show clock\r\n Collapse.showImmediately(this.display.widget.querySelector(`div.${Namespace.css.timeContainer}`));\r\n }\r\n this.handleShowClockContainers(action);\r\n break;\r\n case ActionTypes.clear:\r\n this.dates.setValue(null);\r\n this.display._updateCalendarHeader();\r\n break;\r\n case ActionTypes.close:\r\n this.display.hide();\r\n break;\r\n case ActionTypes.today:\r\n const today = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.viewDate = today;\r\n if (this.validation.isValid(today, Unit.date))\r\n this.dates.setValue(today, this.dates.lastPickedIndex);\r\n break;\r\n }\r\n }\r\n\r\n private handleShowClockContainers(action: ActionTypes) {\r\n if (!this.display._hasTime) {\r\n Namespace.errorMessages.throwError('Cannot show clock containers when time is disabled.');\r\n return;\r\n }\r\n\r\n this.optionsStore.currentView = 'clock';\r\n this.display.widget\r\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\r\n .forEach(\r\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\r\n );\r\n\r\n let classToUse = '';\r\n switch (action) {\r\n case ActionTypes.showClock:\r\n classToUse = Namespace.css.clockContainer;\r\n this.display._update('clock');\r\n break;\r\n case ActionTypes.showHours:\r\n classToUse = Namespace.css.hourContainer;\r\n this.display._update(Unit.hours);\r\n break;\r\n case ActionTypes.showMinutes:\r\n classToUse = Namespace.css.minuteContainer;\r\n this.display._update(Unit.minutes);\r\n break;\r\n case ActionTypes.showSeconds:\r\n classToUse = Namespace.css.secondContainer;\r\n this.display._update(Unit.seconds);\r\n break;\r\n }\r\n\r\n ((\r\n this.display.widget.getElementsByClassName(classToUse)[0]\r\n )).style.display = 'grid';\r\n }\r\n\r\n private handleNextPrevious(action: ActionTypes) {\r\n const {unit, step} =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n if (action === ActionTypes.next)\r\n this.optionsStore.viewDate.manipulate(step, unit);\r\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\r\n this._eventEmitters.viewUpdate.emit();\r\n\r\n this.display._showMode();\r\n }\r\n\r\n /**\r\n * After setting the value it will either show the clock or hide the widget.\r\n * @param e\r\n */\r\n private hideOrClock(e) {\r\n if (\r\n this.optionsStore.options.display.components.useTwentyfourHour &&\r\n !this.optionsStore.options.display.components.minutes &&\r\n !this.optionsStore.options.display.keepOpen &&\r\n !this.optionsStore.options.display.inline\r\n ) {\r\n this.display.hide();\r\n } else {\r\n this.do(e, ActionTypes.showClock);\r\n }\r\n }\r\n\r\n /**\r\n * Common function to manipulate {@link lastPicked} by `unit`.\r\n * @param lastPicked\r\n * @param unit\r\n * @param value Value to change by\r\n */\r\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\r\n const newDate = lastPicked.manipulate(value, unit);\r\n if (this.validation.isValid(newDate, unit)) {\r\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\r\n }\r\n }\r\n}\r\n","import Display from './display/index';\r\nimport Dates from './dates';\r\nimport Actions from './actions';\r\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport Options from './utilities/options';\r\nimport {\r\n BaseEvent,\r\n ChangeEvent,\r\n ViewUpdateEvent,\r\n} from './utilities/event-types';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {\r\n serviceLocator,\r\n setupServiceLocator,\r\n} from './utilities/service-locator';\r\nimport CalendarModes from './utilities/calendar-modes';\r\nimport DefaultOptions from './utilities/default-options';\r\nimport ActionTypes from './utilities/action-types';\r\nimport {OptionsStore} from \"./utilities/optionsStore\";\r\nimport {OptionConverter} from \"./utilities/optionConverter\";\r\nimport { ErrorMessages } from './utilities/errors';\r\n\r\n/**\r\n * A robust and powerful date/time picker component.\r\n */\r\nclass TempusDominus {\r\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\r\n private _isDisabled = false;\r\n private _toggle: HTMLElement;\r\n private _currentPromptTimeTimeout: any;\r\n private actions: Actions;\r\n private optionsStore: OptionsStore;\r\n private _eventEmitters: EventEmitters;\r\n display: Display;\r\n dates: Dates;\r\n\r\n constructor(element: HTMLElement, options: Options = {} as Options) {\r\n setupServiceLocator();\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.display = serviceLocator.locate(Display);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.actions = serviceLocator.locate(Actions);\r\n\r\n if (!element) {\r\n Namespace.errorMessages.mustProvideElement();\r\n }\r\n\r\n this.optionsStore.element = element;\r\n this._initializeOptions(options, DefaultOptions, true);\r\n this.optionsStore.viewDate.setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.unset = true;\r\n\r\n this._initializeInput();\r\n this._initializeToggle();\r\n\r\n if (this.optionsStore.options.display.inline) this.display.show();\r\n\r\n this._eventEmitters.triggerEvent.subscribe((e) => {\r\n this._triggerEvent(e);\r\n });\r\n\r\n this._eventEmitters.viewUpdate.subscribe(() => {\r\n this._viewUpdate();\r\n });\r\n }\r\n\r\n get viewDate() {\r\n return this.optionsStore.viewDate;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\r\n * @param options\r\n * @param reset\r\n * @public\r\n */\r\n updateOptions(options, reset = false): void {\r\n if (reset) this._initializeOptions(options, DefaultOptions);\r\n else this._initializeOptions(options, this.optionsStore.options);\r\n this.display._rebuild();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\r\n * @public\r\n */\r\n toggle(): void {\r\n if (this._isDisabled) return;\r\n this.display.toggle();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Shows the picker unless the picker is disabled.\r\n * @public\r\n */\r\n show(): void {\r\n if (this._isDisabled) return;\r\n this.display.show();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker unless the picker is disabled.\r\n * @public\r\n */\r\n hide(): void {\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Disables the picker and the target input field.\r\n * @public\r\n */\r\n disable(): void {\r\n this._isDisabled = true;\r\n // todo this might be undesired. If a dev disables the input field to\r\n // only allow using the picker, this will break that.\r\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Enables the picker and the target input field.\r\n * @public\r\n */\r\n enable(): void {\r\n this._isDisabled = false;\r\n this.optionsStore.input?.removeAttribute('disabled');\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Clears all the selected dates\r\n * @public\r\n */\r\n clear(): void {\r\n this.optionsStore.input.value = '';\r\n this.dates.clear();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\r\n * @param eventTypes See Namespace.Events\r\n * @param callbacks Function to call when event is triggered\r\n * @public\r\n */\r\n subscribe(\r\n eventTypes: string | string[],\r\n callbacks: (event: any) => void | ((event: any) => void)[]\r\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\r\n if (typeof eventTypes === 'string') {\r\n eventTypes = [eventTypes];\r\n }\r\n let callBackArray: any[];\r\n if (!Array.isArray(callbacks)) {\r\n callBackArray = [callbacks];\r\n } else {\r\n callBackArray = callbacks;\r\n }\r\n\r\n if (eventTypes.length !== callBackArray.length) {\r\n Namespace.errorMessages.subscribeMismatch();\r\n }\r\n\r\n const returnArray = [];\r\n\r\n for (let i = 0; i < eventTypes.length; i++) {\r\n const eventType = eventTypes[i];\r\n if (!Array.isArray(this._subscribers[eventType])) {\r\n this._subscribers[eventType] = [];\r\n }\r\n\r\n this._subscribers[eventType].push(callBackArray[i]);\r\n\r\n returnArray.push({\r\n unsubscribe: this._unsubscribe.bind(\r\n this,\r\n eventType,\r\n this._subscribers[eventType].length - 1\r\n ),\r\n });\r\n\r\n if (eventTypes.length === 1) {\r\n return returnArray[0];\r\n }\r\n }\r\n\r\n return returnArray;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker and removes event listeners\r\n */\r\n dispose() {\r\n this.display.hide();\r\n // this will clear the document click event listener\r\n this.display._dispose();\r\n this.optionsStore.input?.removeEventListener(\r\n 'change',\r\n this._inputChangeEvent\r\n );\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input?.removeEventListener(\r\n 'click',\r\n this._toggleClickEvent\r\n );\r\n }\r\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\r\n this._subscribers = {};\r\n }\r\n\r\n /**\r\n * Updates the options to use the provided language.\r\n * THe language file must be loaded first.\r\n * @param language\r\n */\r\n locale(language: string) {\r\n let asked = loadedLocales[language];\r\n if (!asked) return;\r\n this.updateOptions({\r\n localization: asked,\r\n });\r\n }\r\n\r\n /**\r\n * Triggers an event like ChangeEvent when the picker has updated the value\r\n * of a selected date.\r\n * @param event Accepts a BaseEvent object.\r\n * @private\r\n */\r\n private _triggerEvent(event: BaseEvent) {\r\n event.viewMode = this.optionsStore.currentView;\r\n\r\n const isChangeEvent = event.type === Namespace.events.change;\r\n if (isChangeEvent) {\r\n const { date, oldDate, isClear } = event as ChangeEvent;\r\n if (\r\n (date && oldDate && date.isSame(oldDate)) ||\r\n (!isClear && !date && !oldDate)\r\n ) {\r\n return;\r\n }\r\n this._handleAfterChangeEvent(event as ChangeEvent);\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent('change', { detail: event as any })\r\n );\r\n }\r\n\r\n this.optionsStore.element.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n if ((window as any).jQuery) {\r\n const $ = (window as any).jQuery;\r\n\r\n if (isChangeEvent && this.optionsStore.input) {\r\n $(this.optionsStore.input).trigger(event);\r\n } else {\r\n $(this.optionsStore.element).trigger(event);\r\n }\r\n }\r\n\r\n this._publish(event);\r\n }\r\n\r\n private _publish(event: BaseEvent) {\r\n // return if event is not subscribed\r\n if (!Array.isArray(this._subscribers[event.type])) {\r\n return;\r\n }\r\n\r\n // Trigger callback for each subscriber\r\n this._subscribers[event.type].forEach((callback) => {\r\n callback(event);\r\n });\r\n }\r\n\r\n /**\r\n * Fires a ViewUpdate event when, for example, the month view is changed.\r\n * @private\r\n */\r\n private _viewUpdate() {\r\n this._triggerEvent({\r\n type: Namespace.events.update,\r\n viewDate: this.optionsStore.viewDate.clone,\r\n } as ViewUpdateEvent);\r\n }\r\n\r\n private _unsubscribe(eventName, index) {\r\n this._subscribers[eventName].splice(index, 1);\r\n }\r\n\r\n /**\r\n * Merges two Option objects together and validates options type\r\n * @param config new Options\r\n * @param mergeTo Options to merge into\r\n * @param includeDataset When true, the elements data-td attributes will be included in the\r\n * @private\r\n */\r\n private _initializeOptions(\r\n config: Options,\r\n mergeTo: Options,\r\n includeDataset = false\r\n ): void {\r\n let newConfig = OptionConverter.deepCopy(config);\r\n newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);\r\n if (includeDataset)\r\n newConfig = OptionConverter._dataToOptions(\r\n this.optionsStore.element,\r\n newConfig\r\n );\r\n\r\n OptionConverter._validateConflicts(newConfig);\r\n\r\n newConfig.viewDate = newConfig.viewDate.setLocale(newConfig.localization.locale);\r\n\r\n if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {\r\n this.optionsStore.viewDate = newConfig.viewDate;\r\n }\r\n\r\n /**\r\n * Sets the minimum view allowed by the picker. For example the case of only\r\n * allowing year and month to be selected but not date.\r\n */\r\n if (newConfig.display.components.year) {\r\n this.optionsStore.minimumCalendarViewMode = 2;\r\n }\r\n if (newConfig.display.components.month) {\r\n this.optionsStore.minimumCalendarViewMode = 1;\r\n }\r\n if (newConfig.display.components.date) {\r\n this.optionsStore.minimumCalendarViewMode = 0;\r\n }\r\n\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n this.optionsStore.currentCalendarViewMode\r\n );\r\n\r\n // Update view mode if needed\r\n if (\r\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\r\n newConfig.display.viewMode\r\n ) {\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),\r\n this.optionsStore.minimumCalendarViewMode\r\n );\r\n }\r\n\r\n if (this.display?.isVisible) {\r\n this.display._update('all');\r\n }\r\n\r\n if (newConfig.display.components.useTwentyfourHour === undefined) {\r\n newConfig.display.components.useTwentyfourHour = !!!newConfig.viewDate.parts()?.dayPeriod;\r\n }\r\n\r\n\r\n this.optionsStore.options = newConfig;\r\n }\r\n\r\n /**\r\n * Checks if an input field is being used, attempts to locate one and sets an\r\n * event listener if found.\r\n * @private\r\n */\r\n private _initializeInput() {\r\n if (this.optionsStore.element.tagName == 'INPUT') {\r\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\r\n } else {\r\n let query = this.optionsStore.element.dataset.tdTargetInput;\r\n if (query == undefined || query == 'nearest') {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector('input');\r\n } else {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector(query);\r\n }\r\n }\r\n\r\n if (!this.optionsStore.input) return;\r\n\r\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n if (this.optionsStore.input.value) {\r\n this._inputChangeEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to locate a toggle for the picker and sets an event listener\r\n * @private\r\n */\r\n private _initializeToggle() {\r\n if (this.optionsStore.options.display.inline) return;\r\n let query = this.optionsStore.element.dataset.tdTargetToggle;\r\n if (query == 'nearest') {\r\n query = '[data-td-toggle=\"datetimepicker\"]';\r\n }\r\n this._toggle =\r\n query == undefined\r\n ? this.optionsStore.element\r\n : this.optionsStore.element.querySelector(query);\r\n this._toggle.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n /**\r\n * If the option is enabled this will render the clock view after a date pick.\r\n * @param e change event\r\n * @private\r\n */\r\n private _handleAfterChangeEvent(e: ChangeEvent) {\r\n if (\r\n // options is disabled\r\n !this.optionsStore.options.promptTimeOnDateChange ||\r\n this.optionsStore.options.display.inline ||\r\n this.optionsStore.options.display.sideBySide ||\r\n // time is disabled\r\n !this.display._hasTime ||\r\n // clock component is already showing\r\n this.display.widget\r\n ?.getElementsByClassName(Namespace.css.show)[0]\r\n .classList.contains(Namespace.css.timeContainer)\r\n )\r\n return;\r\n\r\n // First time ever. If useCurrent option is set to true (default), do nothing\r\n // because the first date is selected automatically.\r\n // or date didn't change (time did) or date changed because time did.\r\n if (\r\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\r\n (e.oldDate && e.date?.isSame(e.oldDate))\r\n ) {\r\n return;\r\n }\r\n\r\n clearTimeout(this._currentPromptTimeTimeout);\r\n this._currentPromptTimeTimeout = setTimeout(() => {\r\n if (this.display.widget) {\r\n this._eventEmitters.action.emit({\r\n e: {\r\n currentTarget: this.display.widget.querySelector(\r\n `.${Namespace.css.switch} div`\r\n ),\r\n },\r\n action: ActionTypes.togglePicker,\r\n });\r\n }\r\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\r\n }\r\n\r\n /**\r\n * Event for when the input field changes. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _inputChangeEvent = (event?: any) => {\r\n const internallyTriggered = event?.detail;\r\n if (internallyTriggered) return;\r\n\r\n const setViewDate = () => {\r\n if (this.dates.lastPicked)\r\n this.optionsStore.viewDate = this.dates.lastPicked.clone;\r\n };\r\n\r\n const value = this.optionsStore.input.value;\r\n if (this.optionsStore.options.multipleDates) {\r\n try {\r\n const valueSplit = value.split(\r\n this.optionsStore.options.multipleDatesSeparator\r\n );\r\n for (let i = 0; i < valueSplit.length; i++) {\r\n this.dates.setFromInput(valueSplit[i], i);\r\n }\r\n setViewDate();\r\n } catch {\r\n console.warn(\r\n 'TD: Something went wrong trying to set the multipleDates values from the input field.'\r\n );\r\n }\r\n } else {\r\n this.dates.setFromInput(value, 0);\r\n setViewDate();\r\n }\r\n };\r\n\r\n /**\r\n * Event for when the toggle is clicked. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _toggleClickEvent = () => {\r\n if ((this.optionsStore.element as any)?.disabled || this.optionsStore.input?.disabled) return\r\n this.toggle();\r\n };\r\n}\r\n\r\n/**\r\n * Whenever a locale is loaded via a plugin then store it here based on the\r\n * locale name. E.g. loadedLocales['ru']\r\n */\r\nconst loadedLocales = {};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a locale plugin.\r\n * @param l locale object for localization options\r\n */\r\nconst loadLocale = (l) => {\r\n if (loadedLocales[l.name]) return;\r\n loadedLocales[l.name] = l.localization;\r\n};\r\n\r\n/**\r\n * A sets the global localization options to the provided locale name.\r\n * `loadLocale` MUST be called first.\r\n * @param l\r\n */\r\nconst locale = (l: string) => {\r\n let asked = loadedLocales[l];\r\n if (!asked) return;\r\n DefaultOptions.localization = asked;\r\n};\r\n\r\n// noinspection JSUnusedGlobalSymbols\r\n/**\r\n * Called from a plugin to extend or override picker defaults.\r\n * @param plugin\r\n * @param option\r\n */\r\nconst extend = function (plugin, option) {\r\n if (!plugin) return tempusDominus;\r\n if (!plugin.installed) {\r\n // install plugin only once\r\n plugin(option, { TempusDominus, Dates, Display, DateTime, ErrorMessages }, tempusDominus);\r\n plugin.installed = true;\r\n }\r\n return tempusDominus;\r\n};\r\n\r\nconst version = '6.1.3';\r\n\r\nconst tempusDominus = {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version\r\n};\r\n\r\nexport {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Unit,\r\n version,\r\n DateTimeFormatOptions\r\n}\r\n"],"names":["Unit","ActionTypes","SecondDisplay"],"mappings":";;;;;;;;;;;AAAYA,wBAOX;EAPD,CAAA,UAAY,IAAI,EAAA;EACd,IAAA,IAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;EACnB,IAAA,IAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;EACnB,IAAA,IAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;EACf,IAAA,IAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;EACb,IAAA,IAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;EACf,IAAA,IAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;EACf,CAAC,EAPWA,YAAI,KAAJA,YAAI,GAOf,EAAA,CAAA,CAAA,CAAA;EAED,MAAM,gBAAgB,GAAG;EACvB,IA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AU,MAAM,EAAE,MAAM,EAAA;EACrC,IAAA,IAAI,CAAC,MAAM;EAAE,QAAA,OAAO,aAAa,CAAC;EAClC,IAAA,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;;EAErB,QAAA,MAAM,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,aAAa,CAAC,CAAC;EAC1F,QAAA,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;EACzB,KAAA;EACD,IAAA,OAAO,aAAa,CAAC;EACvB,EAAE;AAEI,QAAA,OAAO,GAAG,QAAQ;EAExB,MAAM,aAAa,GAAG;MACpB,aAAa;MACb,MAAM;MACN,UAAU;MACV,MAAM;MACN,SAAS;MACT,cAAc;MACd,QAAQ;YACRD,YAAI;MACJ,OAAO;GACR;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/js/tempus-dominus.min.js b/dist/js/tempus-dominus.min.js index 4a6ce65dc..98a688f7b 100644 --- a/dist/js/tempus-dominus.min.js +++ b/dist/js/tempus-dominus.min.js @@ -1,6 +1,6 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tempusDominus={})}(this,(function(t){"use strict";function e(t,e,s,i){return new(s||(s=Promise))((function(o,a){function n(t){try{d(i.next(t))}catch(t){a(t)}}function r(t){try{d(i.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,r)}d((i=i.apply(t,e||[])).next())}))}var s;t.Unit=void 0,(s=t.Unit||(t.Unit={})).seconds="seconds",s.minutes="minutes",s.hours="hours",s.date="date",s.month="month",s.year="year";const i={month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},o={hour:"2-digit",hour12:!1},a=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}};class n extends Date{constructor(){super(...arguments),this.locale="default",this.nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],this.leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335]}setLocale(t){return this.locale=t,this}static convert(t,e="default"){if(!t)throw new Error("A date is required");return new n(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocale(e)}static fromString(t,e){return new n(t)}get clone(){return new n(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocale(this.locale)}startOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(0);break;case"minutes":this.setSeconds(0,0);break;case"hours":this.setMinutes(0,0,0);break;case"date":this.setHours(0,0,0,0);break;case"weekDay":if(this.startOf(t.Unit.date),this.weekDay===s)break;let e=this.weekDay;0!==s&&0===this.weekDay&&(e=8-s),this.manipulate(s-e,t.Unit.date);break;case"month":this.startOf(t.Unit.date),this.setDate(1);break;case"year":this.startOf(t.Unit.date),this.setMonth(0,1)}return this}endOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(999);break;case"minutes":this.setSeconds(59,999);break;case"hours":this.setMinutes(59,59,999);break;case"date":this.setHours(23,59,59,999);break;case"weekDay":this.endOf(t.Unit.date),this.manipulate(6+s-this.weekDay,t.Unit.date);break;case"month":this.endOf(t.Unit.date),this.manipulate(1,t.Unit.month),this.setDate(0);break;case"year":this.endOf(t.Unit.date),this.manipulate(1,t.Unit.year),this.setDate(0)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}format(t,e=this.locale){return new Intl.DateTimeFormat(e,t).format(this)}isBefore(t,e){if(!e)return this.valueOf()t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this.clone.startOf(e).valueOf()>t.clone.startOf(e).valueOf()}isSame(t,e){if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=n.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1];return(o?this.isAfter(t,s):!this.isBefore(t,s))&&(a?this.isBefore(e,s):!this.isAfter(e,s))||(o?this.isBefore(t,s):!this.isAfter(t,s))&&(a?this.isAfter(e,s):!this.isBefore(e,s))}parts(t=this.locale,e={dateStyle:"full",timeStyle:"long"}){const s={};return new Intl.DateTimeFormat(t,e).formatToParts(this).filter((t=>"literal"!==t.type)).forEach((t=>s[t.type]=t.value)),s}get seconds(){return this.getSeconds()}set seconds(t){this.setSeconds(t)}get secondsFormatted(){return this.parts(void 0,i).second}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.parts(void 0,i).minute}get hours(){return this.getHours()}set hours(t){this.setHours(t)}get hoursFormatted(){return this.parts(void 0,o).hour}get twelveHoursFormatted(){return this.parts(void 0,i).hour}meridiem(t=this.locale){var e;return null===(e=new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0}).formatToParts(this).find((t=>"dayPeriod"===t.type)))||void 0===e?void 0:e.value}get date(){return this.getDate()}set date(t){this.setDate(t)}get dateFormatted(){return this.parts(void 0,i).day}get weekDay(){return this.getDay()}get month(){return this.getMonth()}set month(t){const e=new Date(this.year,t+1);e.setDate(0);const s=e.getDate();this.date>s&&(this.date=s),this.setMonth(t)}get monthFormatted(){return this.parts(void 0,i).month}get year(){return this.getFullYear()}set year(t){this.setFullYear(t)}get week(){const t=this.computeOrdinal(),e=this.getUTCDay();let s=Math.floor((t-e+10)/7);return s<1?s=this.weeksInWeekYear(this.year-1):s>this.weeksInWeekYear(this.year)&&(s=1),s}weeksInWeekYear(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,i=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===i?53:52}get isLeapYear(){return this.year%4==0&&(this.year%100!=0||this.year%400==0)}computeOrdinal(){return this.date+(this.isLeapYear?this.leapLadder:this.nonLeapLadder)[this.month]}}class r extends Error{}class d{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const e=new r(`${this.base} Unexpected option: ${t} does not match a known option.`);throw e.code=1,e}unexpectedOptions(t){const e=new r(`${this.base}: ${t.join(", ")}`);throw e.code=1,e}unexpectedOptionValue(t,e,s){const i=new r(`${this.base} Unexpected option value: ${t} does not accept a value of "${e}". Valid values are: ${s.join(", ")}`);throw i.code=2,i}typeMismatch(t,e,s){const i=new r(`${this.base} Mismatch types: ${t} has a type of ${e} instead of the required ${s}`);throw i.code=3,i}numbersOutOfRage(t,e,s){const i=new r(`${this.base} ${t} expected an array of number between ${e} and ${s}.`);throw i.code=4,i}failedToParseDate(t,e,s=!1){const i=new r(`${this.base} Could not correctly parse "${e}" to a date for ${t}.`);if(i.code=5,!s)throw i;console.warn(i)}mustProvideElement(){const t=new r(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new r(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const e=new r(`${this.base} A configuration value conflicts with another rule. ${t}`);throw e.code=8,e}customDateFormatError(t){const e=new r(`${this.base} customDateFormat: ${t}`);throw e.code=9,e}dateString(){console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`)}throwError(t){const e=new r(`${this.base} ${t}`);throw e.code=9,e}}const l="tempus-dominus";class c{}c.NAME=l,c.dataKey="td",c.events=new class{constructor(){this.key=".td",this.change=`change${this.key}`,this.update=`update${this.key}`,this.error=`error${this.key}`,this.show=`show${this.key}`,this.hide=`hide${this.key}`,this.blur=`blur${this.key}`,this.focus=`focus${this.key}`,this.keyup=`keyup${this.key}`,this.keydown=`keydown${this.key}`}},c.css=new class{constructor(){this.widget=`${l}-widget`,this.calendarHeader="calendar-header",this.switch="picker-switch",this.toolbar="toolbar",this.noHighlight="no-highlight",this.sideBySide="timepicker-sbs",this.previous="previous",this.next="next",this.disabled="disabled",this.old="old",this.new="new",this.active="active",this.dateContainer="date-container",this.decadesContainer=`${this.dateContainer}-decades`,this.decade="decade",this.yearsContainer=`${this.dateContainer}-years`,this.year="year",this.monthsContainer=`${this.dateContainer}-months`,this.month="month",this.daysContainer=`${this.dateContainer}-days`,this.day="day",this.calendarWeeks="cw",this.dayOfTheWeek="dow",this.today="today",this.weekend="weekend",this.timeContainer="time-container",this.separator="separator",this.clockContainer=`${this.timeContainer}-clock`,this.hourContainer=`${this.timeContainer}-hour`,this.minuteContainer=`${this.timeContainer}-minute`,this.secondContainer=`${this.timeContainer}-second`,this.hour="hour",this.minute="minute",this.second="second",this.toggleMeridiem="toggleMeridiem",this.show="show",this.collapsing="td-collapsing",this.collapse="td-collapse",this.inline="inline",this.lightTheme="light",this.darkTheme="dark",this.isDarkPreferredQuery="(prefers-color-scheme: dark)"}},c.errorMessages=new d;class h{constructor(){this.cache=new Map}locate(t){const e=this.cache.get(t);if(e)return e;const s=new t;return this.cache.set(t,s),s}}let p;const u=[{name:"calendar",className:c.css.daysContainer,unit:t.Unit.month,step:1},{name:"months",className:c.css.monthsContainer,unit:t.Unit.year,step:1},{name:"years",className:c.css.yearsContainer,unit:t.Unit.year,step:10},{name:"decades",className:c.css.decadesContainer,unit:t.Unit.year,step:100}];class m{constructor(){this.viewDate=new n,this._currentCalendarViewMode=0,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=u[t].name}refreshCurrentView(){this.currentView=u[this.currentCalendarViewMode].name}}class y{constructor(){this.optionsStore=p.locate(m)}isValid(e,s){var i;if(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(e))return!1;if(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(e))return!1;if(s!==t.Unit.month&&s!==t.Unit.year&&(null===(i=this.optionsStore.options.restrictions.daysOfWeekDisabled)||void 0===i?void 0:i.length)>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(e.weekDay))return!1;if(this.optionsStore.options.restrictions.minDate&&e.isBefore(this.optionsStore.options.restrictions.minDate,s))return!1;if(this.optionsStore.options.restrictions.maxDate&&e.isAfter(this.optionsStore.options.restrictions.maxDate,s))return!1;if(s===t.Unit.hours||s===t.Unit.minutes||s===t.Unit.seconds){if(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(e))return!1;if(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(e))return!1;if(this.optionsStore.options.restrictions.disabledTimeIntervals.length>0)for(let t of this.optionsStore.options.restrictions.disabledTimeIntervals)if(e.isBetween(t.from,t.to))return!1}return!0}_isInDisabledDates(e){if(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)return!1;const s=e.format(a(t.Unit.date));return this.optionsStore.options.restrictions.disabledDates.map((e=>e.format(a(t.Unit.date)))).find((t=>t===s))}_isInEnabledDates(e){if(!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length)return!0;const s=e.format(a(t.Unit.date));return this.optionsStore.options.restrictions.enabledDates.map((e=>e.format(a(t.Unit.date)))).find((t=>t===s))}_isInDisabledHours(t){if(!this.optionsStore.options.restrictions.disabledHours||0===this.optionsStore.options.restrictions.disabledHours.length)return!1;const e=t.hours;return this.optionsStore.options.restrictions.disabledHours.find((t=>t===e))}_isInEnabledHours(t){if(!this.optionsStore.options.restrictions.enabledHours||0===this.optionsStore.options.restrictions.enabledHours.length)return!0;const e=t.hours;return this.optionsStore.options.restrictions.enabledHours.find((t=>t===e))}}class v{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),this.unsubscribe.bind(this,this.subscribers.length-1)}unsubscribe(t){this.subscribers.splice(t,1)}emit(t){this.subscribers.forEach((e=>{e(t)}))}destroy(){this.subscribers=null,this.subscribers=[]}}class g{constructor(){this.triggerEvent=new v,this.viewUpdate=new v,this.updateDisplay=new v,this.action=new v}destroy(){this.triggerEvent.destroy(),this.viewUpdate.destroy(),this.updateDisplay.destroy(),this.action.destroy()}}const S={restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},display:{icons:{type:"icons",time:"fa-solid fa-clock",date:"fa-solid fa-calendar",up:"fa-solid fa-arrow-up",down:"fa-solid fa-arrow-down",previous:"fa-solid fa-chevron-left",next:"fa-solid fa-chevron-right",today:"fa-solid fa-calendar-check",clear:"fa-solid fa-trash",close:"fa-solid fa-xmark"},sideBySide:!1,calendarWeeks:!1,viewMode:"calendar",toolbarPlacement:"bottom",keepOpen:!1,buttons:{today:!1,clear:!1,close:!1},components:{calendar:!0,date:!0,month:!0,year:!0,decades:!0,clock:!0,hours:!0,minutes:!0,seconds:!1,useTwentyfourHour:void 0},inline:!1,theme:"auto"},stepping:1,useCurrent:!0,defaultDate:void 0,localization:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",previousMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",previousYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",previousDecade:"Previous Decade",nextDecade:"Next Decade",previousCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",toggleMeridiem:"Toggle Meridiem",selectTime:"Select Time",selectDate:"Select Date",dayViewHeaderFormat:{month:"long",year:"2-digit"},locale:"default",startOfTheWeek:0,dateFormats:{LTS:"h:mm:ss T",LT:"h:mm T",L:"MM/dd/yyyy",LL:"MMMM d, yyyy",LLL:"MMMM d, yyyy h:mm T",LLLL:"dddd, MMMM d, yyyy h:mm T"},ordinal:t=>t,format:"L"},keepInvalid:!1,debug:!1,allowInputToggle:!1,viewDate:new n,multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,meta:{},container:void 0};class f{static deepCopy(t){const e={};return Object.keys(t).forEach((s=>{const i=t[s];e[s]=i,"object"!=typeof i||i instanceof HTMLElement||i instanceof Element||i instanceof Date||Array.isArray(i)||(e[s]=f.deepCopy(i))})),e}static objectPath(t,e){return"."===t.charAt(0)&&(t=t.slice(1)),t?t.split(".").reduce(((t,e)=>f.isValue(t)||f.isValue(t[e])?t[e]:void 0),e):e}static spread(t,e,s="",i){const o=f.objectPath(s,S),a=Object.keys(t).filter((t=>!Object.keys(o).includes(t)));if(a.length>0){const t=f.getFlattenDefaultOptions(),e=a.map((e=>{let i=`"${s}.${e}" in not a known option.`,o=t.find((t=>t.includes(e)));return o&&(i+=` Did you mean "${o}"?`),i}));c.errorMessages.unexpectedOptions(e)}Object.keys(t).filter((t=>"__proto__"!==t&&"constructor"!==t)).forEach((a=>{"."===(s+=`.${a}`).charAt(0)&&(s=s.slice(1));const n=o[a];let r=typeof t[a],d=typeof n,l=t[a];if(null==l)return e[a]=l,void(s=s.substring(0,s.lastIndexOf(`.${a}`)));"object"!=typeof n||Array.isArray(t[a])||n instanceof Date||f.ignoreProperties.includes(a)?e[a]=f.processKey(a,l,r,d,s,i):f.spread(t[a],e[a],s,i),s=s.substring(0,s.lastIndexOf(`.${a}`))}))}static processKey(t,e,s,i,o,a){switch(t){case"defaultDate":{const t=this.dateConversion(e,"defaultDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("defaultDate",s,"DateTime or Date");break}case"viewDate":{const t=this.dateConversion(e,"viewDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("viewDate",s,"DateTime or Date");break}case"minDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.minDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("restrictions.minDate",s,"DateTime or Date");break}case"maxDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.maxDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("restrictions.maxDate",s,"DateTime or Date");break}case"disabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.disabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&c.errorMessages.numbersOutOfRage("restrictions.disabledHours",0,23),e);case"enabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.enabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&c.errorMessages.numbersOutOfRage("restrictions.enabledHours",0,23),e);case"daysOfWeekDisabled":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.daysOfWeekDisabled",e,s),e.filter((t=>t<0||t>6)).length>0&&c.errorMessages.numbersOutOfRage("restrictions.daysOfWeekDisabled",0,6),e);case"enabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.enabledDates",e,s,a),e);case"disabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.disabledDates",e,s,a),e);case"disabledTimeIntervals":if(void 0===e)return[];Array.isArray(e)||c.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const n=e;for(let e=0;e{const i=`${t}[${e}].${s}`;let o=n[e][s];const r=this.dateConversion(o,i,a);r||c.errorMessages.typeMismatch(i,typeof o,"DateTime or Date"),r.setLocale(a.locale),n[e][s]=r}));return n;case"toolbarPlacement":case"type":case"viewMode":case"theme":const r={toolbarPlacement:["top","bottom","default"],type:["icons","sprites"],viewMode:["clock","calendar","months","years","decades"],theme:["light","dark","auto"]}[t];return r.includes(e)||c.errorMessages.unexpectedOptionValue(o.substring(1),e,r),e;case"meta":case"dayViewHeaderFormat":return e;case"container":return e&&!(e instanceof HTMLElement||e instanceof Element||(null==e?void 0:e.appendChild))&&c.errorMessages.typeMismatch(o.substring(1),typeof e,"HTMLElement"),e;case"useTwentyfourHour":if(void 0===e||"boolean"===s)return e;c.errorMessages.typeMismatch(o,s,i);break;default:switch(i){case"boolean":return"true"===e||!0===e;case"number":return+e;case"string":return e.toString();case"object":return{};case"function":return e;default:c.errorMessages.typeMismatch(o,s,i)}}}static _mergeOptions(t,e){var s;const i=f.deepCopy(e),o="default"!==(null===(s=e.localization)||void 0===s?void 0:s.locale)?e.localization:(null==t?void 0:t.localization)||S.localization;return f.spread(t,i,"",o),i}static _dataToOptions(t,e){const s=JSON.parse(JSON.stringify(t.dataset));if((null==s?void 0:s.tdTargetInput)&&delete s.tdTargetInput,(null==s?void 0:s.tdTargetToggle)&&delete s.tdTargetToggle,!s||0===Object.keys(s).length||s.constructor!==DOMStringMap)return e;let i={};const o=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},a=(t,e,s,i)=>{const n=o(s)[t[e].toLowerCase()],r={};return void 0===n||(s[n].constructor===Object?(e++,r[n]=a(t,e,s[n],i)):r[n]=i),r},n=o(e);return Object.keys(s).filter((t=>t.startsWith(c.dataKey))).map((t=>t.substring(2))).forEach((t=>{let o=n[t.toLowerCase()];if(t.includes("_")){const r=t.split("_");o=n[r[0].toLowerCase()],void 0!==o&&e[o].constructor===Object&&(i[o]=a(r,1,e[o],s[`td${t}`]))}else void 0!==o&&(i[o]=s[`td${t}`])})),this._mergeOptions(i,e)}static _dateTypeCheck(t,e){if(t.constructor.name===n.name)return t;if(t.constructor.name===Date.name)return n.convert(t);if("string"==typeof t){const s=n.fromString(t,e);return"null"===JSON.stringify(s)?null:s}return null}static _typeCheckDateArray(t,e,s,i){var o;Array.isArray(e)||c.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||c.errorMessages.typeMismatch(t,s,"array of numbers")}static dateConversion(t,e,s){"string"==typeof t&&"input"!==e&&c.errorMessages.dateString();const i=this._dateTypeCheck(t,s);return i||c.errorMessages.failedToParseDate(e,t,"input"===e),i}static getFlattenDefaultOptions(){if(this._flattenDefaults)return this._flattenDefaults;const t=(e,s=[])=>Array.isArray(e)?[]:Object(e)===e?Object.entries(e).flatMap((([e,i])=>t(i,[...s,e]))):s.join(".");return this._flattenDefaults=t(S),this._flattenDefaults}static _validateConflicts(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||c.errorMessages.conflictingConfiguration("Cannot use side by side mode without the clock components"),t.restrictions.minDate&&t.restrictions.maxDate&&(t.restrictions.minDate.isAfter(t.restrictions.maxDate)&&c.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&c.errorMessages.conflictingConfiguration("maxDate is before minDate"))}}f.ignoreProperties=["meta","dayViewHeaderFormat","container","dateForms","ordinal"],f.isValue=t=>null!=t;class w{constructor(){this._dates=[],this.optionsStore=p.locate(m),this.validation=p.locate(y),this._eventEmitters=p.locate(g)}get picked(){return this._dates}get lastPicked(){return this._dates[this.lastPickedIndex]}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){const e=this.optionsStore.options.display.components;return t?t.format({year:e.calendar&&e.year?"numeric":void 0,month:e.calendar&&e.month?"2-digit":void 0,day:e.calendar&&e.date?"2-digit":void 0,hour:e.clock&&e.hours?e.useTwentyfourHour?"2-digit":"numeric":void 0,minute:e.clock&&e.minutes?"2-digit":void 0,second:e.clock&&e.seconds?"2-digit":void 0,hour12:!e.useTwentyfourHour}):""}parseInput(t){return f.dateConversion(t,"input",this.optionsStore.options.localization)}setFromInput(t,e){if(!t)return void this.setValue(void 0,e);const s=this.parseInput(t);s&&(s.setLocale(this.optionsStore.options.localization.locale),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!e)return void 0!==this._dates.find((e=>e===t));const s=a(e);let i=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===i))}pickedIndex(t,e){if(!e)return this._dates.indexOf(t);const s=a(e);let i=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(i)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:c.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[]}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}setValue(t,e){const s=void 0===e,i=!t&&s;let o=this.optionsStore.unset?null:this._dates[e];!o&&!this.optionsStore.unset&&s&&i&&(o=this.lastPicked);const a=()=>{if(!this.optionsStore.input)return;let e=this.formatInput(t);this.optionsStore.options.multipleDates&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)};if(t&&(null==o?void 0:o.isSame(t)))a();else{if(!t)return!this.optionsStore.options.multipleDates||1===this._dates.length||i?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),a(),this._eventEmitters.triggerEvent.emit({type:c.events.change,date:void 0,oldDate:o,isClear:i,isValid:!0}),void this._eventEmitters.updateDisplay.emit("all");if(e=e||0,t=t.clone,1!==this.optionsStore.options.stepping&&(t.minutes=Math.round(t.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,t.seconds=0),this.validation.isValid(t))return this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),void this._eventEmitters.triggerEvent.emit({type:c.events.change,date:t,oldDate:o,isClear:i,isValid:!0});this.optionsStore.options.keepInvalid&&(this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this._eventEmitters.triggerEvent.emit({type:c.events.change,date:t,oldDate:o,isClear:i,isValid:!1})),this._eventEmitters.triggerEvent.emit({type:c.events.error,reason:c.errorMessages.failedToSetInvalidDate,date:t,oldDate:o})}}}var b;!function(t){t.next="next",t.previous="previous",t.changeCalendarView="changeCalendarView",t.selectMonth="selectMonth",t.selectYear="selectYear",t.selectDecade="selectDecade",t.selectDay="selectDay",t.selectHour="selectHour",t.selectMinute="selectMinute",t.selectSecond="selectSecond",t.incrementHours="incrementHours",t.incrementMinutes="incrementMinutes",t.incrementSeconds="incrementSeconds",t.decrementHours="decrementHours",t.decrementMinutes="decrementMinutes",t.decrementSeconds="decrementSeconds",t.toggleMeridiem="toggleMeridiem",t.togglePicker="togglePicker",t.showClock="showClock",t.showHours="showHours",t.showMinutes="showMinutes",t.showSeconds="showSeconds",t.clear="clear",t.close="close",t.today="today"}(b||(b={}));var D=b;class k{constructor(){this.optionsStore=p.locate(m),this.dates=p.locate(w),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");if(t.classList.add(c.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(c.css.calendarWeeks,c.css.noHighlight),t.appendChild(e)}for(let e=0;e<42;e++){if(0!==e&&e%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(c.css.calendarWeeks,c.css.noHighlight),t.appendChild(e)}const s=document.createElement("div");s.setAttribute("data-action",D.selectDay),t.appendChild(s)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.daysContainer)[0];if("calendar"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(c.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.optionsStore.options.display.components.month?s.classList.remove(c.css.disabled):s.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.month),t.Unit.month)?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.month),t.Unit.month)?o.classList.remove(c.css.disabled):o.classList.add(c.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.Unit.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,t.Unit.hours);i.querySelectorAll(`[data-action="${D.selectDay}"], .${c.css.calendarWeeks}`).forEach((e=>{if(this.optionsStore.options.display.calendarWeeks&&e.classList.contains(c.css.calendarWeeks)){if("#"===e.innerText)return;return void(e.innerText=`${o.week}`)}let i=[];i.push(c.css.day),o.isBefore(this.optionsStore.viewDate,t.Unit.month)&&i.push(c.css.old),o.isAfter(this.optionsStore.viewDate,t.Unit.month)&&i.push(c.css.new),!this.optionsStore.unset&&this.dates.isPicked(o,t.Unit.date)&&i.push(c.css.active),this.validation.isValid(o,t.Unit.date)||i.push(c.css.disabled),o.isSame(new n,t.Unit.date)&&i.push(c.css.today),0!==o.weekDay&&6!==o.weekDay||i.push(c.css.weekend),s(t.Unit.date,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.year}-${o.monthFormatted}-${o.dateFormatted}`),e.setAttribute("data-day",`${o.date}`),e.innerText=o.format({day:"numeric"}),o.manipulate(1,t.Unit.date)}))}_daysOfTheWeek(){let e=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(t.Unit.date);const s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(c.css.calendarWeeks,c.css.noHighlight),t.innerText="#",s.push(t)}for(let i=0;i<7;i++){const i=document.createElement("div");i.classList.add(c.css.dayOfTheWeek,c.css.noHighlight),i.innerText=e.format({weekday:"short"}),e.manipulate(1,t.Unit.date),s.push(i)}return s}}class _{constructor(){this.optionsStore=p.locate(m),this.dates=p.locate(w),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",D.selectMonth),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.monthsContainer)[0];if("months"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(c.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.optionsStore.options.display.components.year?s.classList.remove(c.css.disabled):s.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),t.Unit.year)?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.year),t.Unit.year)?o.classList.remove(c.css.disabled):o.classList.add(c.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.Unit.year);i.querySelectorAll(`[data-action="${D.selectMonth}"]`).forEach(((e,i)=>{let a=[];a.push(c.css.month),!this.optionsStore.unset&&this.dates.isPicked(o,t.Unit.month)&&a.push(c.css.active),this.validation.isValid(o,t.Unit.month)||a.push(c.css.disabled),s(t.Unit.month,o,a,e),e.classList.remove(...e.classList),e.classList.add(...a),e.setAttribute("data-value",`${i}`),e.innerText=`${o.format({month:"short"})}`,o.manipulate(1,t.Unit.month)}))}}class C{constructor(){this.optionsStore=p.locate(m),this.dates=p.locate(w),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",D.selectYear),t.appendChild(e)}return t}_update(e,s){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,t.Unit.year);const i=e.getElementsByClassName(c.css.yearsContainer)[0];if("years"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(c.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.optionsStore.options.display.components.decades?s.classList.remove(c.css.disabled):s.classList.add(c.css.disabled),this.validation.isValid(this._startYear,t.Unit.year)?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled),this.validation.isValid(this._endYear,t.Unit.year)?o.classList.remove(c.css.disabled):o.classList.add(c.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.Unit.year).manipulate(-1,t.Unit.year);i.querySelectorAll(`[data-action="${D.selectYear}"]`).forEach((e=>{let i=[];i.push(c.css.year),!this.optionsStore.unset&&this.dates.isPicked(o,t.Unit.year)&&i.push(c.css.active),this.validation.isValid(o,t.Unit.year)||i.push(c.css.disabled),s(t.Unit.year,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.year}`),e.innerText=o.format({year:"numeric"}),o.manipulate(1,t.Unit.year)}))}}class M{constructor(){this.optionsStore=p.locate(m),this.dates=p.locate(w),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",D.selectDecade),t.appendChild(e)}return t}_update(e,s){const[i,o]=w.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._startDecade.year=i,this._endDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._endDecade.year=o;const a=e.getElementsByClassName(c.css.decadesContainer)[0],[n,r,d]=a.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");"decades"===this.optionsStore.currentView&&(r.setAttribute(c.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,t.Unit.year)?n.classList.remove(c.css.disabled):n.classList.add(c.css.disabled),this.validation.isValid(this._endDecade,t.Unit.year)?d.classList.remove(c.css.disabled):d.classList.add(c.css.disabled));const l=this.dates.picked.map((t=>t.year));a.querySelectorAll(`[data-action="${D.selectDecade}"]`).forEach(((e,i)=>{if(0===i)return e.classList.add(c.css.old),this._startDecade.year-10<0?(e.textContent=" ",n.classList.add(c.css.disabled),e.classList.add(c.css.disabled),void e.setAttribute("data-value","")):(e.innerText=this._startDecade.clone.manipulate(-10,t.Unit.year).format({year:"numeric"}),void e.setAttribute("data-value",`${this._startDecade.year}`));let o=[];o.push(c.css.decade);const a=this._startDecade.year,r=this._startDecade.year+9;!this.optionsStore.unset&&l.filter((t=>t>=a&&t<=r)).length>0&&o.push(c.css.active),s("decade",this._startDecade,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${this._startDecade.year}`),e.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,t.Unit.year)}))}}class E{constructor(){this._gridColumns="",this.optionsStore=p.locate(m),this.dates=p.locate(w),this.validation=p.locate(y)}getPicker(t){const e=document.createElement("div");return e.classList.add(c.css.clockContainer),e.append(...this._grid(t)),e}_update(e){const s=e.getElementsByClassName(c.css.clockContainer)[0],i=(this.dates.lastPicked||this.optionsStore.viewDate).clone;if(s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(c.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${D.incrementHours}]`).classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${D.decrementHours}]`).classList.add(c.css.disabled),s.querySelector(`[data-time-component=${t.Unit.hours}]`).innerText=this.optionsStore.options.display.components.useTwentyfourHour?i.hoursFormatted:i.twelveHoursFormatted),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${D.incrementMinutes}]`).classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${D.decrementMinutes}]`).classList.add(c.css.disabled),s.querySelector(`[data-time-component=${t.Unit.minutes}]`).innerText=i.minutesFormatted),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${D.incrementSeconds}]`).classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${D.decrementSeconds}]`).classList.add(c.css.disabled),s.querySelector(`[data-time-component=${t.Unit.seconds}]`).innerText=i.secondsFormatted),!this.optionsStore.options.display.components.useTwentyfourHour){const e=s.querySelector(`[data-action=${D.toggleMeridiem}]`);e.innerText=i.meridiem(),this.validation.isValid(i.clone.manipulate(i.hours>=12?-12:12,t.Unit.hours))?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(e){this._gridColumns="";const s=[],i=[],o=[],a=document.createElement("div"),n=e(this.optionsStore.options.display.icons.up),r=e(this.optionsStore.options.display.icons.down);a.classList.add(c.css.separator,c.css.noHighlight);const d=a.cloneNode(!0);d.innerHTML=":";const l=(t=!1)=>t?d.cloneNode(!0):a.cloneNode(!0);if(this.optionsStore.options.display.components.hours){let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementHour),e.setAttribute("data-action",D.incrementHours),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickHour),e.setAttribute("data-action",D.showHours),e.setAttribute("data-time-component",t.Unit.hours),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementHour),e.setAttribute("data-action",D.decrementHours),e.appendChild(r.cloneNode(!0)),o.push(e),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(l()),i.push(l(!0)),o.push(l()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementMinute),e.setAttribute("data-action",D.incrementMinutes),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickMinute),e.setAttribute("data-action",D.showMinutes),e.setAttribute("data-time-component",t.Unit.minutes),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementMinute),e.setAttribute("data-action",D.decrementMinutes),e.appendChild(r.cloneNode(!0)),o.push(e)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(l()),i.push(l(!0)),o.push(l()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementSecond),e.setAttribute("data-action",D.incrementSeconds),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickSecond),e.setAttribute("data-action",D.showSeconds),e.setAttribute("data-time-component",t.Unit.seconds),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementSecond),e.setAttribute("data-action",D.decrementSeconds),e.appendChild(r.cloneNode(!0)),o.push(e)}if(!this.optionsStore.options.display.components.useTwentyfourHour){this._gridColumns+=" a";let t=l();s.push(t);let e=document.createElement("button");e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",D.toggleMeridiem),e.setAttribute("tabindex","-1"),c.css.toggleMeridiem.includes(",")?e.classList.add(...c.css.toggleMeridiem.split(",")):e.classList.add(c.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(c.css.noHighlight),t.appendChild(e),i.push(t),t=l(),o.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...i,...o]}}class L{constructor(){this.optionsStore=p.locate(m),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.hourContainer);for(let e=0;e<(this.optionsStore.options.display.components.useTwentyfourHour?24:12);e++){const e=document.createElement("div");e.setAttribute("data-action",D.selectHour),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.hourContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.date);i.querySelectorAll(`[data-action="${D.selectHour}"]`).forEach((e=>{let i=[];i.push(c.css.hour),this.validation.isValid(o,t.Unit.hours)||i.push(c.css.disabled),s(t.Unit.hours,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.hours}`),e.innerText=this.optionsStore.options.display.components.useTwentyfourHour?o.hoursFormatted:o.twelveHoursFormatted,o.manipulate(1,t.Unit.hours)}))}}class T{constructor(){this.optionsStore=p.locate(m),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.minuteContainer);let e=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;for(let s=0;s<60/e;s++){const e=document.createElement("div");e.setAttribute("data-action",D.selectMinute),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.minuteContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.hours),a=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;i.querySelectorAll(`[data-action="${D.selectMinute}"]`).forEach((e=>{let i=[];i.push(c.css.minute),this.validation.isValid(o,t.Unit.minutes)||i.push(c.css.disabled),s(t.Unit.minutes,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.minutes}`),e.innerText=o.minutesFormatted,o.manipulate(a,t.Unit.minutes)}))}}class U{constructor(){this.optionsStore=p.locate(m),this.validation=p.locate(y)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",D.selectSecond),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.secondContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.minutes);i.querySelectorAll(`[data-action="${D.selectSecond}"]`).forEach((e=>{let i=[];i.push(c.css.second),this.validation.isValid(o,t.Unit.seconds)||i.push(c.css.disabled),s(t.Unit.seconds,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.seconds}`),e.innerText=o.secondsFormatted,o.manipulate(5,t.Unit.seconds)}))}}class A{static toggle(t){t.classList.contains(c.css.show)?this.hide(t):this.show(t)}static showImmediately(t){t.classList.remove(c.css.collapsing),t.classList.add(c.css.collapse,c.css.show),t.style.height=""}static show(t){if(t.classList.contains(c.css.collapsing)||t.classList.contains(c.css.show))return;t.style.height="0",t.classList.remove(c.css.collapse),t.classList.add(c.css.collapsing),setTimeout((()=>{A.showImmediately(t)}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hideImmediately(t){t&&(t.classList.remove(c.css.collapsing,c.css.show),t.classList.add(c.css.collapse))}static hide(t){if(t.classList.contains(c.css.collapsing)||!t.classList.contains(c.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(c.css.collapse,c.css.show),t.classList.add(c.css.collapsing),t.style.height="",setTimeout((()=>{A.hideImmediately(t)}),this.getTransitionDurationFromElement(t))}}A.getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),o=Number.parseFloat(s);return i||o?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0};class ${constructor(){this._isVisible=!1,this._documentClickEvent=t=>{var e;this.optionsStore.options.debug||window.debug||!this._isVisible||t.composedPath().includes(this.widget)||(null===(e=t.composedPath())||void 0===e?void 0:e.includes(this.optionsStore.element))||this.hide()},this._actionsClickEvent=t=>{this._eventEmitters.action.emit({e:t})},this.optionsStore=p.locate(m),this.validation=p.locate(y),this.dates=p.locate(w),this.dateDisplay=p.locate(k),this.monthDisplay=p.locate(_),this.yearDisplay=p.locate(C),this.decadeDisplay=p.locate(M),this.timeDisplay=p.locate(E),this.hourDisplay=p.locate(L),this.minuteDisplay=p.locate(T),this.secondDisplay=p.locate(U),this._eventEmitters=p.locate(g),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get isVisible(){return this._isVisible}_update(e){if(this.widget)switch(e){case t.Unit.seconds:this.secondDisplay._update(this.widget,this.paint);break;case t.Unit.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case t.Unit.hours:this.hourDisplay._update(this.widget,this.paint);break;case t.Unit.date:this.dateDisplay._update(this.widget,this.paint);break;case t.Unit.month:this.monthDisplay._update(this.widget,this.paint);break;case t.Unit.year:this.yearDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(t.Unit.hours),this._update(t.Unit.minutes),this._update(t.Unit.seconds);break;case"calendar":this._update(t.Unit.date),this._update(t.Unit.year),this._update(t.Unit.month),this.decadeDisplay._update(this.widget,this.paint),this._updateCalendarHeader();break;case"all":this._hasTime&&this._update("clock"),this._hasDate&&this._update("calendar")}}paint(t,e,s,i){}show(){var e,s;if(null==this.widget){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const s=(new n).setLocale(this.optionsStore.options.localization.locale);if(!this.optionsStore.options.keepInvalid){let i=0,o=1;for((null===(e=this.optionsStore.options.restrictions.maxDate)||void 0===e?void 0:e.isBefore(s))&&(o=-1);!(this.validation.isValid(s)||(s.manipulate(o,t.Unit.date),i>31));)i++}this.dates.setValue(s)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}this._buildWidget(),this._updateTheme();const i=this._hasTime&&!this._hasDate;if(i&&(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:D.showClock})),this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),i||"clock"===this.optionsStore.options.display.viewMode||(this._hasTime&&(this.optionsStore.options.display.sideBySide?A.show(this.widget.querySelector(`div.${c.css.timeContainer}`)):A.hideImmediately(this.widget.querySelector(`div.${c.css.timeContainer}`))),A.show(this.widget.querySelector(`div.${c.css.dateContainer}`))),this._hasDate&&this._showMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{((null===(s=this.optionsStore.options)||void 0===s?void 0:s.container)||document.body).appendChild(this.widget),this.createPopup(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?"bottom-end":"bottom-start"}).then()}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:D.showClock}),this.widget.querySelectorAll("[data-action]").forEach((t=>t.addEventListener("click",this._actionsClickEvent))),this._hasTime&&this.optionsStore.options.display.sideBySide&&(this.timeDisplay._update(this.widget),this.widget.getElementsByClassName(c.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(c.css.show),this.optionsStore.options.display.inline||(this.updatePopup(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:c.events.show}),this._isVisible=!0}createPopup(t,s,i){return e(this,void 0,void 0,(function*(){const{createPopper:e}=yield import("@popperjs/core");this._popperInstance=e(t,s,i)}))}updatePopup(){var t;null===(t=this._popperInstance)||void 0===t||t.update()}_showMode(t){if(!this.widget)return;if(t){const e=Math.max(this.optionsStore.minimumCalendarViewMode,Math.min(3,this.optionsStore.currentCalendarViewMode+t));if(this.optionsStore.currentCalendarViewMode==e)return;this.optionsStore.currentCalendarViewMode=e}this.widget.querySelectorAll(`.${c.css.dateContainer} > div:not(.${c.css.calendarHeader}), .${c.css.timeContainer} > div:not(.${c.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=u[this.optionsStore.currentCalendarViewMode];let s=this.widget.querySelector(`.${e.className}`);switch(e.className){case c.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case c.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case c.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case c.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this._updateCalendarHeader(),this._eventEmitters.viewUpdate.emit()}_updateTheme(t){if(this.widget){if(t){if(this.optionsStore.options.display.theme===t)return;this.optionsStore.options.display.theme=t}this.widget.classList.remove("light","dark"),this.widget.classList.add(this._getThemeClass()),"auto"===this.optionsStore.options.display.theme?window.matchMedia(c.css.isDarkPreferredQuery).addEventListener("change",(()=>this._updateTheme())):window.matchMedia(c.css.isDarkPreferredQuery).removeEventListener("change",(()=>this._updateTheme()))}}_getThemeClass(){const t=this.optionsStore.options.display.theme||"auto",e=window.matchMedia&&window.matchMedia(c.css.isDarkPreferredQuery).matches;switch(t){case"light":return c.css.lightTheme;case"dark":return c.css.darkTheme;case"auto":return e?c.css.darkTheme:c.css.lightTheme}}_updateCalendarHeader(){const t=[...this.widget.querySelector(`.${c.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(c.css.dateContainer))),[e,s,i]=this.widget.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case c.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),i.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case c.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),i.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case c.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),i.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case c.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),i.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.innerText=this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(c.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:c.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?this.dates.lastPicked.clone:void 0}),this._isVisible=!1),document.removeEventListener("click",this._documentClickEvent))}toggle(){return this._isVisible?this.hide():this.show()}_dispose(){document.removeEventListener("click",this._documentClickEvent),this.widget&&(this.widget.querySelectorAll("[data-action]").forEach((t=>t.removeEventListener("click",this._actionsClickEvent))),this.widget.parentNode.removeChild(this.widget),this._widget=void 0)}_buildWidget(){const t=document.createElement("div");t.classList.add(c.css.widget);const e=document.createElement("div");e.classList.add(c.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const s=document.createElement("div");s.classList.add(c.css.timeContainer),s.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),s.appendChild(this.hourDisplay.getPicker()),s.appendChild(this.minuteDisplay.getPicker()),s.appendChild(this.secondDisplay.getPicker());const i=document.createElement("div");if(i.classList.add(c.css.toolbar),i.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(c.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){t.classList.add(c.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");return o.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),o.appendChild(e),o.appendChild(s),t.appendChild(o),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),void(this._widget=t)}"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),this._hasDate&&(this._hasTime&&(e.classList.add(c.css.collapse),"clock"!==this.optionsStore.options.display.viewMode&&e.classList.add(c.css.show)),t.appendChild(e)),this._hasTime&&(this._hasDate&&(s.classList.add(c.css.collapse),"clock"===this.optionsStore.options.display.viewMode&&s.classList.add(c.css.show)),t.appendChild(s)),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");o.classList.add("arrow"),o.setAttribute("data-popper-arrow",""),t.appendChild(o),this._widget=t}get _hasTime(){return this.optionsStore.options.display.components.clock&&(this.optionsStore.options.display.components.hours||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.components.seconds)}get _hasDate(){return this.optionsStore.options.display.components.calendar&&(this.optionsStore.options.display.components.year||this.optionsStore.options.display.components.month||this.optionsStore.options.display.components.date)}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",D.today),e.setAttribute("title",this.optionsStore.options.localization.today),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)),t.push(e)}if(!this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){let e,s;"clock"===this.optionsStore.options.display.viewMode?(e=this.optionsStore.options.localization.selectDate,s=this.optionsStore.options.display.icons.date):(e=this.optionsStore.options.localization.selectTime,s=this.optionsStore.options.display.icons.time);const i=document.createElement("div");i.setAttribute("data-action",D.togglePicker),i.setAttribute("title",e),i.appendChild(this._iconTag(s)),t.push(i)}if(this.optionsStore.options.display.buttons.clear){const e=document.createElement("div");e.setAttribute("data-action",D.clear),e.setAttribute("title",this.optionsStore.options.localization.clear),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)),t.push(e)}if(this.optionsStore.options.display.buttons.close){const e=document.createElement("div");e.setAttribute("data-action",D.close),e.setAttribute("title",this.optionsStore.options.localization.close),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)),t.push(e)}return t}getHeadTemplate(){const t=document.createElement("div");t.classList.add(c.css.calendarHeader);const e=document.createElement("div");e.classList.add(c.css.previous),e.setAttribute("data-action",D.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(c.css.switch),s.setAttribute("data-action",D.changeCalendarView);const i=document.createElement("div");return i.classList.add(c.css.next),i.setAttribute("data-action",D.next),i.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,i),t}_iconTag(t){if("sprites"===this.optionsStore.options.display.icons.type){const e=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","use");return s.setAttribute("xlink:href",t),s.setAttribute("href",t),e.appendChild(s),e}const e=document.createElement("i");return e.classList.add(...t.split(" ")),e}_rebuild(){const t=this._isVisible;t&&this.hide(),this._dispose(),t&&this.show()}}class O{constructor(){this.optionsStore=p.locate(m),this.dates=p.locate(w),this.validation=p.locate(y),this.display=p.locate($),this._eventEmitters=p.locate(g),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(e,s){var i,o;const a=null==e?void 0:e.currentTarget;if(null===(i=null==a?void 0:a.classList)||void 0===i?void 0:i.contains(c.css.disabled))return!1;s=s||(null===(o=null==a?void 0:a.dataset)||void 0===o?void 0:o.action);const r=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case D.next:case D.previous:this.handleNextPrevious(s);break;case D.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case D.selectMonth:case D.selectYear:case D.selectDecade:const i=+a.dataset.value;switch(s){case D.selectMonth:this.optionsStore.viewDate.month=i;break;case D.selectYear:case D.selectDecade:this.optionsStore.viewDate.year=i}this.optionsStore.currentCalendarViewMode===this.optionsStore.minimumCalendarViewMode?(this.dates.setValue(this.optionsStore.viewDate,this.dates.lastPickedIndex),this.optionsStore.options.display.inline||this.display.hide()):this.display._showMode(-1);break;case D.selectDay:const o=this.optionsStore.viewDate.clone;a.classList.contains(c.css.old)&&o.manipulate(-1,t.Unit.month),a.classList.contains(c.css.new)&&o.manipulate(1,t.Unit.month),o.date=+a.dataset.day;let d=0;this.optionsStore.options.multipleDates?(d=this.dates.pickedIndex(o,t.Unit.date),-1!==d?this.dates.setValue(null,d):this.dates.setValue(o,this.dates.lastPickedIndex+1)):this.dates.setValue(o,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.display.hide();break;case D.selectHour:let l=+a.dataset.value;r.hours>=12&&!this.optionsStore.options.display.components.useTwentyfourHour&&(l+=12),r.hours=l,this.dates.setValue(r,this.dates.lastPickedIndex),this.hideOrClock(e);break;case D.selectMinute:r.minutes=+a.dataset.value,this.dates.setValue(r,this.dates.lastPickedIndex),this.hideOrClock(e);break;case D.selectSecond:r.seconds=+a.dataset.value,this.dates.setValue(r,this.dates.lastPickedIndex),this.hideOrClock(e);break;case D.incrementHours:this.manipulateAndSet(r,t.Unit.hours);break;case D.incrementMinutes:this.manipulateAndSet(r,t.Unit.minutes,this.optionsStore.options.stepping);break;case D.incrementSeconds:this.manipulateAndSet(r,t.Unit.seconds);break;case D.decrementHours:this.manipulateAndSet(r,t.Unit.hours,-1);break;case D.decrementMinutes:this.manipulateAndSet(r,t.Unit.minutes,-1*this.optionsStore.options.stepping);break;case D.decrementSeconds:this.manipulateAndSet(r,t.Unit.seconds,-1);break;case D.toggleMeridiem:this.manipulateAndSet(r,t.Unit.hours,this.dates.lastPicked.hours>=12?-12:12);break;case D.togglePicker:a.getAttribute("title")===this.optionsStore.options.localization.selectDate?(a.setAttribute("title",this.optionsStore.options.localization.selectTime),a.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(a.setAttribute("title",this.optionsStore.options.localization.selectDate),a.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.handleShowClockContainers(D.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${c.css.dateContainer}, .${c.css.timeContainer}`).forEach((t=>A.toggle(t))),this._eventEmitters.viewUpdate.emit();break;case D.showClock:case D.showHours:case D.showMinutes:case D.showSeconds:this.optionsStore.options.display.sideBySide||"clock"===this.optionsStore.currentView||(A.hideImmediately(this.display.widget.querySelector(`div.${c.css.dateContainer}`)),A.showImmediately(this.display.widget.querySelector(`div.${c.css.timeContainer}`))),this.handleShowClockContainers(s);break;case D.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case D.close:this.display.hide();break;case D.today:const h=(new n).setLocale(this.optionsStore.options.localization.locale);this.optionsStore.viewDate=h,this.validation.isValid(h,t.Unit.date)&&this.dates.setValue(h,this.dates.lastPickedIndex)}}handleShowClockContainers(e){if(!this.display._hasTime)return void c.errorMessages.throwError("Cannot show clock containers when time is disabled.");this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${c.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let s="";switch(e){case D.showClock:s=c.css.clockContainer,this.display._update("clock");break;case D.showHours:s=c.css.hourContainer,this.display._update(t.Unit.hours);break;case D.showMinutes:s=c.css.minuteContainer,this.display._update(t.Unit.minutes);break;case D.showSeconds:s=c.css.secondContainer,this.display._update(t.Unit.seconds)}this.display.widget.getElementsByClassName(s)[0].style.display="grid"}handleNextPrevious(t){const{unit:e,step:s}=u[this.optionsStore.currentCalendarViewMode];t===D.next?this.optionsStore.viewDate.manipulate(s,e):this.optionsStore.viewDate.manipulate(-1*s,e),this._eventEmitters.viewUpdate.emit(),this.display._showMode()}hideOrClock(t){!this.optionsStore.options.display.components.useTwentyfourHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,D.showClock):this.display.hide()}manipulateAndSet(t,e,s=1){const i=t.manipulate(s,e);this.validation.isValid(i,e)&&this.dates.setValue(i,this.dates.lastPickedIndex)}}class V{constructor(t,e={}){this._subscribers={},this._isDisabled=!1,this._inputChangeEvent=t=>{if(null==t?void 0:t.detail)return;const e=()=>{this.dates.lastPicked&&(this.optionsStore.viewDate=this.dates.lastPicked.clone)},s=this.optionsStore.input.value;if(this.optionsStore.options.multipleDates)try{const t=s.split(this.optionsStore.options.multipleDatesSeparator);for(let e=0;e{var t,e;(null===(t=this.optionsStore.element)||void 0===t?void 0:t.disabled)||(null===(e=this.optionsStore.input)||void 0===e?void 0:e.disabled)||this.toggle()},p=new h,this._eventEmitters=p.locate(g),this.optionsStore=p.locate(m),this.display=p.locate($),this.dates=p.locate(w),this.actions=p.locate(O),t||c.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,S,!0),this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale),this.optionsStore.unset=!0,this._initializeInput(),this._initializeToggle(),this.optionsStore.options.display.inline&&this.display.show(),this._eventEmitters.triggerEvent.subscribe((t=>{this._triggerEvent(t)})),this._eventEmitters.viewUpdate.subscribe((()=>{this._viewUpdate()}))}get viewDate(){return this.optionsStore.viewDate}updateOptions(t,e=!1){e?this._initializeOptions(t,S):this._initializeOptions(t,this.optionsStore.options),this.display._rebuild()}toggle(){this._isDisabled||this.display.toggle()}show(){this._isDisabled||this.display.show()}hide(){this.display.hide()}disable(){var t;this._isDisabled=!0,null===(t=this.optionsStore.input)||void 0===t||t.setAttribute("disabled","disabled"),this.display.hide()}enable(){var t;this._isDisabled=!1,null===(t=this.optionsStore.input)||void 0===t||t.removeAttribute("disabled")}clear(){this.optionsStore.input.value="",this.dates.clear()}subscribe(t,e){let s;"string"==typeof t&&(t=[t]),s=Array.isArray(e)?e:[e],t.length!==s.length&&c.errorMessages.subscribeMismatch();const i=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:c.events.update,viewDate:this.optionsStore.viewDate.clone})}_unsubscribe(t,e){this._subscribers[t].splice(e,1)}_initializeOptions(t,e,s=!1){var i,o;let a=f.deepCopy(t);a=f._mergeOptions(a,e),s&&(a=f._dataToOptions(this.optionsStore.element,a)),f._validateConflicts(a),a.viewDate=a.viewDate.setLocale(a.localization.locale),this.optionsStore.viewDate.isSame(a.viewDate)||(this.optionsStore.viewDate=a.viewDate),a.display.components.year&&(this.optionsStore.minimumCalendarViewMode=2),a.display.components.month&&(this.optionsStore.minimumCalendarViewMode=1),a.display.components.date&&(this.optionsStore.minimumCalendarViewMode=0),this.optionsStore.currentCalendarViewMode=Math.max(this.optionsStore.minimumCalendarViewMode,this.optionsStore.currentCalendarViewMode),u[this.optionsStore.currentCalendarViewMode].name!==a.display.viewMode&&(this.optionsStore.currentCalendarViewMode=Math.max(u.findIndex((t=>t.name===a.display.viewMode)),this.optionsStore.minimumCalendarViewMode)),(null===(i=this.display)||void 0===i?void 0:i.isVisible)&&this.display._update("all"),void 0===a.display.components.useTwentyfourHour&&(a.display.components.useTwentyfourHour=!(null===(o=a.viewDate.parts())||void 0===o?void 0:o.dayPeriod)),this.optionsStore.options=a}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{let t=this.optionsStore.element.dataset.tdTargetInput;this.optionsStore.input=null==t||"nearest"==t?this.optionsStore.element.querySelector("input"):this.optionsStore.element.querySelector(t)}this.optionsStore.input&&(this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&this.optionsStore.input.addEventListener("click",this._toggleClickEvent),this.optionsStore.input.value&&this._inputChangeEvent())}_initializeToggle(){if(this.optionsStore.options.display.inline)return;let t=this.optionsStore.element.dataset.tdTargetToggle;"nearest"==t&&(t='[data-td-toggle="datetimepicker"]'),this._toggle=null==t?this.optionsStore.element:this.optionsStore.element.querySelector(t),this._toggle.addEventListener("click",this._toggleClickEvent)}_handleAfterChangeEvent(t){var e,s;!this.optionsStore.options.promptTimeOnDateChange||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||(null===(e=this.display.widget)||void 0===e?void 0:e.getElementsByClassName(c.css.show)[0].classList.contains(c.css.timeContainer))||!t.oldDate&&this.optionsStore.options.useCurrent||t.oldDate&&(null===(s=t.date)||void 0===s?void 0:s.isSame(t.oldDate))||(clearTimeout(this._currentPromptTimeTimeout),this._currentPromptTimeTimeout=setTimeout((()=>{this.display.widget&&this._eventEmitters.action.emit({e:{currentTarget:this.display.widget.querySelector(`.${c.css.switch} div`)},action:D.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const H={},x=t=>{H[t.name]||(H[t.name]=t.localization)},P=t=>{let e=H[t];e&&(S.localization=e)},I=function(t,e){return t?(t.installed||(t(e,{TempusDominus:V,Dates:w,Display:$,DateTime:n,ErrorMessages:d},z),t.installed=!0),z):z},N="6.1.2",z={TempusDominus:V,extend:I,loadLocale:x,locale:P,Namespace:c,DefaultOptions:S,DateTime:n,Unit:t.Unit,version:N};t.DateTime=n,t.DefaultOptions=S,t.Namespace=c,t.TempusDominus=V,t.extend=I,t.loadLocale=x,t.locale=P,t.version=N,Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tempusDominus={})}(this,(function(t){"use strict";var e;t.Unit=void 0,(e=t.Unit||(t.Unit={})).seconds="seconds",e.minutes="minutes",e.hours="hours",e.date="date",e.month="month",e.year="year";const s={month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},i={hour:"2-digit",hour12:!1},o=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}};class a extends Date{constructor(){super(...arguments),this.locale="default",this.nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],this.leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335]}setLocale(t){return this.locale=t,this}static convert(t,e="default"){if(!t)throw new Error("A date is required");return new a(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocale(e)}static fromString(t,e){return new a(t)}get clone(){return new a(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocale(this.locale)}startOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(0);break;case"minutes":this.setSeconds(0,0);break;case"hours":this.setMinutes(0,0,0);break;case"date":this.setHours(0,0,0,0);break;case"weekDay":if(this.startOf(t.Unit.date),this.weekDay===s)break;let e=this.weekDay;0!==s&&0===this.weekDay&&(e=8-s),this.manipulate(s-e,t.Unit.date);break;case"month":this.startOf(t.Unit.date),this.setDate(1);break;case"year":this.startOf(t.Unit.date),this.setMonth(0,1)}return this}endOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(999);break;case"minutes":this.setSeconds(59,999);break;case"hours":this.setMinutes(59,59,999);break;case"date":this.setHours(23,59,59,999);break;case"weekDay":this.endOf(t.Unit.date),this.manipulate(6+s-this.weekDay,t.Unit.date);break;case"month":this.endOf(t.Unit.date),this.manipulate(1,t.Unit.month),this.setDate(0);break;case"year":this.endOf(t.Unit.date),this.manipulate(1,t.Unit.year),this.setDate(0)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}format(t,e=this.locale){return new Intl.DateTimeFormat(e,t).format(this)}isBefore(t,e){if(!e)return this.valueOf()t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this.clone.startOf(e).valueOf()>t.clone.startOf(e).valueOf()}isSame(t,e){if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=a.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1];return(o?this.isAfter(t,s):!this.isBefore(t,s))&&(a?this.isBefore(e,s):!this.isAfter(e,s))||(o?this.isBefore(t,s):!this.isAfter(t,s))&&(a?this.isAfter(e,s):!this.isBefore(e,s))}parts(t=this.locale,e={dateStyle:"full",timeStyle:"long"}){const s={};return new Intl.DateTimeFormat(t,e).formatToParts(this).filter((t=>"literal"!==t.type)).forEach((t=>s[t.type]=t.value)),s}get seconds(){return this.getSeconds()}set seconds(t){this.setSeconds(t)}get secondsFormatted(){return this.parts(void 0,s).second}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.parts(void 0,s).minute}get hours(){return this.getHours()}set hours(t){this.setHours(t)}get hoursFormatted(){return this.parts(void 0,i).hour}get twelveHoursFormatted(){return this.parts(void 0,s).hour}meridiem(t=this.locale){return new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0}).formatToParts(this).find((t=>"dayPeriod"===t.type))?.value}get date(){return this.getDate()}set date(t){this.setDate(t)}get dateFormatted(){return this.parts(void 0,s).day}get weekDay(){return this.getDay()}get month(){return this.getMonth()}set month(t){const e=new Date(this.year,t+1);e.setDate(0);const s=e.getDate();this.date>s&&(this.date=s),this.setMonth(t)}get monthFormatted(){return this.parts(void 0,s).month}get year(){return this.getFullYear()}set year(t){this.setFullYear(t)}get week(){const t=this.computeOrdinal(),e=this.getUTCDay();let s=Math.floor((t-e+10)/7);return s<1?s=this.weeksInWeekYear(this.year-1):s>this.weeksInWeekYear(this.year)&&(s=1),s}weeksInWeekYear(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,i=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===i?53:52}get isLeapYear(){return this.year%4==0&&(this.year%100!=0||this.year%400==0)}computeOrdinal(){return this.date+(this.isLeapYear?this.leapLadder:this.nonLeapLadder)[this.month]}}class n extends Error{}class r{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const e=new n(`${this.base} Unexpected option: ${t} does not match a known option.`);throw e.code=1,e}unexpectedOptions(t){const e=new n(`${this.base}: ${t.join(", ")}`);throw e.code=1,e}unexpectedOptionValue(t,e,s){const i=new n(`${this.base} Unexpected option value: ${t} does not accept a value of "${e}". Valid values are: ${s.join(", ")}`);throw i.code=2,i}typeMismatch(t,e,s){const i=new n(`${this.base} Mismatch types: ${t} has a type of ${e} instead of the required ${s}`);throw i.code=3,i}numbersOutOfRage(t,e,s){const i=new n(`${this.base} ${t} expected an array of number between ${e} and ${s}.`);throw i.code=4,i}failedToParseDate(t,e,s=!1){const i=new n(`${this.base} Could not correctly parse "${e}" to a date for ${t}.`);if(i.code=5,!s)throw i;console.warn(i)}mustProvideElement(){const t=new n(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new n(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const e=new n(`${this.base} A configuration value conflicts with another rule. ${t}`);throw e.code=8,e}customDateFormatError(t){const e=new n(`${this.base} customDateFormat: ${t}`);throw e.code=9,e}dateString(){console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`)}throwError(t){const e=new n(`${this.base} ${t}`);throw e.code=9,e}}const d="tempus-dominus";class c{}c.NAME=d,c.dataKey="td",c.events=new class{constructor(){this.key=".td",this.change=`change${this.key}`,this.update=`update${this.key}`,this.error=`error${this.key}`,this.show=`show${this.key}`,this.hide=`hide${this.key}`,this.blur=`blur${this.key}`,this.focus=`focus${this.key}`,this.keyup=`keyup${this.key}`,this.keydown=`keydown${this.key}`}},c.css=new class{constructor(){this.widget=`${d}-widget`,this.calendarHeader="calendar-header",this.switch="picker-switch",this.toolbar="toolbar",this.noHighlight="no-highlight",this.sideBySide="timepicker-sbs",this.previous="previous",this.next="next",this.disabled="disabled",this.old="old",this.new="new",this.active="active",this.dateContainer="date-container",this.decadesContainer=`${this.dateContainer}-decades`,this.decade="decade",this.yearsContainer=`${this.dateContainer}-years`,this.year="year",this.monthsContainer=`${this.dateContainer}-months`,this.month="month",this.daysContainer=`${this.dateContainer}-days`,this.day="day",this.calendarWeeks="cw",this.dayOfTheWeek="dow",this.today="today",this.weekend="weekend",this.timeContainer="time-container",this.separator="separator",this.clockContainer=`${this.timeContainer}-clock`,this.hourContainer=`${this.timeContainer}-hour`,this.minuteContainer=`${this.timeContainer}-minute`,this.secondContainer=`${this.timeContainer}-second`,this.hour="hour",this.minute="minute",this.second="second",this.toggleMeridiem="toggleMeridiem",this.show="show",this.collapsing="td-collapsing",this.collapse="td-collapse",this.inline="inline",this.lightTheme="light",this.darkTheme="dark",this.isDarkPreferredQuery="(prefers-color-scheme: dark)"}},c.errorMessages=new r;class l{constructor(){this.cache=new Map}locate(t){const e=this.cache.get(t);if(e)return e;const s=new t;return this.cache.set(t,s),s}}let h;const p=[{name:"calendar",className:c.css.daysContainer,unit:t.Unit.month,step:1},{name:"months",className:c.css.monthsContainer,unit:t.Unit.year,step:1},{name:"years",className:c.css.yearsContainer,unit:t.Unit.year,step:10},{name:"decades",className:c.css.decadesContainer,unit:t.Unit.year,step:100}];class u{constructor(){this.viewDate=new a,this._currentCalendarViewMode=0,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=p[t].name}refreshCurrentView(){this.currentView=p[this.currentCalendarViewMode].name}}class m{constructor(){this.optionsStore=h.locate(u)}isValid(e,s){if(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(e))return!1;if(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(e))return!1;if(s!==t.Unit.month&&s!==t.Unit.year&&this.optionsStore.options.restrictions.daysOfWeekDisabled?.length>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(e.weekDay))return!1;if(this.optionsStore.options.restrictions.minDate&&e.isBefore(this.optionsStore.options.restrictions.minDate,s))return!1;if(this.optionsStore.options.restrictions.maxDate&&e.isAfter(this.optionsStore.options.restrictions.maxDate,s))return!1;if(s===t.Unit.hours||s===t.Unit.minutes||s===t.Unit.seconds){if(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(e))return!1;if(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(e))return!1;if(this.optionsStore.options.restrictions.disabledTimeIntervals.length>0)for(let t of this.optionsStore.options.restrictions.disabledTimeIntervals)if(e.isBetween(t.from,t.to))return!1}return!0}_isInDisabledDates(e){if(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)return!1;const s=e.format(o(t.Unit.date));return this.optionsStore.options.restrictions.disabledDates.map((e=>e.format(o(t.Unit.date)))).find((t=>t===s))}_isInEnabledDates(e){if(!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length)return!0;const s=e.format(o(t.Unit.date));return this.optionsStore.options.restrictions.enabledDates.map((e=>e.format(o(t.Unit.date)))).find((t=>t===s))}_isInDisabledHours(t){if(!this.optionsStore.options.restrictions.disabledHours||0===this.optionsStore.options.restrictions.disabledHours.length)return!1;const e=t.hours;return this.optionsStore.options.restrictions.disabledHours.find((t=>t===e))}_isInEnabledHours(t){if(!this.optionsStore.options.restrictions.enabledHours||0===this.optionsStore.options.restrictions.enabledHours.length)return!0;const e=t.hours;return this.optionsStore.options.restrictions.enabledHours.find((t=>t===e))}}class y{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),this.unsubscribe.bind(this,this.subscribers.length-1)}unsubscribe(t){this.subscribers.splice(t,1)}emit(t){this.subscribers.forEach((e=>{e(t)}))}destroy(){this.subscribers=null,this.subscribers=[]}}class g{constructor(){this.triggerEvent=new y,this.viewUpdate=new y,this.updateDisplay=new y,this.action=new y}destroy(){this.triggerEvent.destroy(),this.viewUpdate.destroy(),this.updateDisplay.destroy(),this.action.destroy()}}const v={restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},display:{icons:{type:"icons",time:"fa-solid fa-clock",date:"fa-solid fa-calendar",up:"fa-solid fa-arrow-up",down:"fa-solid fa-arrow-down",previous:"fa-solid fa-chevron-left",next:"fa-solid fa-chevron-right",today:"fa-solid fa-calendar-check",clear:"fa-solid fa-trash",close:"fa-solid fa-xmark"},sideBySide:!1,calendarWeeks:!1,viewMode:"calendar",toolbarPlacement:"bottom",keepOpen:!1,buttons:{today:!1,clear:!1,close:!1},components:{calendar:!0,date:!0,month:!0,year:!0,decades:!0,clock:!0,hours:!0,minutes:!0,seconds:!1,useTwentyfourHour:void 0},inline:!1,theme:"auto"},stepping:1,useCurrent:!0,defaultDate:void 0,localization:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",previousMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",previousYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",previousDecade:"Previous Decade",nextDecade:"Next Decade",previousCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",toggleMeridiem:"Toggle Meridiem",selectTime:"Select Time",selectDate:"Select Date",dayViewHeaderFormat:{month:"long",year:"2-digit"},locale:"default",startOfTheWeek:0,dateFormats:{LTS:"h:mm:ss T",LT:"h:mm T",L:"MM/dd/yyyy",LL:"MMMM d, yyyy",LLL:"MMMM d, yyyy h:mm T",LLLL:"dddd, MMMM d, yyyy h:mm T"},ordinal:t=>t,format:"L"},keepInvalid:!1,debug:!1,allowInputToggle:!1,viewDate:new a,multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,meta:{},container:void 0};class S{static deepCopy(t){const e={};return Object.keys(t).forEach((s=>{const i=t[s];e[s]=i,"object"!=typeof i||i instanceof HTMLElement||i instanceof Element||i instanceof Date||Array.isArray(i)||(e[s]=S.deepCopy(i))})),e}static objectPath(t,e){return"."===t.charAt(0)&&(t=t.slice(1)),t?t.split(".").reduce(((t,e)=>S.isValue(t)||S.isValue(t[e])?t[e]:void 0),e):e}static spread(t,e,s="",i){const o=S.objectPath(s,v),a=Object.keys(t).filter((t=>!Object.keys(o).includes(t)));if(a.length>0){const t=S.getFlattenDefaultOptions(),e=a.map((e=>{let i=`"${s}.${e}" in not a known option.`,o=t.find((t=>t.includes(e)));return o&&(i+=` Did you mean "${o}"?`),i}));c.errorMessages.unexpectedOptions(e)}Object.keys(t).filter((t=>"__proto__"!==t&&"constructor"!==t)).forEach((a=>{"."===(s+=`.${a}`).charAt(0)&&(s=s.slice(1));const n=o[a];let r=typeof t[a],d=typeof n,c=t[a];if(null==c)return e[a]=c,void(s=s.substring(0,s.lastIndexOf(`.${a}`)));"object"!=typeof n||Array.isArray(t[a])||n instanceof Date||S.ignoreProperties.includes(a)?e[a]=S.processKey(a,c,r,d,s,i):S.spread(t[a],e[a],s,i),s=s.substring(0,s.lastIndexOf(`.${a}`))}))}static processKey(t,e,s,i,o,a){switch(t){case"defaultDate":{const t=this.dateConversion(e,"defaultDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("defaultDate",s,"DateTime or Date");break}case"viewDate":{const t=this.dateConversion(e,"viewDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("viewDate",s,"DateTime or Date");break}case"minDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.minDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("restrictions.minDate",s,"DateTime or Date");break}case"maxDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.maxDate",a);if(void 0!==t)return t.setLocale(a.locale),t;c.errorMessages.typeMismatch("restrictions.maxDate",s,"DateTime or Date");break}case"disabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.disabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&c.errorMessages.numbersOutOfRage("restrictions.disabledHours",0,23),e);case"enabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.enabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&c.errorMessages.numbersOutOfRage("restrictions.enabledHours",0,23),e);case"daysOfWeekDisabled":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.daysOfWeekDisabled",e,s),e.filter((t=>t<0||t>6)).length>0&&c.errorMessages.numbersOutOfRage("restrictions.daysOfWeekDisabled",0,6),e);case"enabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.enabledDates",e,s,a),e);case"disabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.disabledDates",e,s,a),e);case"disabledTimeIntervals":if(void 0===e)return[];Array.isArray(e)||c.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const n=e;for(let e=0;e{const i=`${t}[${e}].${s}`;let o=n[e][s];const r=this.dateConversion(o,i,a);r||c.errorMessages.typeMismatch(i,typeof o,"DateTime or Date"),r.setLocale(a.locale),n[e][s]=r}));return n;case"toolbarPlacement":case"type":case"viewMode":case"theme":const r={toolbarPlacement:["top","bottom","default"],type:["icons","sprites"],viewMode:["clock","calendar","months","years","decades"],theme:["light","dark","auto"]}[t];return r.includes(e)||c.errorMessages.unexpectedOptionValue(o.substring(1),e,r),e;case"meta":case"dayViewHeaderFormat":return e;case"container":return e&&!(e instanceof HTMLElement||e instanceof Element||e?.appendChild)&&c.errorMessages.typeMismatch(o.substring(1),typeof e,"HTMLElement"),e;case"useTwentyfourHour":if(void 0===e||"boolean"===s)return e;c.errorMessages.typeMismatch(o,s,i);break;default:switch(i){case"boolean":return"true"===e||!0===e;case"number":return+e;case"string":return e.toString();case"object":return{};case"function":return e;default:c.errorMessages.typeMismatch(o,s,i)}}}static _mergeOptions(t,e){const s=S.deepCopy(e),i="default"!==e.localization?.locale?e.localization:t?.localization||v.localization;return S.spread(t,s,"",i),s}static _dataToOptions(t,e){const s=JSON.parse(JSON.stringify(t.dataset));if(s?.tdTargetInput&&delete s.tdTargetInput,s?.tdTargetToggle&&delete s.tdTargetToggle,!s||0===Object.keys(s).length||s.constructor!==DOMStringMap)return e;let i={};const o=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},a=(t,e,s,i)=>{const n=o(s)[t[e].toLowerCase()],r={};return void 0===n||(s[n].constructor===Object?(e++,r[n]=a(t,e,s[n],i)):r[n]=i),r},n=o(e);return Object.keys(s).filter((t=>t.startsWith(c.dataKey))).map((t=>t.substring(2))).forEach((t=>{let o=n[t.toLowerCase()];if(t.includes("_")){const r=t.split("_");o=n[r[0].toLowerCase()],void 0!==o&&e[o].constructor===Object&&(i[o]=a(r,1,e[o],s[`td${t}`]))}else void 0!==o&&(i[o]=s[`td${t}`])})),this._mergeOptions(i,e)}static _dateTypeCheck(t,e){if(t.constructor.name===a.name)return t;if(t.constructor.name===Date.name)return a.convert(t);if("string"==typeof t){const s=a.fromString(t,e);return"null"===JSON.stringify(s)?null:s}return null}static _typeCheckDateArray(t,e,s,i){Array.isArray(e)||c.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||c.errorMessages.typeMismatch(t,s,"array of numbers")}static dateConversion(t,e,s){"string"==typeof t&&"input"!==e&&c.errorMessages.dateString();const i=this._dateTypeCheck(t,s);return i||c.errorMessages.failedToParseDate(e,t,"input"===e),i}static getFlattenDefaultOptions(){if(this._flattenDefaults)return this._flattenDefaults;const t=(e,s=[])=>Array.isArray(e)?[]:Object(e)===e?Object.entries(e).flatMap((([e,i])=>t(i,[...s,e]))):s.join(".");return this._flattenDefaults=t(v),this._flattenDefaults}static _validateConflicts(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||c.errorMessages.conflictingConfiguration("Cannot use side by side mode without the clock components"),t.restrictions.minDate&&t.restrictions.maxDate&&(t.restrictions.minDate.isAfter(t.restrictions.maxDate)&&c.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&c.errorMessages.conflictingConfiguration("maxDate is before minDate"))}}S.ignoreProperties=["meta","dayViewHeaderFormat","container","dateForms","ordinal"],S.isValue=t=>null!=t;class w{constructor(){this._dates=[],this.optionsStore=h.locate(u),this.validation=h.locate(m),this._eventEmitters=h.locate(g)}get picked(){return this._dates}get lastPicked(){return this._dates[this.lastPickedIndex]}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){const e=this.optionsStore.options.display.components;return t?t.format({year:e.calendar&&e.year?"numeric":void 0,month:e.calendar&&e.month?"2-digit":void 0,day:e.calendar&&e.date?"2-digit":void 0,hour:e.clock&&e.hours?e.useTwentyfourHour?"2-digit":"numeric":void 0,minute:e.clock&&e.minutes?"2-digit":void 0,second:e.clock&&e.seconds?"2-digit":void 0,hour12:!e.useTwentyfourHour}):""}parseInput(t){return S.dateConversion(t,"input",this.optionsStore.options.localization)}setFromInput(t,e){if(!t)return void this.setValue(void 0,e);const s=this.parseInput(t);s&&(s.setLocale(this.optionsStore.options.localization.locale),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!e)return void 0!==this._dates.find((e=>e===t));const s=o(e);let i=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===i))}pickedIndex(t,e){if(!e)return this._dates.indexOf(t);const s=o(e);let i=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(i)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:c.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[]}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}setValue(t,e){const s=void 0===e,i=!t&&s;let o=this.optionsStore.unset?null:this._dates[e];!o&&!this.optionsStore.unset&&s&&i&&(o=this.lastPicked);const a=()=>{if(!this.optionsStore.input)return;let e=this.formatInput(t);this.optionsStore.options.multipleDates&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)};if(t&&o?.isSame(t))a();else{if(!t)return!this.optionsStore.options.multipleDates||1===this._dates.length||i?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),a(),this._eventEmitters.triggerEvent.emit({type:c.events.change,date:void 0,oldDate:o,isClear:i,isValid:!0}),void this._eventEmitters.updateDisplay.emit("all");if(e=e||0,t=t.clone,1!==this.optionsStore.options.stepping&&(t.minutes=Math.round(t.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,t.seconds=0),this.validation.isValid(t))return this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),void this._eventEmitters.triggerEvent.emit({type:c.events.change,date:t,oldDate:o,isClear:i,isValid:!0});this.optionsStore.options.keepInvalid&&(this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this._eventEmitters.triggerEvent.emit({type:c.events.change,date:t,oldDate:o,isClear:i,isValid:!1})),this._eventEmitters.triggerEvent.emit({type:c.events.error,reason:c.errorMessages.failedToSetInvalidDate,date:t,oldDate:o})}}}var f;!function(t){t.next="next",t.previous="previous",t.changeCalendarView="changeCalendarView",t.selectMonth="selectMonth",t.selectYear="selectYear",t.selectDecade="selectDecade",t.selectDay="selectDay",t.selectHour="selectHour",t.selectMinute="selectMinute",t.selectSecond="selectSecond",t.incrementHours="incrementHours",t.incrementMinutes="incrementMinutes",t.incrementSeconds="incrementSeconds",t.decrementHours="decrementHours",t.decrementMinutes="decrementMinutes",t.decrementSeconds="decrementSeconds",t.toggleMeridiem="toggleMeridiem",t.togglePicker="togglePicker",t.showClock="showClock",t.showHours="showHours",t.showMinutes="showMinutes",t.showSeconds="showSeconds",t.clear="clear",t.close="close",t.today="today"}(f||(f={}));var b=f;class D{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");if(t.classList.add(c.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(c.css.calendarWeeks,c.css.noHighlight),t.appendChild(e)}for(let e=0;e<42;e++){if(0!==e&&e%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(c.css.calendarWeeks,c.css.noHighlight),t.appendChild(e)}const s=document.createElement("div");s.setAttribute("data-action",b.selectDay),t.appendChild(s)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.daysContainer)[0];if("calendar"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(c.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.optionsStore.options.display.components.month?s.classList.remove(c.css.disabled):s.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.month),t.Unit.month)?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.month),t.Unit.month)?o.classList.remove(c.css.disabled):o.classList.add(c.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.Unit.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,t.Unit.hours);i.querySelectorAll(`[data-action="${b.selectDay}"], .${c.css.calendarWeeks}`).forEach((e=>{if(this.optionsStore.options.display.calendarWeeks&&e.classList.contains(c.css.calendarWeeks)){if("#"===e.innerText)return;return void(e.innerText=`${o.week}`)}let i=[];i.push(c.css.day),o.isBefore(this.optionsStore.viewDate,t.Unit.month)&&i.push(c.css.old),o.isAfter(this.optionsStore.viewDate,t.Unit.month)&&i.push(c.css.new),!this.optionsStore.unset&&this.dates.isPicked(o,t.Unit.date)&&i.push(c.css.active),this.validation.isValid(o,t.Unit.date)||i.push(c.css.disabled),o.isSame(new a,t.Unit.date)&&i.push(c.css.today),0!==o.weekDay&&6!==o.weekDay||i.push(c.css.weekend),s(t.Unit.date,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.year}-${o.monthFormatted}-${o.dateFormatted}`),e.setAttribute("data-day",`${o.date}`),e.innerText=o.format({day:"numeric"}),o.manipulate(1,t.Unit.date)}))}_daysOfTheWeek(){let e=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(t.Unit.date);const s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(c.css.calendarWeeks,c.css.noHighlight),t.innerText="#",s.push(t)}for(let i=0;i<7;i++){const i=document.createElement("div");i.classList.add(c.css.dayOfTheWeek,c.css.noHighlight),i.innerText=e.format({weekday:"short"}),e.manipulate(1,t.Unit.date),s.push(i)}return s}}class k{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectMonth),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.monthsContainer)[0];if("months"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(c.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.optionsStore.options.display.components.year?s.classList.remove(c.css.disabled):s.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),t.Unit.year)?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.year),t.Unit.year)?o.classList.remove(c.css.disabled):o.classList.add(c.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.Unit.year);i.querySelectorAll(`[data-action="${b.selectMonth}"]`).forEach(((e,i)=>{let a=[];a.push(c.css.month),!this.optionsStore.unset&&this.dates.isPicked(o,t.Unit.month)&&a.push(c.css.active),this.validation.isValid(o,t.Unit.month)||a.push(c.css.disabled),s(t.Unit.month,o,a,e),e.classList.remove(...e.classList),e.classList.add(...a),e.setAttribute("data-value",`${i}`),e.innerText=`${o.format({month:"short"})}`,o.manipulate(1,t.Unit.month)}))}}class _{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectYear),t.appendChild(e)}return t}_update(e,s){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,t.Unit.year);const i=e.getElementsByClassName(c.css.yearsContainer)[0];if("years"===this.optionsStore.currentView){const[e,s,o]=i.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");s.setAttribute(c.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.optionsStore.options.display.components.decades?s.classList.remove(c.css.disabled):s.classList.add(c.css.disabled),this.validation.isValid(this._startYear,t.Unit.year)?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled),this.validation.isValid(this._endYear,t.Unit.year)?o.classList.remove(c.css.disabled):o.classList.add(c.css.disabled)}let o=this.optionsStore.viewDate.clone.startOf(t.Unit.year).manipulate(-1,t.Unit.year);i.querySelectorAll(`[data-action="${b.selectYear}"]`).forEach((e=>{let i=[];i.push(c.css.year),!this.optionsStore.unset&&this.dates.isPicked(o,t.Unit.year)&&i.push(c.css.active),this.validation.isValid(o,t.Unit.year)||i.push(c.css.disabled),s(t.Unit.year,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.year}`),e.innerText=o.format({year:"numeric"}),o.manipulate(1,t.Unit.year)}))}}class C{constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectDecade),t.appendChild(e)}return t}_update(e,s){const[i,o]=w.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._startDecade.year=i,this._endDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._endDecade.year=o;const a=e.getElementsByClassName(c.css.decadesContainer)[0],[n,r,d]=a.parentElement.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");"decades"===this.optionsStore.currentView&&(r.setAttribute(c.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,t.Unit.year)?n.classList.remove(c.css.disabled):n.classList.add(c.css.disabled),this.validation.isValid(this._endDecade,t.Unit.year)?d.classList.remove(c.css.disabled):d.classList.add(c.css.disabled));const l=this.dates.picked.map((t=>t.year));a.querySelectorAll(`[data-action="${b.selectDecade}"]`).forEach(((e,i)=>{if(0===i)return e.classList.add(c.css.old),this._startDecade.year-10<0?(e.textContent=" ",n.classList.add(c.css.disabled),e.classList.add(c.css.disabled),void e.setAttribute("data-value","")):(e.innerText=this._startDecade.clone.manipulate(-10,t.Unit.year).format({year:"numeric"}),void e.setAttribute("data-value",`${this._startDecade.year}`));let o=[];o.push(c.css.decade);const a=this._startDecade.year,r=this._startDecade.year+9;!this.optionsStore.unset&&l.filter((t=>t>=a&&t<=r)).length>0&&o.push(c.css.active),s("decade",this._startDecade,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${this._startDecade.year}`),e.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,t.Unit.year)}))}}class M{constructor(){this._gridColumns="",this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m)}getPicker(t){const e=document.createElement("div");return e.classList.add(c.css.clockContainer),e.append(...this._grid(t)),e}_update(e){const s=e.getElementsByClassName(c.css.clockContainer)[0],i=(this.dates.lastPicked||this.optionsStore.viewDate).clone;if(s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(c.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${b.incrementHours}]`).classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${b.decrementHours}]`).classList.add(c.css.disabled),s.querySelector(`[data-time-component=${t.Unit.hours}]`).innerText=this.optionsStore.options.display.components.useTwentyfourHour?i.hoursFormatted:i.twelveHoursFormatted),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${b.incrementMinutes}]`).classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${b.decrementMinutes}]`).classList.add(c.css.disabled),s.querySelector(`[data-time-component=${t.Unit.minutes}]`).innerText=i.minutesFormatted),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${b.incrementSeconds}]`).classList.add(c.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${b.decrementSeconds}]`).classList.add(c.css.disabled),s.querySelector(`[data-time-component=${t.Unit.seconds}]`).innerText=i.secondsFormatted),!this.optionsStore.options.display.components.useTwentyfourHour){const e=s.querySelector(`[data-action=${b.toggleMeridiem}]`);e.innerText=i.meridiem(),this.validation.isValid(i.clone.manipulate(i.hours>=12?-12:12,t.Unit.hours))?e.classList.remove(c.css.disabled):e.classList.add(c.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(e){this._gridColumns="";const s=[],i=[],o=[],a=document.createElement("div"),n=e(this.optionsStore.options.display.icons.up),r=e(this.optionsStore.options.display.icons.down);a.classList.add(c.css.separator,c.css.noHighlight);const d=a.cloneNode(!0);d.innerHTML=":";const l=(t=!1)=>t?d.cloneNode(!0):a.cloneNode(!0);if(this.optionsStore.options.display.components.hours){let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementHour),e.setAttribute("data-action",b.incrementHours),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickHour),e.setAttribute("data-action",b.showHours),e.setAttribute("data-time-component",t.Unit.hours),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementHour),e.setAttribute("data-action",b.decrementHours),e.appendChild(r.cloneNode(!0)),o.push(e),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(l()),i.push(l(!0)),o.push(l()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementMinute),e.setAttribute("data-action",b.incrementMinutes),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickMinute),e.setAttribute("data-action",b.showMinutes),e.setAttribute("data-time-component",t.Unit.minutes),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementMinute),e.setAttribute("data-action",b.decrementMinutes),e.appendChild(r.cloneNode(!0)),o.push(e)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(l()),i.push(l(!0)),o.push(l()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementSecond),e.setAttribute("data-action",b.incrementSeconds),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickSecond),e.setAttribute("data-action",b.showSeconds),e.setAttribute("data-time-component",t.Unit.seconds),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementSecond),e.setAttribute("data-action",b.decrementSeconds),e.appendChild(r.cloneNode(!0)),o.push(e)}if(!this.optionsStore.options.display.components.useTwentyfourHour){this._gridColumns+=" a";let t=l();s.push(t);let e=document.createElement("button");e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",b.toggleMeridiem),e.setAttribute("tabindex","-1"),c.css.toggleMeridiem.includes(",")?e.classList.add(...c.css.toggleMeridiem.split(",")):e.classList.add(c.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(c.css.noHighlight),t.appendChild(e),i.push(t),t=l(),o.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...i,...o]}}class E{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.hourContainer);for(let e=0;e<(this.optionsStore.options.display.components.useTwentyfourHour?24:12);e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectHour),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.hourContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.date);i.querySelectorAll(`[data-action="${b.selectHour}"]`).forEach((e=>{let i=[];i.push(c.css.hour),this.validation.isValid(o,t.Unit.hours)||i.push(c.css.disabled),s(t.Unit.hours,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.hours}`),e.innerText=this.optionsStore.options.display.components.useTwentyfourHour?o.hoursFormatted:o.twelveHoursFormatted,o.manipulate(1,t.Unit.hours)}))}}class L{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.minuteContainer);let e=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;for(let s=0;s<60/e;s++){const e=document.createElement("div");e.setAttribute("data-action",b.selectMinute),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.minuteContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.hours),a=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;i.querySelectorAll(`[data-action="${b.selectMinute}"]`).forEach((e=>{let i=[];i.push(c.css.minute),this.validation.isValid(o,t.Unit.minutes)||i.push(c.css.disabled),s(t.Unit.minutes,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.minutes}`),e.innerText=o.minutesFormatted,o.manipulate(a,t.Unit.minutes)}))}}class T{constructor(){this.optionsStore=h.locate(u),this.validation=h.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(c.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",b.selectSecond),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(c.css.secondContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.minutes);i.querySelectorAll(`[data-action="${b.selectSecond}"]`).forEach((e=>{let i=[];i.push(c.css.second),this.validation.isValid(o,t.Unit.seconds)||i.push(c.css.disabled),s(t.Unit.seconds,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.seconds}`),e.innerText=o.secondsFormatted,o.manipulate(5,t.Unit.seconds)}))}}class U{static toggle(t){t.classList.contains(c.css.show)?this.hide(t):this.show(t)}static showImmediately(t){t.classList.remove(c.css.collapsing),t.classList.add(c.css.collapse,c.css.show),t.style.height=""}static show(t){if(t.classList.contains(c.css.collapsing)||t.classList.contains(c.css.show))return;t.style.height="0",t.classList.remove(c.css.collapse),t.classList.add(c.css.collapsing),setTimeout((()=>{U.showImmediately(t)}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hideImmediately(t){t&&(t.classList.remove(c.css.collapsing,c.css.show),t.classList.add(c.css.collapse))}static hide(t){if(t.classList.contains(c.css.collapsing)||!t.classList.contains(c.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(c.css.collapse,c.css.show),t.classList.add(c.css.collapsing),t.style.height="",setTimeout((()=>{U.hideImmediately(t)}),this.getTransitionDurationFromElement(t))}}U.getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),o=Number.parseFloat(s);return i||o?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0};class A{constructor(){this._isVisible=!1,this._documentClickEvent=t=>{this.optionsStore.options.debug||window.debug||!this._isVisible||t.composedPath().includes(this.widget)||t.composedPath()?.includes(this.optionsStore.element)||this.hide()},this._actionsClickEvent=t=>{this._eventEmitters.action.emit({e:t})},this.optionsStore=h.locate(u),this.validation=h.locate(m),this.dates=h.locate(w),this.dateDisplay=h.locate(D),this.monthDisplay=h.locate(k),this.yearDisplay=h.locate(_),this.decadeDisplay=h.locate(C),this.timeDisplay=h.locate(M),this.hourDisplay=h.locate(E),this.minuteDisplay=h.locate(L),this.secondDisplay=h.locate(T),this._eventEmitters=h.locate(g),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get isVisible(){return this._isVisible}_update(e){if(this.widget)switch(e){case t.Unit.seconds:this.secondDisplay._update(this.widget,this.paint);break;case t.Unit.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case t.Unit.hours:this.hourDisplay._update(this.widget,this.paint);break;case t.Unit.date:this.dateDisplay._update(this.widget,this.paint);break;case t.Unit.month:this.monthDisplay._update(this.widget,this.paint);break;case t.Unit.year:this.yearDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(t.Unit.hours),this._update(t.Unit.minutes),this._update(t.Unit.seconds);break;case"calendar":this._update(t.Unit.date),this._update(t.Unit.year),this._update(t.Unit.month),this.decadeDisplay._update(this.widget,this.paint),this._updateCalendarHeader();break;case"all":this._hasTime&&this._update("clock"),this._hasDate&&this._update("calendar")}}paint(t,e,s,i){}show(){if(null==this.widget){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const e=(new a).setLocale(this.optionsStore.options.localization.locale);if(!this.optionsStore.options.keepInvalid){let s=0,i=1;for(this.optionsStore.options.restrictions.maxDate?.isBefore(e)&&(i=-1);!(this.validation.isValid(e)||(e.manipulate(i,t.Unit.date),s>31));)s++}this.dates.setValue(e)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}this._buildWidget(),this._updateTheme();const e=this._hasTime&&!this._hasDate;if(e&&(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:b.showClock})),this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),e||"clock"===this.optionsStore.options.display.viewMode||(this._hasTime&&(this.optionsStore.options.display.sideBySide?U.show(this.widget.querySelector(`div.${c.css.timeContainer}`)):U.hideImmediately(this.widget.querySelector(`div.${c.css.timeContainer}`))),U.show(this.widget.querySelector(`div.${c.css.dateContainer}`))),this._hasDate&&this._showMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{(this.optionsStore.options?.container||document.body).appendChild(this.widget),this.createPopup(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?"bottom-end":"bottom-start"}).then()}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:b.showClock}),this.widget.querySelectorAll("[data-action]").forEach((t=>t.addEventListener("click",this._actionsClickEvent))),this._hasTime&&this.optionsStore.options.display.sideBySide&&(this.timeDisplay._update(this.widget),this.widget.getElementsByClassName(c.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(c.css.show),this.optionsStore.options.display.inline||(this.updatePopup(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:c.events.show}),this._isVisible=!0}async createPopup(t,e,s){let i;if(window?.Popper)i=window?.Popper?.createPopper;else{const{createPopper:t}=await import("@popperjs/core");i=t}i&&(this._popperInstance=i(t,e,s))}updatePopup(){this._popperInstance?.update()}_showMode(t){if(!this.widget)return;if(t){const e=Math.max(this.optionsStore.minimumCalendarViewMode,Math.min(3,this.optionsStore.currentCalendarViewMode+t));if(this.optionsStore.currentCalendarViewMode==e)return;this.optionsStore.currentCalendarViewMode=e}this.widget.querySelectorAll(`.${c.css.dateContainer} > div:not(.${c.css.calendarHeader}), .${c.css.timeContainer} > div:not(.${c.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=p[this.optionsStore.currentCalendarViewMode];let s=this.widget.querySelector(`.${e.className}`);switch(e.className){case c.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case c.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case c.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case c.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this._updateCalendarHeader(),this._eventEmitters.viewUpdate.emit()}_updateTheme(t){if(this.widget){if(t){if(this.optionsStore.options.display.theme===t)return;this.optionsStore.options.display.theme=t}this.widget.classList.remove("light","dark"),this.widget.classList.add(this._getThemeClass()),"auto"===this.optionsStore.options.display.theme?window.matchMedia(c.css.isDarkPreferredQuery).addEventListener("change",(()=>this._updateTheme())):window.matchMedia(c.css.isDarkPreferredQuery).removeEventListener("change",(()=>this._updateTheme()))}}_getThemeClass(){const t=this.optionsStore.options.display.theme||"auto",e=window.matchMedia&&window.matchMedia(c.css.isDarkPreferredQuery).matches;switch(t){case"light":return c.css.lightTheme;case"dark":return c.css.darkTheme;case"auto":return e?c.css.darkTheme:c.css.lightTheme}}_updateCalendarHeader(){const t=[...this.widget.querySelector(`.${c.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(c.css.dateContainer))),[e,s,i]=this.widget.getElementsByClassName(c.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case c.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),i.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case c.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),i.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case c.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),i.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case c.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),i.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.innerText=this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(c.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:c.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?this.dates.lastPicked.clone:void 0}),this._isVisible=!1),document.removeEventListener("click",this._documentClickEvent))}toggle(){return this._isVisible?this.hide():this.show()}_dispose(){document.removeEventListener("click",this._documentClickEvent),this.widget&&(this.widget.querySelectorAll("[data-action]").forEach((t=>t.removeEventListener("click",this._actionsClickEvent))),this.widget.parentNode.removeChild(this.widget),this._widget=void 0)}_buildWidget(){const t=document.createElement("div");t.classList.add(c.css.widget);const e=document.createElement("div");e.classList.add(c.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const s=document.createElement("div");s.classList.add(c.css.timeContainer),s.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),s.appendChild(this.hourDisplay.getPicker()),s.appendChild(this.minuteDisplay.getPicker()),s.appendChild(this.secondDisplay.getPicker());const i=document.createElement("div");if(i.classList.add(c.css.toolbar),i.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(c.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){t.classList.add(c.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");return o.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),o.appendChild(e),o.appendChild(s),t.appendChild(o),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),void(this._widget=t)}"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),this._hasDate&&(this._hasTime&&(e.classList.add(c.css.collapse),"clock"!==this.optionsStore.options.display.viewMode&&e.classList.add(c.css.show)),t.appendChild(e)),this._hasTime&&(this._hasDate&&(s.classList.add(c.css.collapse),"clock"===this.optionsStore.options.display.viewMode&&s.classList.add(c.css.show)),t.appendChild(s)),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");o.classList.add("arrow"),o.setAttribute("data-popper-arrow",""),t.appendChild(o),this._widget=t}get _hasTime(){return this.optionsStore.options.display.components.clock&&(this.optionsStore.options.display.components.hours||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.components.seconds)}get _hasDate(){return this.optionsStore.options.display.components.calendar&&(this.optionsStore.options.display.components.year||this.optionsStore.options.display.components.month||this.optionsStore.options.display.components.date)}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",b.today),e.setAttribute("title",this.optionsStore.options.localization.today),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)),t.push(e)}if(!this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){let e,s;"clock"===this.optionsStore.options.display.viewMode?(e=this.optionsStore.options.localization.selectDate,s=this.optionsStore.options.display.icons.date):(e=this.optionsStore.options.localization.selectTime,s=this.optionsStore.options.display.icons.time);const i=document.createElement("div");i.setAttribute("data-action",b.togglePicker),i.setAttribute("title",e),i.appendChild(this._iconTag(s)),t.push(i)}if(this.optionsStore.options.display.buttons.clear){const e=document.createElement("div");e.setAttribute("data-action",b.clear),e.setAttribute("title",this.optionsStore.options.localization.clear),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)),t.push(e)}if(this.optionsStore.options.display.buttons.close){const e=document.createElement("div");e.setAttribute("data-action",b.close),e.setAttribute("title",this.optionsStore.options.localization.close),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)),t.push(e)}return t}getHeadTemplate(){const t=document.createElement("div");t.classList.add(c.css.calendarHeader);const e=document.createElement("div");e.classList.add(c.css.previous),e.setAttribute("data-action",b.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(c.css.switch),s.setAttribute("data-action",b.changeCalendarView);const i=document.createElement("div");return i.classList.add(c.css.next),i.setAttribute("data-action",b.next),i.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,i),t}_iconTag(t){if("sprites"===this.optionsStore.options.display.icons.type){const e=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","use");return s.setAttribute("xlink:href",t),s.setAttribute("href",t),e.appendChild(s),e}const e=document.createElement("i");return e.classList.add(...t.split(" ")),e}_rebuild(){const t=this._isVisible;t&&this.hide(),this._dispose(),t&&this.show()}}class ${constructor(){this.optionsStore=h.locate(u),this.dates=h.locate(w),this.validation=h.locate(m),this.display=h.locate(A),this._eventEmitters=h.locate(g),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(e,s){const i=e?.currentTarget;if(i?.classList?.contains(c.css.disabled))return!1;s=s||i?.dataset?.action;const o=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case b.next:case b.previous:this.handleNextPrevious(s);break;case b.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case b.selectMonth:case b.selectYear:case b.selectDecade:const n=+i.dataset.value;switch(s){case b.selectMonth:this.optionsStore.viewDate.month=n;break;case b.selectYear:case b.selectDecade:this.optionsStore.viewDate.year=n}this.optionsStore.currentCalendarViewMode===this.optionsStore.minimumCalendarViewMode?(this.dates.setValue(this.optionsStore.viewDate,this.dates.lastPickedIndex),this.optionsStore.options.display.inline||this.display.hide()):this.display._showMode(-1);break;case b.selectDay:const r=this.optionsStore.viewDate.clone;i.classList.contains(c.css.old)&&r.manipulate(-1,t.Unit.month),i.classList.contains(c.css.new)&&r.manipulate(1,t.Unit.month),r.date=+i.dataset.day;let d=0;this.optionsStore.options.multipleDates?(d=this.dates.pickedIndex(r,t.Unit.date),-1!==d?this.dates.setValue(null,d):this.dates.setValue(r,this.dates.lastPickedIndex+1)):this.dates.setValue(r,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.display.hide();break;case b.selectHour:let l=+i.dataset.value;o.hours>=12&&!this.optionsStore.options.display.components.useTwentyfourHour&&(l+=12),o.hours=l,this.dates.setValue(o,this.dates.lastPickedIndex),this.hideOrClock(e);break;case b.selectMinute:o.minutes=+i.dataset.value,this.dates.setValue(o,this.dates.lastPickedIndex),this.hideOrClock(e);break;case b.selectSecond:o.seconds=+i.dataset.value,this.dates.setValue(o,this.dates.lastPickedIndex),this.hideOrClock(e);break;case b.incrementHours:this.manipulateAndSet(o,t.Unit.hours);break;case b.incrementMinutes:this.manipulateAndSet(o,t.Unit.minutes,this.optionsStore.options.stepping);break;case b.incrementSeconds:this.manipulateAndSet(o,t.Unit.seconds);break;case b.decrementHours:this.manipulateAndSet(o,t.Unit.hours,-1);break;case b.decrementMinutes:this.manipulateAndSet(o,t.Unit.minutes,-1*this.optionsStore.options.stepping);break;case b.decrementSeconds:this.manipulateAndSet(o,t.Unit.seconds,-1);break;case b.toggleMeridiem:this.manipulateAndSet(o,t.Unit.hours,this.dates.lastPicked.hours>=12?-12:12);break;case b.togglePicker:i.getAttribute("title")===this.optionsStore.options.localization.selectDate?(i.setAttribute("title",this.optionsStore.options.localization.selectTime),i.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(i.setAttribute("title",this.optionsStore.options.localization.selectDate),i.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.handleShowClockContainers(b.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${c.css.dateContainer}, .${c.css.timeContainer}`).forEach((t=>U.toggle(t))),this._eventEmitters.viewUpdate.emit();break;case b.showClock:case b.showHours:case b.showMinutes:case b.showSeconds:this.optionsStore.options.display.sideBySide||"clock"===this.optionsStore.currentView||(U.hideImmediately(this.display.widget.querySelector(`div.${c.css.dateContainer}`)),U.showImmediately(this.display.widget.querySelector(`div.${c.css.timeContainer}`))),this.handleShowClockContainers(s);break;case b.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case b.close:this.display.hide();break;case b.today:const h=(new a).setLocale(this.optionsStore.options.localization.locale);this.optionsStore.viewDate=h,this.validation.isValid(h,t.Unit.date)&&this.dates.setValue(h,this.dates.lastPickedIndex)}}handleShowClockContainers(e){if(!this.display._hasTime)return void c.errorMessages.throwError("Cannot show clock containers when time is disabled.");this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${c.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let s="";switch(e){case b.showClock:s=c.css.clockContainer,this.display._update("clock");break;case b.showHours:s=c.css.hourContainer,this.display._update(t.Unit.hours);break;case b.showMinutes:s=c.css.minuteContainer,this.display._update(t.Unit.minutes);break;case b.showSeconds:s=c.css.secondContainer,this.display._update(t.Unit.seconds)}this.display.widget.getElementsByClassName(s)[0].style.display="grid"}handleNextPrevious(t){const{unit:e,step:s}=p[this.optionsStore.currentCalendarViewMode];t===b.next?this.optionsStore.viewDate.manipulate(s,e):this.optionsStore.viewDate.manipulate(-1*s,e),this._eventEmitters.viewUpdate.emit(),this.display._showMode()}hideOrClock(t){!this.optionsStore.options.display.components.useTwentyfourHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,b.showClock):this.display.hide()}manipulateAndSet(t,e,s=1){const i=t.manipulate(s,e);this.validation.isValid(i,e)&&this.dates.setValue(i,this.dates.lastPickedIndex)}}class O{constructor(t,e={}){this._subscribers={},this._isDisabled=!1,this._inputChangeEvent=t=>{const e=t?.detail;if(e)return;const s=()=>{this.dates.lastPicked&&(this.optionsStore.viewDate=this.dates.lastPicked.clone)},i=this.optionsStore.input.value;if(this.optionsStore.options.multipleDates)try{const t=i.split(this.optionsStore.options.multipleDatesSeparator);for(let e=0;e{this.optionsStore.element?.disabled||this.optionsStore.input?.disabled||this.toggle()},h=new l,this._eventEmitters=h.locate(g),this.optionsStore=h.locate(u),this.display=h.locate(A),this.dates=h.locate(w),this.actions=h.locate($),t||c.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,v,!0),this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale),this.optionsStore.unset=!0,this._initializeInput(),this._initializeToggle(),this.optionsStore.options.display.inline&&this.display.show(),this._eventEmitters.triggerEvent.subscribe((t=>{this._triggerEvent(t)})),this._eventEmitters.viewUpdate.subscribe((()=>{this._viewUpdate()}))}get viewDate(){return this.optionsStore.viewDate}updateOptions(t,e=!1){e?this._initializeOptions(t,v):this._initializeOptions(t,this.optionsStore.options),this.display._rebuild()}toggle(){this._isDisabled||this.display.toggle()}show(){this._isDisabled||this.display.show()}hide(){this.display.hide()}disable(){this._isDisabled=!0,this.optionsStore.input?.setAttribute("disabled","disabled"),this.display.hide()}enable(){this._isDisabled=!1,this.optionsStore.input?.removeAttribute("disabled")}clear(){this.optionsStore.input.value="",this.dates.clear()}subscribe(t,e){let s;"string"==typeof t&&(t=[t]),s=Array.isArray(e)?e:[e],t.length!==s.length&&c.errorMessages.subscribeMismatch();const i=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:c.events.update,viewDate:this.optionsStore.viewDate.clone})}_unsubscribe(t,e){this._subscribers[t].splice(e,1)}_initializeOptions(t,e,s=!1){let i=S.deepCopy(t);i=S._mergeOptions(i,e),s&&(i=S._dataToOptions(this.optionsStore.element,i)),S._validateConflicts(i),i.viewDate=i.viewDate.setLocale(i.localization.locale),this.optionsStore.viewDate.isSame(i.viewDate)||(this.optionsStore.viewDate=i.viewDate),i.display.components.year&&(this.optionsStore.minimumCalendarViewMode=2),i.display.components.month&&(this.optionsStore.minimumCalendarViewMode=1),i.display.components.date&&(this.optionsStore.minimumCalendarViewMode=0),this.optionsStore.currentCalendarViewMode=Math.max(this.optionsStore.minimumCalendarViewMode,this.optionsStore.currentCalendarViewMode),p[this.optionsStore.currentCalendarViewMode].name!==i.display.viewMode&&(this.optionsStore.currentCalendarViewMode=Math.max(p.findIndex((t=>t.name===i.display.viewMode)),this.optionsStore.minimumCalendarViewMode)),this.display?.isVisible&&this.display._update("all"),void 0===i.display.components.useTwentyfourHour&&(i.display.components.useTwentyfourHour=!i.viewDate.parts()?.dayPeriod),this.optionsStore.options=i}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{let t=this.optionsStore.element.dataset.tdTargetInput;this.optionsStore.input=null==t||"nearest"==t?this.optionsStore.element.querySelector("input"):this.optionsStore.element.querySelector(t)}this.optionsStore.input&&(this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&this.optionsStore.input.addEventListener("click",this._toggleClickEvent),this.optionsStore.input.value&&this._inputChangeEvent())}_initializeToggle(){if(this.optionsStore.options.display.inline)return;let t=this.optionsStore.element.dataset.tdTargetToggle;"nearest"==t&&(t='[data-td-toggle="datetimepicker"]'),this._toggle=null==t?this.optionsStore.element:this.optionsStore.element.querySelector(t),this._toggle.addEventListener("click",this._toggleClickEvent)}_handleAfterChangeEvent(t){!this.optionsStore.options.promptTimeOnDateChange||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||this.display.widget?.getElementsByClassName(c.css.show)[0].classList.contains(c.css.timeContainer)||!t.oldDate&&this.optionsStore.options.useCurrent||t.oldDate&&t.date?.isSame(t.oldDate)||(clearTimeout(this._currentPromptTimeTimeout),this._currentPromptTimeTimeout=setTimeout((()=>{this.display.widget&&this._eventEmitters.action.emit({e:{currentTarget:this.display.widget.querySelector(`.${c.css.switch} div`)},action:b.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const V={},H=t=>{V[t.name]||(V[t.name]=t.localization)},x=t=>{let e=V[t];e&&(v.localization=e)},P=function(t,e){return t?(t.installed||(t(e,{TempusDominus:O,Dates:w,Display:A,DateTime:a,ErrorMessages:r},N),t.installed=!0),N):N},I="6.1.3",N={TempusDominus:O,extend:P,loadLocale:H,locale:x,Namespace:c,DefaultOptions:v,DateTime:a,Unit:t.Unit,version:I};t.DateTime=a,t.DefaultOptions=v,t.Namespace=c,t.TempusDominus=O,t.extend=P,t.loadLocale=H,t.locale=x,t.version=I,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/locales/ar-SA.js b/dist/locales/ar-SA.js index b1cb50720..117b6ca22 100644 --- a/dist/locales/ar-SA.js +++ b/dist/locales/ar-SA.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/ar.js b/dist/locales/ar.js index a141c3532..2adb20bfd 100644 --- a/dist/locales/ar.js +++ b/dist/locales/ar.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/de.js b/dist/locales/de.js index 2fb6e5b1a..5acd926ce 100644 --- a/dist/locales/de.js +++ b/dist/locales/de.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/es.js b/dist/locales/es.js index f2e756cb6..8169147d8 100644 --- a/dist/locales/es.js +++ b/dist/locales/es.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/fi.js b/dist/locales/fi.js index e57057be1..9e09cfe52 100644 --- a/dist/locales/fi.js +++ b/dist/locales/fi.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/fr.js b/dist/locales/fr.js index 2b9f4b44b..b85407c46 100644 --- a/dist/locales/fr.js +++ b/dist/locales/fr.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/it.js b/dist/locales/it.js index 3e3984d09..8c6d233eb 100644 --- a/dist/locales/it.js +++ b/dist/locales/it.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/nl.js b/dist/locales/nl.js index 303c6d18a..0297d1526 100644 --- a/dist/locales/nl.js +++ b/dist/locales/nl.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/ro.js b/dist/locales/ro.js index 25a26c8c8..c57aab4a9 100644 --- a/dist/locales/ro.js +++ b/dist/locales/ro.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/ru.js b/dist/locales/ru.js index 78ff5c8e1..6cfa503f6 100644 --- a/dist/locales/ru.js +++ b/dist/locales/ru.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/sl.js b/dist/locales/sl.js index a82249b86..a5261ff53 100644 --- a/dist/locales/sl.js +++ b/dist/locales/sl.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/locales/tr.js b/dist/locales/tr.js new file mode 100644 index 000000000..e00c42581 --- /dev/null +++ b/dist/locales/tr.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.tr={})));})(this,(function(exports){'use strict';const name = 'tr'; +const localization = { + today: 'Bugün', + clear: 'Temizle', + close: 'Kapat', + selectMonth: 'Ay seçin', + previousMonth: 'Önceki Ay', + nextMonth: 'Sonraki Ay', + selectYear: 'Yıl seçin', + previousYear: 'Önceki yıl', + nextYear: 'Sonraki yıl', + selectDecade: 'On yıl seçin', + previousDecade: 'Önceki on yıl', + nextDecade: 'Sonraki on yıl', + previousCentury: 'Önceki yüzyıl', + nextCentury: 'Sonraki yüzyıl', + pickHour: "Saat seçin", + incrementHour: "Saati ilerlet", + decrementHour: "Saati gerilet", + pickMinute: 'Dakika seçin', + incrementMinute: 'Dakikayı ilerlet', + decrementMinute: 'Dakikayı gerilet', + pickSecond: 'Saniye seç', + incrementSecond: 'Saniyeyi ilerlet', + decrementSecond: 'Saniyeyi gerilet', + toggleMeridiem: 'Meridemi Değiştir AM-PM', + selectTime: "Saat seçin", + selectDate: 'Tarih seçin', + dayViewHeaderFormat: { month: 'long', year: 'numeric' }, + locale: 'tr', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/plugins/customDateFormat.js b/dist/plugins/customDateFormat.js index 0a29eb694..3d3ccb20b 100644 --- a/dist/plugins/customDateFormat.js +++ b/dist/plugins/customDateFormat.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ @@ -175,13 +175,12 @@ } ; meridiemMatch(input) { - var _a; - const meridiem = (_a = new Intl.DateTimeFormat(this.localization.locale, { + const meridiem = new Intl.DateTimeFormat(this.localization.locale, { hour: 'numeric', hour12: true, }) .formatToParts(new Date(2022, 3, 4, 13)) - .find((p) => p.type === 'dayPeriod')) === null || _a === void 0 ? void 0 : _a.value; + .find((p) => p.type === 'dayPeriod')?.value; return input.toLowerCase() === meridiem.toLowerCase(); } ; diff --git a/dist/plugins/fa-five.js b/dist/plugins/fa-five.js index fd0ffeedf..1f7b13b97 100644 --- a/dist/plugins/fa-five.js +++ b/dist/plugins/fa-five.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/dist/plugins/moment-parse.js b/dist/plugins/moment-parse.js index c7e8b5e1e..afdb214d6 100644 --- a/dist/plugins/moment-parse.js +++ b/dist/plugins/moment-parse.js @@ -1,5 +1,5 @@ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/package-lock.json b/package-lock.json index d02b3f716..500923d32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,17 @@ { "name": "@eonasdan/tempus-dominus", - "version": "6.1.2", + "version": "6.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@eonasdan/tempus-dominus", - "version": "6.1.2", + "version": "6.1.3", "license": "MIT", "devDependencies": { "@popperjs/core": "^2.11.6", - "@rollup/plugin-node-resolve": "^13.3.0", - "@rollup/plugin-typescript": "^8.5.0", - "@types/node": "^18.7.18", + "@rollup/plugin-node-resolve": "^14.1.0", + "@types/node": "^18.7.20", "bootstrap": "^5.2.1", "browser-sync": "^2.27.10", "chokidar": "^3.5.3", @@ -27,7 +26,7 @@ "rollup": "^2.79.1", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "0.34.0", + "rollup-plugin-ts": "^3.0.2", "sass": "^1.55.0", "terser": "^5.15.0", "tslib": "^2.4.0", @@ -41,33 +40,33 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -113,9 +112,18 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -186,6 +194,12 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@mdn/browser-compat-data": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz", + "integrity": "sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==", + "dev": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -232,9 +246,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", - "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", + "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -248,39 +262,7 @@ "node": ">= 10.0.0" }, "peerDependencies": { - "rollup": "^2.42.0" - } - }, - "node_modules/@rollup/plugin-node-resolve/node_modules/@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.5.0.tgz", - "integrity": "sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0", - "tslib": "*", - "typescript": ">=3.7.0" - }, - "peerDependenciesMeta": { - "tslib": { - "optional": true - } + "rollup": "^2.78.0" } }, "node_modules/@rollup/pluginutils": { @@ -295,6 +277,9 @@ }, "engines": { "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" } }, "node_modules/@socket.io/component-emitter": { @@ -321,12 +306,6 @@ "node": ">=10.13.0" } }, - "node_modules/@types/component-emitter": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", - "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", - "dev": true - }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -346,11 +325,47 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", - "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", + "version": "18.7.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", + "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", + "dev": true + }, + "node_modules/@types/object-path": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.1.tgz", + "integrity": "sha512-219LSCO9HPcoXcRTC6DbCs0FRhZgBnEMzf16RRqkT40WbkKx3mOeQuz3e2XqbfhOz/AHfbru0kzB1n1RCAsIIg==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/semver": { + "version": "7.3.12", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.12.tgz", + "integrity": "sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==", + "dev": true + }, + "node_modules/@types/ua-parser-js": { + "version": "0.7.36", + "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz", + "integrity": "sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==", "dev": true }, + "node_modules/@wessberg/stringutil": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/@wessberg/stringutil/-/stringutil-1.0.19.tgz", + "integrity": "sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -422,31 +437,63 @@ "debug": "4" }, "engines": { - "node": ">= 6.0.0-beta10" + "node": ">= 6.0.0" } }, - "node_modules/alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -492,7 +539,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "node_modules/axios": { @@ -505,9 +552,9 @@ } }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "node_modules/base64id": { @@ -525,19 +572,10 @@ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", "dev": true }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "engines": { "node": ">=8" @@ -546,7 +584,7 @@ "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, "node_modules/bootstrap": { @@ -671,26 +709,85 @@ } }, "node_modules/browserslist": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", - "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001254", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.830", - "escalade": "^3.1.1", - "node-releases": "^1.1.75" + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/browserslist-generator": { + "version": "1.0.66", + "resolved": "https://registry.npmjs.org/browserslist-generator/-/browserslist-generator-1.0.66.tgz", + "integrity": "sha512-aFDax4Qzh29DdyhHQBD2Yu2L5OvaDnvYFMbmpLrLwwaNK4H6dHEhC/Nxv93/+mfAA+a/t94ln0P2JZvHO6LZDA==", + "dev": true, + "dependencies": { + "@mdn/browser-compat-data": "^4.1.16", + "@types/object-path": "^0.11.1", + "@types/semver": "^7.3.9", + "@types/ua-parser-js": "^0.7.36", + "browserslist": "4.20.2", + "caniuse-lite": "^1.0.30001328", + "isbot": "3.4.5", + "object-path": "^0.11.8", + "semver": "^7.3.7", + "ua-parser-js": "^1.0.2" + }, + "engines": { + "node": ">=8.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" + "type": "github", + "url": "https://github.com/wessberg/browserslist-generator?sponsor=1" + } + }, + "node_modules/browserslist-generator/node_modules/browserslist": { + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", + "escalade": "^3.1.1", + "node-releases": "^2.0.2", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, "node_modules/bs-recipes": { @@ -755,9 +852,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001376", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001376.tgz", - "integrity": "sha512-I27WhtOQ3X3v3it9gNs/oTpoE5KpwmqKR5oKPA8M0G7uMXh9Ty81Q904HpKUrM30ei7zfcL5jE7AXefgbOfMig==", + "version": "1.0.30001412", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", + "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", "dev": true, "funding": [ { @@ -771,19 +868,31 @@ ] }, "node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/chokidar": { @@ -813,18 +922,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/clean-css": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.1.tgz", @@ -848,27 +945,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -888,15 +964,9 @@ "dev": true }, "node_modules/colord": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.7.0.tgz", - "integrity": "sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q==", - "dev": true - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", "dev": true }, "node_modules/combined-stream": { @@ -912,27 +982,33 @@ } }, "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } }, - "node_modules/commondir": { + "node_modules/compatfactory": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true + "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-1.0.1.tgz", + "integrity": "sha512-hR9u0HSZTKDNNchPtMHg6myeNx0XO+av7UZIJPsi4rPALJBHi/W5Mbwi19hC/xm6y3JkYpxVYjTqnSGsU5X/iw==", + "dev": true, + "dependencies": { + "helpertypes": "^0.0.18" + }, + "engines": { + "node": ">=14.9.0" + }, + "peerDependencies": { + "typescript": ">=3.x || >= 4.x" + } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "node_modules/concat-with-sourcemaps": { @@ -971,86 +1047,19 @@ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/concurrently/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/concurrently/node_modules/rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "tslib": "^2.1.0" } }, - "node_modules/concurrently/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/rxjs": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", - "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", - "dev": true, - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/concurrently/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha512-OO7axMmPpu/2XuX1+2Yrg0ddju31B6xLZMWkJ5rYBu4YRmRVlOjvlY6kw2FJKiAzyxGwnrDUAG4s1Pf0sbBMCQ==", + "node_modules/connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha512-OO7axMmPpu/2XuX1+2Yrg0ddju31B6xLZMWkJ5rYBu4YRmRVlOjvlY6kw2FJKiAzyxGwnrDUAG4s1Pf0sbBMCQ==", "dev": true, "dependencies": { "debug": "2.6.9", @@ -1071,15 +1080,6 @@ "node": ">=0.8" } }, - "node_modules/connect/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -1102,41 +1102,47 @@ "node": ">= 0.10" } }, - "node_modules/css-color-names": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-1.0.1.tgz", - "integrity": "sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA==", + "node_modules/crosspath": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crosspath/-/crosspath-2.0.0.tgz", + "integrity": "sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==", "dev": true, + "dependencies": { + "@types/node": "^17.0.36" + }, "engines": { - "node": "*" + "node": ">=14.9.0" } }, + "node_modules/crosspath/node_modules/@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + }, "node_modules/css-declaration-sorter": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.3.tgz", - "integrity": "sha512-SvjQjNRZgh4ULK1LDJ2AduPKUKxIqmtU7ZAyi47BTV+M90Qvxr9AB6lKlLbDUfXqI9IQeYA8LbAsCZPpJEV3aA==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", + "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==", "dev": true, - "dependencies": { - "timsort": "^0.3.0" - }, "engines": { - "node": ">= 10" + "node": "^10 || ^12 || >=14" }, "peerDependencies": { "postcss": "^8.0.9" } }, "node_modules/css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", "dev": true, "dependencies": { "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" }, "funding": { "url": "https://github.com/sponsors/fb55" @@ -1156,9 +1162,9 @@ } }, "node_modules/css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true, "engines": { "node": ">= 6" @@ -1180,13 +1186,12 @@ } }, "node_modules/cssnano": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.0.8.tgz", - "integrity": "sha512-Lda7geZU0Yu+RZi2SGpjYuQz4HI4/1Y+BhdD0jL7NXAQ5larCzVn+PUGuZbDMYz904AXXCOgO5L1teSvgu7aFg==", + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.13.tgz", + "integrity": "sha512-S2SL2ekdEz6w6a2epXn4CmMKU4K3KpcyXLKfAYc9UQQqJRkD/2eLUG0vJ3Db/9OvO5GuAdgXw3pFbR6abqghDQ==", "dev": true, "dependencies": { - "cssnano-preset-default": "^5.1.4", - "is-resolvable": "^1.1.0", + "cssnano-preset-default": "^5.2.12", "lilconfig": "^2.0.3", "yaml": "^1.10.2" }, @@ -1202,40 +1207,40 @@ } }, "node_modules/cssnano-preset-default": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz", - "integrity": "sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ==", - "dev": true, - "dependencies": { - "css-declaration-sorter": "^6.0.3", - "cssnano-utils": "^2.0.1", - "postcss-calc": "^8.0.0", - "postcss-colormin": "^5.2.0", - "postcss-convert-values": "^5.0.1", - "postcss-discard-comments": "^5.0.1", - "postcss-discard-duplicates": "^5.0.1", - "postcss-discard-empty": "^5.0.1", - "postcss-discard-overridden": "^5.0.1", - "postcss-merge-longhand": "^5.0.2", - "postcss-merge-rules": "^5.0.2", - "postcss-minify-font-values": "^5.0.1", - "postcss-minify-gradients": "^5.0.2", - "postcss-minify-params": "^5.0.1", - "postcss-minify-selectors": "^5.1.0", - "postcss-normalize-charset": "^5.0.1", - "postcss-normalize-display-values": "^5.0.1", - "postcss-normalize-positions": "^5.0.1", - "postcss-normalize-repeat-style": "^5.0.1", - "postcss-normalize-string": "^5.0.1", - "postcss-normalize-timing-functions": "^5.0.1", - "postcss-normalize-unicode": "^5.0.1", - "postcss-normalize-url": "^5.0.2", - "postcss-normalize-whitespace": "^5.0.1", - "postcss-ordered-values": "^5.0.2", - "postcss-reduce-initial": "^5.0.1", - "postcss-reduce-transforms": "^5.0.1", - "postcss-svgo": "^5.0.2", - "postcss-unique-selectors": "^5.0.1" + "version": "5.2.12", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz", + "integrity": "sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==", + "dev": true, + "dependencies": { + "css-declaration-sorter": "^6.3.0", + "cssnano-utils": "^3.1.0", + "postcss-calc": "^8.2.3", + "postcss-colormin": "^5.3.0", + "postcss-convert-values": "^5.1.2", + "postcss-discard-comments": "^5.1.2", + "postcss-discard-duplicates": "^5.1.0", + "postcss-discard-empty": "^5.1.1", + "postcss-discard-overridden": "^5.1.0", + "postcss-merge-longhand": "^5.1.6", + "postcss-merge-rules": "^5.1.2", + "postcss-minify-font-values": "^5.1.0", + "postcss-minify-gradients": "^5.1.1", + "postcss-minify-params": "^5.1.3", + "postcss-minify-selectors": "^5.2.1", + "postcss-normalize-charset": "^5.1.0", + "postcss-normalize-display-values": "^5.1.0", + "postcss-normalize-positions": "^5.1.1", + "postcss-normalize-repeat-style": "^5.1.1", + "postcss-normalize-string": "^5.1.0", + "postcss-normalize-timing-functions": "^5.1.0", + "postcss-normalize-unicode": "^5.1.0", + "postcss-normalize-url": "^5.1.0", + "postcss-normalize-whitespace": "^5.1.1", + "postcss-ordered-values": "^5.1.3", + "postcss-reduce-initial": "^5.1.0", + "postcss-reduce-transforms": "^5.1.0", + "postcss-svgo": "^5.1.0", + "postcss-unique-selectors": "^5.1.1" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -1245,9 +1250,9 @@ } }, "node_modules/cssnano-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz", - "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", "dev": true, "engines": { "node": "^10 || ^12 || >=14.0" @@ -1307,9 +1312,9 @@ } }, "node_modules/date-fns": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz", - "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==", + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", + "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", "dev": true, "engines": { "node": ">=0.11" @@ -1320,38 +1325,24 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "ms": "2.0.0" } }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.1.tgz", + "integrity": "sha512-F29o+vci4DodHYT9UrR5IEbfBw9pE5eSapIJdTqXK5+6hq+t8VRxwQyKlW2i+KDKFkkJQRvFyI/QXD83h8LyQw==", "dev": true }, "node_modules/deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "node_modules/deepmerge": { @@ -1366,7 +1357,7 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "engines": { "node": ">=0.4.0" @@ -1418,9 +1409,9 @@ "dev": true }, "node_modules/dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", "dev": true, "dependencies": { "domelementtype": "^2.0.1", @@ -1431,10 +1422,19 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/domelementtype": { + "node_modules/dom-serializer/node_modules/entities": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, "funding": [ { @@ -1456,9 +1456,9 @@ } }, "node_modules/domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "dev": true, "dependencies": { "domelementtype": "^2.2.0" @@ -1531,9 +1531,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.3.839", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.839.tgz", - "integrity": "sha512-0O7uPs9LJNjQ/U5mW78qW8gXv9H6Ba3DHZ5/yt8aBsvomOWDkV3MddT7enUYvLQEUVOURjWmgJJWVZ3K98tIwQ==", + "version": "1.4.264", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.264.tgz", + "integrity": "sha512-AZ6ZRkucHOQT8wke50MktxtmcWZr67kE17X/nAXFf62NIdMdgY6xfsaJD5Szoy84lnkuPWH+4tTNE3s2+bPCiw==", "dev": true }, "node_modules/emoji-regex": { @@ -1542,15 +1542,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -1594,6 +1585,29 @@ "xmlhttprequest-ssl": "~2.0.0" } }, + "node_modules/engine.io-client/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/engine.io-client/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/engine.io-client/node_modules/ws": { "version": "8.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", @@ -1624,6 +1638,29 @@ "node": ">=10.0.0" } }, + "node_modules/engine.io/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/engine.io/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/engine.io/node_modules/ws": { "version": "8.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", @@ -1646,10 +1683,13 @@ } }, "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", "dev": true, + "engines": { + "node": ">=0.12" + }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } @@ -1672,7 +1712,7 @@ "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" @@ -1687,8 +1727,7 @@ "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" + "optionator": "^0.8.1" }, "bin": { "escodegen": "bin/escodegen.js", @@ -1696,6 +1735,9 @@ }, "engines": { "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" } }, "node_modules/esprima": { @@ -1712,9 +1754,9 @@ } }, "node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -1751,9 +1793,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1769,7 +1811,7 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastq": { @@ -1811,61 +1853,10 @@ "node": ">= 0.8" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-cache-dir/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true, "funding": [ { @@ -1919,7 +1910,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/fsevents": { @@ -1943,12 +1934,12 @@ "dev": true }, "node_modules/generic-names": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-2.0.1.tgz", - "integrity": "sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-4.0.0.tgz", + "integrity": "sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==", "dev": true, "dependencies": { - "loader-utils": "^1.1.0" + "loader-utils": "^3.2.0" } }, "node_modules/get-caller-file": { @@ -2013,9 +2004,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "node_modules/has": { @@ -2042,13 +2033,22 @@ "node": ">=0.10.0" } }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/he": { @@ -2060,6 +2060,15 @@ "he": "bin/he" } }, + "node_modules/helpertypes": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/helpertypes/-/helpertypes-0.0.18.tgz", + "integrity": "sha512-XRhfbSEmR+poXUC5/8AbmYNJb2riOT6qPzjGJZr0S9YedHiaY+/tzPYzWMUclYMEdCYo/1l8PDYrQFCj02v97w==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/html-encoding-sniffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", @@ -2094,9 +2103,9 @@ } }, "node_modules/html-minifier-terser/node_modules/clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", "dev": true, "dependencies": { "source-map": "~0.6.0" @@ -2105,15 +2114,6 @@ "node": ">= 4.0" } }, - "node_modules/html-minifier-terser/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/html-minifier-terser/node_modules/terser": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", @@ -2190,20 +2190,66 @@ "node": ">= 6" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "ms": "2.1.2" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/iconv-lite": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", @@ -2218,7 +2264,7 @@ "node_modules/icss-replace-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "integrity": "sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==", "dev": true }, "node_modules/icss-utils": { @@ -2278,7 +2324,7 @@ "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { "once": "^1.3.0", @@ -2291,15 +2337,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2328,18 +2365,21 @@ } }, "node_modules/is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "dependencies": { "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2355,9 +2395,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" @@ -2369,7 +2409,7 @@ "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", "dev": true }, "node_modules/is-number": { @@ -2396,12 +2436,6 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, - "node_modules/is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, "node_modules/is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -2411,6 +2445,15 @@ "node": ">=4" } }, + "node_modules/isbot": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/isbot/-/isbot-3.4.5.tgz", + "integrity": "sha512-+KD6q1BBtw0iK9aGBGSfxJ31/ZgizKRjhm8ebgJUBMx0aeeQuIJ1I72beCoIrltIZGrSm4vmrxRxrG5n1aUTtw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/jest-worker": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", @@ -2425,15 +2468,6 @@ "node": ">= 10.13.0" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2498,18 +2532,6 @@ } } }, - "node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/jsonfile": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", @@ -2522,7 +2544,7 @@ "node_modules/levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "dependencies": { "prelude-ls": "~1.1.2", @@ -2533,9 +2555,9 @@ } }, "node_modules/lilconfig": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.3.tgz", - "integrity": "sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", "dev": true, "engines": { "node": ">=10" @@ -2548,17 +2570,12 @@ "dev": true }, "node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz", + "integrity": "sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==", "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, "engines": { - "node": ">=4.0.0" + "node": ">= 12.13.0" } }, "node_modules/localtunnel": { @@ -2629,18 +2646,6 @@ "node": ">=10" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -2650,7 +2655,7 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true }, "node_modules/lodash.isfinite": { @@ -2662,13 +2667,13 @@ "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, "node_modules/lower-case": { @@ -2680,19 +2685,28 @@ "tslib": "^2.0.3" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "semver": "^6.0.0-beta10" + "yallist": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + } + }, + "node_modules/magic-string": { + "version": "0.26.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.4.tgz", + "integrity": "sha512-e5uXtVJ22aEpK9u1+eQf0fSxHeqwyV19K+uGnlROCxUhzwRip9tBsaMViK/0vC3viyPd5Gtucp3UmEp/Q2cPTQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=12" } }, "node_modules/mdn-data": { @@ -2717,13 +2731,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" @@ -2771,12 +2785,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "node_modules/mitt": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.2.0.tgz", @@ -2790,9 +2798,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "dev": true, "peer": true, "bin": { @@ -2822,9 +2830,9 @@ } }, "node_modules/node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, "node_modules/normalize-path": { @@ -2849,9 +2857,9 @@ } }, "node_modules/nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "dependencies": { "boolbase": "^1.0.0" @@ -2861,9 +2869,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz", + "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", "dev": true }, "node_modules/object-assign": { @@ -2875,6 +2883,15 @@ "node": ">=0.10.0" } }, + "node_modules/object-path": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", + "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", + "dev": true, + "engines": { + "node": ">= 10.12.0" + } + }, "node_modules/on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -2890,7 +2907,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" @@ -2934,36 +2951,12 @@ "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-queue": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", @@ -2992,15 +2985,6 @@ "node": ">=8" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -3012,29 +2996,17 @@ } }, "node_modules/parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", + "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", "dev": true, "dependencies": { - "entities": "^4.3.0" + "entities": "^4.4.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/parse5/node_modules/entities": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", - "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -3054,19 +3026,10 @@ "tslib": "^2.0.3" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3087,10 +3050,16 @@ "node": ">=8" } }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -3126,47 +3095,53 @@ } }, "node_modules/postcss": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", - "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "version": "8.4.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", + "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], "peer": true, "dependencies": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", - "source-map-js": "^0.6.2" + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" }, "engines": { "node": "^10 || ^12 || >=14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" } }, "node_modules/postcss-calc": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.0.0.tgz", - "integrity": "sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.2" } }, "node_modules/postcss-colormin": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.0.tgz", - "integrity": "sha512-+HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", + "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", "dev": true, "dependencies": { "browserslist": "^4.16.6", "caniuse-api": "^3.0.0", - "colord": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3176,12 +3151,13 @@ } }, "node_modules/postcss-convert-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz", - "integrity": "sha512-C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz", + "integrity": "sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==", "dev": true, "dependencies": { - "postcss-value-parser": "^4.1.0" + "browserslist": "^4.20.3", + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3191,9 +3167,9 @@ } }, "node_modules/postcss-discard-comments": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz", - "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", + "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==", "dev": true, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3203,9 +3179,9 @@ } }, "node_modules/postcss-discard-duplicates": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz", - "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", "dev": true, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3215,9 +3191,9 @@ } }, "node_modules/postcss-discard-empty": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz", - "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", + "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==", "dev": true, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3227,9 +3203,9 @@ } }, "node_modules/postcss-discard-overridden": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz", - "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", "dev": true, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3239,13 +3215,12 @@ } }, "node_modules/postcss-load-config": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.0.tgz", - "integrity": "sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", "dev": true, "dependencies": { - "import-cwd": "^3.0.0", - "lilconfig": "^2.0.3", + "lilconfig": "^2.0.5", "yaml": "^1.10.2" }, "engines": { @@ -3256,23 +3231,26 @@ "url": "https://opencollective.com/postcss/" }, "peerDependencies": { + "postcss": ">=8.0.9", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { + "postcss": { + "optional": true + }, "ts-node": { "optional": true } } }, "node_modules/postcss-merge-longhand": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz", - "integrity": "sha512-BMlg9AXSI5G9TBT0Lo/H3PfUy63P84rVz3BjCFE9e9Y9RXQZD3+h3YO1kgTNsNJy7bBc1YQp8DmSnwLIW5VPcw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", + "integrity": "sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==", "dev": true, "dependencies": { - "css-color-names": "^1.0.1", - "postcss-value-parser": "^4.1.0", - "stylehacks": "^5.0.1" + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.1.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3282,16 +3260,15 @@ } }, "node_modules/postcss-merge-rules": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz", - "integrity": "sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz", + "integrity": "sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==", "dev": true, "dependencies": { "browserslist": "^4.16.6", "caniuse-api": "^3.0.0", - "cssnano-utils": "^2.0.1", - "postcss-selector-parser": "^6.0.5", - "vendors": "^1.0.3" + "cssnano-utils": "^3.1.0", + "postcss-selector-parser": "^6.0.5" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3301,12 +3278,12 @@ } }, "node_modules/postcss-minify-font-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz", - "integrity": "sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", + "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", "dev": true, "dependencies": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3316,14 +3293,14 @@ } }, "node_modules/postcss-minify-gradients": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz", - "integrity": "sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz", + "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==", "dev": true, "dependencies": { - "colord": "^2.6", - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "colord": "^2.9.1", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3333,16 +3310,14 @@ } }, "node_modules/postcss-minify-params": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz", - "integrity": "sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz", + "integrity": "sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==", "dev": true, "dependencies": { - "alphanum-sort": "^1.0.2", - "browserslist": "^4.16.0", - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0", - "uniqs": "^2.0.0" + "browserslist": "^4.16.6", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3352,12 +3327,11 @@ } }, "node_modules/postcss-minify-selectors": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz", - "integrity": "sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz", + "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==", "dev": true, "dependencies": { - "alphanum-sort": "^1.0.2", "postcss-selector-parser": "^6.0.5" }, "engines": { @@ -3368,12 +3342,12 @@ } }, "node_modules/postcss-modules": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.2.2.tgz", - "integrity": "sha512-/H08MGEmaalv/OU8j6bUKi/kZr2kqGF6huAW8m9UAgOLWtpFdhA14+gPBoymtqyv+D4MLsmqaF2zvIegdCxJXg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.1.tgz", + "integrity": "sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==", "dev": true, "dependencies": { - "generic-names": "^2.0.1", + "generic-names": "^4.0.0", "icss-replace-symbols": "^1.1.0", "lodash.camelcase": "^4.3.0", "postcss-modules-extract-imports": "^3.0.0", @@ -3446,9 +3420,9 @@ } }, "node_modules/postcss-normalize-charset": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz", - "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", "dev": true, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3458,13 +3432,12 @@ } }, "node_modules/postcss-normalize-display-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz", - "integrity": "sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", + "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", "dev": true, "dependencies": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3474,12 +3447,12 @@ } }, "node_modules/postcss-normalize-positions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz", - "integrity": "sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", + "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", "dev": true, "dependencies": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3489,13 +3462,12 @@ } }, "node_modules/postcss-normalize-repeat-style": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz", - "integrity": "sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", + "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", "dev": true, "dependencies": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3505,12 +3477,12 @@ } }, "node_modules/postcss-normalize-string": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz", - "integrity": "sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", + "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", "dev": true, "dependencies": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3520,13 +3492,12 @@ } }, "node_modules/postcss-normalize-timing-functions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz", - "integrity": "sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", + "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", "dev": true, "dependencies": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3536,13 +3507,13 @@ } }, "node_modules/postcss-normalize-unicode": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz", - "integrity": "sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz", + "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==", "dev": true, "dependencies": { - "browserslist": "^4.16.0", - "postcss-value-parser": "^4.1.0" + "browserslist": "^4.16.6", + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3552,14 +3523,13 @@ } }, "node_modules/postcss-normalize-url": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz", - "integrity": "sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", + "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", "dev": true, "dependencies": { - "is-absolute-url": "^3.0.3", "normalize-url": "^6.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3569,12 +3539,12 @@ } }, "node_modules/postcss-normalize-whitespace": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz", - "integrity": "sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz", + "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==", "dev": true, "dependencies": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3584,13 +3554,13 @@ } }, "node_modules/postcss-ordered-values": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz", - "integrity": "sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", + "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", "dev": true, "dependencies": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3600,12 +3570,12 @@ } }, "node_modules/postcss-reduce-initial": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz", - "integrity": "sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz", + "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==", "dev": true, "dependencies": { - "browserslist": "^4.16.0", + "browserslist": "^4.16.6", "caniuse-api": "^3.0.0" }, "engines": { @@ -3616,13 +3586,12 @@ } }, "node_modules/postcss-reduce-transforms": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz", - "integrity": "sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", + "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", "dev": true, "dependencies": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3632,9 +3601,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -3645,13 +3614,13 @@ } }, "node_modules/postcss-svgo": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.0.2.tgz", - "integrity": "sha512-YzQuFLZu3U3aheizD+B1joQ94vzPfE6BNUcSYuceNxlVnKKsOtdo6hL9/zyC168Q8EwfLSgaDSalsUGa9f2C0A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz", + "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", "dev": true, "dependencies": { - "postcss-value-parser": "^4.1.0", - "svgo": "^2.3.0" + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3661,14 +3630,12 @@ } }, "node_modules/postcss-unique-selectors": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz", - "integrity": "sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz", + "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==", "dev": true, "dependencies": { - "alphanum-sort": "^1.0.2", - "postcss-selector-parser": "^6.0.5", - "uniqs": "^2.0.0" + "postcss-selector-parser": "^6.0.5" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -3678,15 +3645,15 @@ } }, "node_modules/postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -3710,16 +3677,16 @@ "node_modules/promise.series": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz", - "integrity": "sha1-LMfr6Vn8OmYZwEq029yeRS2GS70=", + "integrity": "sha512-VWQJyU2bcDTgZw8kpfBpB/ejZASlCrzwz5f2hjb/zlujOEB4oeiAhHygAWq8ubsX2GVkD4kCU5V2dwOTaCY5EQ==", "dev": true, "engines": { "node": ">=0.12" } }, "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "node_modules/punycode": { @@ -3740,6 +3707,12 @@ "node": ">=0.6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3793,12 +3766,24 @@ "node": ">= 0.8" } }, - "node_modules/relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "engines": { + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "dev": true, + "engines": { "node": ">= 0.10" } }, @@ -3818,13 +3803,17 @@ "dev": true }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3852,15 +3841,6 @@ "node": ">= 0.8.0" } }, - "node_modules/resp-modifier/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -3913,58 +3893,6 @@ "postcss": "8.x" } }, - "node_modules/rollup-plugin-postcss/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/rollup-plugin-postcss/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/rollup-plugin-postcss/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/rollup-plugin-postcss/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", @@ -3980,26 +3908,72 @@ "rollup": "^2.0.0" } }, - "node_modules/rollup-plugin-typescript2": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.34.0.tgz", - "integrity": "sha512-dGtOz2kL6nQVgfIOmnA4Xh+5cFrs3bdu4jja/ej7WKR92RzOOixsn71LY5ZFFmKe1R677nUh+k2++NiY3un2PQ==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^4.1.2", - "find-cache-dir": "^3.3.2", - "fs-extra": "^10.0.0", + "node_modules/rollup-plugin-ts": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-ts/-/rollup-plugin-ts-3.0.2.tgz", + "integrity": "sha512-67qi2QTHewhLyKDG6fX3jpohWpmUPPIT/xJ7rsYK46X6MqmoWy64Ti0y8ygPfLv8mXDCdRZUofM3mTxDfCswRA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^4.2.1", + "@wessberg/stringutil": "^1.0.19", + "ansi-colors": "^4.1.3", + "browserslist": "^4.20.4", + "browserslist-generator": "^1.0.66", + "compatfactory": "^1.0.1", + "crosspath": "^2.0.0", + "magic-string": "^0.26.2", + "ts-clone-node": "^1.0.0", "tslib": "^2.4.0" }, + "engines": { + "node": ">=14.9.0", + "npm": ">=7.0.0", + "pnpm": ">=3.2.0", + "yarn": ">=1.13" + }, + "funding": { + "type": "github", + "url": "https://github.com/wessberg/rollup-plugin-ts?sponsor=1" + }, "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" + "@babel/core": ">=6.x || >=7.x", + "@babel/plugin-transform-runtime": ">=6.x || >=7.x", + "@babel/preset-env": ">=6.x || >=7.x", + "@babel/preset-typescript": ">=6.x || >=7.x", + "@babel/runtime": ">=6.x || >=7.x", + "@swc/core": ">=1.x", + "@swc/helpers": ">=0.2", + "rollup": ">=1.x || >=2.x", + "typescript": ">=3.2.x || >= 4.x" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@babel/plugin-transform-runtime": { + "optional": true + }, + "@babel/preset-env": { + "optional": true + }, + "@babel/preset-typescript": { + "optional": true + }, + "@babel/runtime": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "@swc/helpers": { + "optional": true + } } }, - "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", - "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", + "node_modules/rollup-plugin-ts/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", "dev": true, "dependencies": { "estree-walker": "^2.0.1", @@ -4009,47 +3983,12 @@ "node": ">= 8.0.0" } }, - "node_modules/rollup-plugin-typescript2/node_modules/estree-walker": { + "node_modules/rollup-plugin-ts/node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, - "node_modules/rollup-plugin-typescript2/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -4110,7 +4049,21 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/safe-identifier": { "version": "0.4.2", @@ -4142,9 +4095,9 @@ } }, "node_modules/sass/node_modules/immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", "dev": true }, "node_modules/saxes": { @@ -4160,12 +4113,18 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/send": { @@ -4192,15 +4151,6 @@ "node": ">= 0.8.0" } }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/send/node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -4273,15 +4223,6 @@ "node": ">= 0.8.0" } }, - "node_modules/serve-index/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/serve-index/node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -4370,9 +4311,9 @@ } }, "node_modules/socket.io": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.1.tgz", - "integrity": "sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", + "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", "dev": true, "dependencies": { "accepts": "~1.3.4", @@ -4380,7 +4321,7 @@ "debug": "~4.3.2", "engine.io": "~6.2.0", "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.0.4" + "socket.io-parser": "~4.2.0" }, "engines": { "node": ">=10.0.0" @@ -4393,9 +4334,9 @@ "dev": true }, "node_modules/socket.io-client": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.1.tgz", - "integrity": "sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.2.tgz", + "integrity": "sha512-naqYfFu7CLDiQ1B7AlLhRXKX3gdeaIMfgigwavDzgJoIUYulc1qHH5+2XflTsXTPY7BlPH5rppJyUjhjrKQKLg==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", @@ -4407,7 +4348,30 @@ "node": ">=10.0.0" } }, - "node_modules/socket.io-client/node_modules/socket.io-parser": { + "node_modules/socket.io-client/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io-client/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/socket.io-parser": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", @@ -4420,20 +4384,52 @@ "node": ">=10.0.0" } }, - "node_modules/socket.io-parser": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", - "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", + "node_modules/socket.io-parser/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "@types/component-emitter": "^1.2.10", - "component-emitter": "~1.3.0", - "debug": "~4.3.1" + "ms": "2.1.2" }, "engines": { - "node": ">=10.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io-parser/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/socket.io/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/socket.io/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4444,24 +4440,30 @@ } }, "node_modules/source-map-js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, "node_modules/spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -4472,6 +4474,7 @@ "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", "dev": true }, "node_modules/statuses": { @@ -4499,10 +4502,16 @@ "node": ">= 0.10.0" } }, + "node_modules/stream-throttle/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/string-hash": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", + "integrity": "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==", "dev": true }, "node_modules/string-width": { @@ -4519,16 +4528,7 @@ "node": ">=8" } }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { + "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -4540,18 +4540,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/style-inject": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz", @@ -4559,12 +4547,12 @@ "dev": true }, "node_modules/stylehacks": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.1.tgz", - "integrity": "sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", + "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==", "dev": true, "dependencies": { - "browserslist": "^4.16.0", + "browserslist": "^4.16.6", "postcss-selector-parser": "^6.0.4" }, "engines": { @@ -4575,26 +4563,44 @@ } }, "node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/svgo": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.6.0.tgz", - "integrity": "sha512-ATpRmynNSjP/5hSM4Ij4Pg3L+BCN6IBES7wRLh1ZtVxJB7Xn8omiGttLW6v6ZbqrV5pCVB3XfdbUoY8IpgIwvw==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", "dev": true, "dependencies": { "@trysound/sax": "0.2.0", - "colorette": "^1.3.0", "commander": "^7.2.0", "css-select": "^4.1.3", "css-tree": "^1.1.3", "csso": "^4.2.0", + "picocolors": "^1.0.0", "stable": "^0.1.8" }, "bin": { @@ -4646,6 +4652,12 @@ "node": ">=10" } }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/tfunk": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-4.0.0.tgz", @@ -4656,11 +4668,60 @@ "dlv": "^1.1.3" } }, - "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true + "node_modules/tfunk/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tfunk/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tfunk/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tfunk/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tfunk/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -4684,19 +4745,29 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" } }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/tr46": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", @@ -4718,6 +4789,25 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-clone-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ts-clone-node/-/ts-clone-node-1.0.0.tgz", + "integrity": "sha512-/cDYbr2HAXxFNeTT41c/xs/2bhLJjqnYheHsmA3AoHSt+n4JA4t0FL9Lk5O8kWnJ6jeB3kPcUoXIFtwERNzv6Q==", + "dev": true, + "dependencies": { + "compatfactory": "^1.0.1" + }, + "engines": { + "node": ">=14.9.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/wessberg/ts-clone-node?sponsor=1" + }, + "peerDependencies": { + "typescript": "^3.x || ^4.x" + } + }, "node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -4727,7 +4817,7 @@ "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "dependencies": { "prelude-ls": "~1.1.2" @@ -4768,12 +4858,6 @@ "node": "*" } }, - "node_modules/uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -4792,10 +4876,46 @@ "node": ">= 0.8" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "node_modules/utils-merge": { @@ -4816,16 +4936,6 @@ "node": ">= 0.8" } }, - "node_modules/vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -4928,52 +5038,16 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "dev": true, "engines": { "node": ">=10.0.0" @@ -5024,6 +5098,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -5063,27 +5143,27 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" } }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true }, "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -5120,7 +5200,13 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, "supports-color": { @@ -5183,6 +5269,12 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@mdn/browser-compat-data": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz", + "integrity": "sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==", + "dev": true + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -5216,9 +5308,9 @@ "dev": true }, "@rollup/plugin-node-resolve": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", - "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", + "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -5227,27 +5319,6 @@ "is-builtin-module": "^3.1.0", "is-module": "^1.0.0", "resolve": "^1.19.0" - }, - "dependencies": { - "@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "requires": { - "@types/node": "*" - } - } - } - }, - "@rollup/plugin-typescript": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.5.0.tgz", - "integrity": "sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" } }, "@rollup/pluginutils": { @@ -5279,12 +5350,6 @@ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true }, - "@types/component-emitter": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", - "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", - "dev": true - }, "@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -5304,9 +5369,42 @@ "dev": true }, "@types/node": { - "version": "18.7.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.18.tgz", - "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", + "version": "18.7.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", + "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", + "dev": true + }, + "@types/object-path": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.1.tgz", + "integrity": "sha512-219LSCO9HPcoXcRTC6DbCs0FRhZgBnEMzf16RRqkT40WbkKx3mOeQuz3e2XqbfhOz/AHfbru0kzB1n1RCAsIIg==", + "dev": true + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/semver": { + "version": "7.3.12", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.12.tgz", + "integrity": "sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==", + "dev": true + }, + "@types/ua-parser-js": { + "version": "0.7.36", + "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz", + "integrity": "sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==", + "dev": true + }, + "@wessberg/stringutil": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/@wessberg/stringutil/-/stringutil-1.0.19.tgz", + "integrity": "sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==", "dev": true }, "abab": { @@ -5362,25 +5460,45 @@ "dev": true, "requires": { "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } }, "anymatch": { "version": "3.1.2", @@ -5416,7 +5534,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "axios": { @@ -5429,9 +5547,9 @@ } }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base64id": { @@ -5446,22 +5564,16 @@ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", "dev": true }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, "bootstrap": { @@ -5562,16 +5674,48 @@ } }, "browserslist": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", - "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001254", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.830", - "escalade": "^3.1.1", - "node-releases": "^1.1.75" + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "browserslist-generator": { + "version": "1.0.66", + "resolved": "https://registry.npmjs.org/browserslist-generator/-/browserslist-generator-1.0.66.tgz", + "integrity": "sha512-aFDax4Qzh29DdyhHQBD2Yu2L5OvaDnvYFMbmpLrLwwaNK4H6dHEhC/Nxv93/+mfAA+a/t94ln0P2JZvHO6LZDA==", + "dev": true, + "requires": { + "@mdn/browser-compat-data": "^4.1.16", + "@types/object-path": "^0.11.1", + "@types/semver": "^7.3.9", + "@types/ua-parser-js": "^0.7.36", + "browserslist": "4.20.2", + "caniuse-lite": "^1.0.30001328", + "isbot": "3.4.5", + "object-path": "^0.11.8", + "semver": "^7.3.7", + "ua-parser-js": "^1.0.2" + }, + "dependencies": { + "browserslist": { + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", + "escalade": "^3.1.1", + "node-releases": "^2.0.2", + "picocolors": "^1.0.0" + } + } } }, "bs-recipes": { @@ -5627,22 +5771,30 @@ } }, "caniuse-lite": { - "version": "1.0.30001376", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001376.tgz", - "integrity": "sha512-I27WhtOQ3X3v3it9gNs/oTpoE5KpwmqKR5oKPA8M0G7uMXh9Ty81Q904HpKUrM30ei7zfcL5jE7AXefgbOfMig==", + "version": "1.0.30001412", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", + "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", "dev": true }, "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "chokidar": { @@ -5659,17 +5811,6 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" - }, - "dependencies": { - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - } } }, "clean-css": { @@ -5690,23 +5831,6 @@ "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } } }, "color-convert": { @@ -5725,15 +5849,9 @@ "dev": true }, "colord": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.7.0.tgz", - "integrity": "sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q==", - "dev": true - }, - "colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", "dev": true }, "combined-stream": { @@ -5746,27 +5864,24 @@ } }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true }, - "commondir": { + "compatfactory": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true + "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-1.0.1.tgz", + "integrity": "sha512-hR9u0HSZTKDNNchPtMHg6myeNx0XO+av7UZIJPsi4rPALJBHi/W5Mbwi19hC/xm6y3JkYpxVYjTqnSGsU5X/iw==", + "dev": true, + "requires": { + "helpertypes": "^0.0.18" + } }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "concat-with-sourcemaps": { @@ -5795,59 +5910,14 @@ "yargs": "^17.3.1" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "rxjs": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", - "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "requires": { "tslib": "^2.1.0" } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, @@ -5861,17 +5931,6 @@ "finalhandler": "1.1.0", "parseurl": "~1.3.2", "utils-merge": "1.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } } }, "connect-history-api-fallback": { @@ -5896,32 +5955,41 @@ "vary": "^1" } }, - "css-color-names": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-1.0.1.tgz", - "integrity": "sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA==", - "dev": true - }, - "css-declaration-sorter": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.3.tgz", - "integrity": "sha512-SvjQjNRZgh4ULK1LDJ2AduPKUKxIqmtU7ZAyi47BTV+M90Qvxr9AB6lKlLbDUfXqI9IQeYA8LbAsCZPpJEV3aA==", + "crosspath": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crosspath/-/crosspath-2.0.0.tgz", + "integrity": "sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==", "dev": true, "requires": { - "timsort": "^0.3.0" + "@types/node": "^17.0.36" + }, + "dependencies": { + "@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + } } }, + "css-declaration-sorter": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", + "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==", + "dev": true, + "requires": {} + }, "css-select": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", - "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" } }, "css-tree": { @@ -5935,9 +6003,9 @@ } }, "css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true }, "cssesc": { @@ -5947,58 +6015,57 @@ "dev": true }, "cssnano": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.0.8.tgz", - "integrity": "sha512-Lda7geZU0Yu+RZi2SGpjYuQz4HI4/1Y+BhdD0jL7NXAQ5larCzVn+PUGuZbDMYz904AXXCOgO5L1teSvgu7aFg==", + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.13.tgz", + "integrity": "sha512-S2SL2ekdEz6w6a2epXn4CmMKU4K3KpcyXLKfAYc9UQQqJRkD/2eLUG0vJ3Db/9OvO5GuAdgXw3pFbR6abqghDQ==", "dev": true, "requires": { - "cssnano-preset-default": "^5.1.4", - "is-resolvable": "^1.1.0", + "cssnano-preset-default": "^5.2.12", "lilconfig": "^2.0.3", "yaml": "^1.10.2" } }, "cssnano-preset-default": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz", - "integrity": "sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ==", - "dev": true, - "requires": { - "css-declaration-sorter": "^6.0.3", - "cssnano-utils": "^2.0.1", - "postcss-calc": "^8.0.0", - "postcss-colormin": "^5.2.0", - "postcss-convert-values": "^5.0.1", - "postcss-discard-comments": "^5.0.1", - "postcss-discard-duplicates": "^5.0.1", - "postcss-discard-empty": "^5.0.1", - "postcss-discard-overridden": "^5.0.1", - "postcss-merge-longhand": "^5.0.2", - "postcss-merge-rules": "^5.0.2", - "postcss-minify-font-values": "^5.0.1", - "postcss-minify-gradients": "^5.0.2", - "postcss-minify-params": "^5.0.1", - "postcss-minify-selectors": "^5.1.0", - "postcss-normalize-charset": "^5.0.1", - "postcss-normalize-display-values": "^5.0.1", - "postcss-normalize-positions": "^5.0.1", - "postcss-normalize-repeat-style": "^5.0.1", - "postcss-normalize-string": "^5.0.1", - "postcss-normalize-timing-functions": "^5.0.1", - "postcss-normalize-unicode": "^5.0.1", - "postcss-normalize-url": "^5.0.2", - "postcss-normalize-whitespace": "^5.0.1", - "postcss-ordered-values": "^5.0.2", - "postcss-reduce-initial": "^5.0.1", - "postcss-reduce-transforms": "^5.0.1", - "postcss-svgo": "^5.0.2", - "postcss-unique-selectors": "^5.0.1" + "version": "5.2.12", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz", + "integrity": "sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==", + "dev": true, + "requires": { + "css-declaration-sorter": "^6.3.0", + "cssnano-utils": "^3.1.0", + "postcss-calc": "^8.2.3", + "postcss-colormin": "^5.3.0", + "postcss-convert-values": "^5.1.2", + "postcss-discard-comments": "^5.1.2", + "postcss-discard-duplicates": "^5.1.0", + "postcss-discard-empty": "^5.1.1", + "postcss-discard-overridden": "^5.1.0", + "postcss-merge-longhand": "^5.1.6", + "postcss-merge-rules": "^5.1.2", + "postcss-minify-font-values": "^5.1.0", + "postcss-minify-gradients": "^5.1.1", + "postcss-minify-params": "^5.1.3", + "postcss-minify-selectors": "^5.2.1", + "postcss-normalize-charset": "^5.1.0", + "postcss-normalize-display-values": "^5.1.0", + "postcss-normalize-positions": "^5.1.1", + "postcss-normalize-repeat-style": "^5.1.1", + "postcss-normalize-string": "^5.1.0", + "postcss-normalize-timing-functions": "^5.1.0", + "postcss-normalize-unicode": "^5.1.0", + "postcss-normalize-url": "^5.1.0", + "postcss-normalize-whitespace": "^5.1.1", + "postcss-ordered-values": "^5.1.3", + "postcss-reduce-initial": "^5.1.0", + "postcss-reduce-transforms": "^5.1.0", + "postcss-svgo": "^5.1.0", + "postcss-unique-selectors": "^5.1.1" } }, "cssnano-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz", - "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", "dev": true, "requires": {} }, @@ -6046,38 +6113,30 @@ } }, "date-fns": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz", - "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==", + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", + "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", "dev": true }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "ms": "2.0.0" } }, "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.1.tgz", + "integrity": "sha512-F29o+vci4DodHYT9UrR5IEbfBw9pE5eSapIJdTqXK5+6hq+t8VRxwQyKlW2i+KDKFkkJQRvFyI/QXD83h8LyQw==", "dev": true }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "deepmerge": { @@ -6089,7 +6148,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, "depd": { @@ -6126,20 +6185,28 @@ "dev": true }, "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", "dev": true, "requires": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" + }, + "dependencies": { + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + } } }, "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true }, "domexception": { @@ -6152,9 +6219,9 @@ } }, "domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "dev": true, "requires": { "domelementtype": "^2.2.0" @@ -6212,9 +6279,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.839", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.839.tgz", - "integrity": "sha512-0O7uPs9LJNjQ/U5mW78qW8gXv9H6Ba3DHZ5/yt8aBsvomOWDkV3MddT7enUYvLQEUVOURjWmgJJWVZ3K98tIwQ==", + "version": "1.4.264", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.264.tgz", + "integrity": "sha512-AZ6ZRkucHOQT8wke50MktxtmcWZr67kE17X/nAXFf62NIdMdgY6xfsaJD5Szoy84lnkuPWH+4tTNE3s2+bPCiw==", "dev": true }, "emoji-regex": { @@ -6223,12 +6290,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -6253,6 +6314,21 @@ "ws": "~8.2.3" }, "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "ws": { "version": "8.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", @@ -6275,6 +6351,21 @@ "xmlhttprequest-ssl": "~2.0.0" }, "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "ws": { "version": "8.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", @@ -6291,9 +6382,9 @@ "dev": true }, "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", "dev": true }, "escalade": { @@ -6311,7 +6402,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true }, "escodegen": { @@ -6334,9 +6425,9 @@ "dev": true }, "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "estree-walker": { @@ -6364,9 +6455,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -6379,7 +6470,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "fastq": { @@ -6413,55 +6504,12 @@ "parseurl": "~1.3.2", "statuses": "~1.3.1", "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "dependencies": { - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" } }, "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, "form-data": { @@ -6495,7 +6543,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "fsevents": { @@ -6512,12 +6560,12 @@ "dev": true }, "generic-names": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-2.0.1.tgz", - "integrity": "sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-4.0.0.tgz", + "integrity": "sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==", "dev": true, "requires": { - "loader-utils": "^1.1.0" + "loader-utils": "^3.2.0" } }, "get-caller-file": { @@ -6564,9 +6612,9 @@ } }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "has": { @@ -6585,12 +6633,20 @@ "dev": true, "requires": { "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + } } }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "he": { @@ -6599,6 +6655,12 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "helpertypes": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/helpertypes/-/helpertypes-0.0.18.tgz", + "integrity": "sha512-XRhfbSEmR+poXUC5/8AbmYNJb2riOT6qPzjGJZr0S9YedHiaY+/tzPYzWMUclYMEdCYo/1l8PDYrQFCj02v97w==", + "dev": true + }, "html-encoding-sniffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", @@ -6624,20 +6686,14 @@ }, "dependencies": { "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", "dev": true, "requires": { "source-map": "~0.6.0" } }, - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true - }, "terser": { "version": "4.8.1", "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", @@ -6700,6 +6756,23 @@ "@tootallnate/once": "2", "agent-base": "6", "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "https-proxy-agent": { @@ -6710,6 +6783,23 @@ "requires": { "agent-base": "6", "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "iconv-lite": { @@ -6724,7 +6814,7 @@ "icss-replace-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "integrity": "sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==", "dev": true }, "icss-utils": { @@ -6767,7 +6857,7 @@ "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -6780,12 +6870,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", - "dev": true - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -6805,9 +6889,9 @@ } }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "requires": { "has": "^1.0.3" @@ -6816,7 +6900,7 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { @@ -6826,9 +6910,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -6837,7 +6921,7 @@ "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", "dev": true }, "is-number": { @@ -6861,18 +6945,18 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", "dev": true }, + "isbot": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/isbot/-/isbot-3.4.5.tgz", + "integrity": "sha512-+KD6q1BBtw0iK9aGBGSfxJ31/ZgizKRjhm8ebgJUBMx0aeeQuIJ1I72beCoIrltIZGrSm4vmrxRxrG5n1aUTtw==", + "dev": true + }, "jest-worker": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", @@ -6884,12 +6968,6 @@ "supports-color": "^7.0.0" }, "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6942,15 +7020,6 @@ "xml-name-validator": "^4.0.0" } }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, "jsonfile": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", @@ -6963,7 +7032,7 @@ "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "requires": { "prelude-ls": "~1.1.2", @@ -6971,9 +7040,9 @@ } }, "lilconfig": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.3.tgz", - "integrity": "sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", "dev": true }, "limiter": { @@ -6983,15 +7052,10 @@ "dev": true }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz", + "integrity": "sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==", + "dev": true }, "localtunnel": { "version": "2.0.2", @@ -7043,15 +7107,6 @@ } } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -7061,7 +7116,7 @@ "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true }, "lodash.isfinite": { @@ -7073,13 +7128,13 @@ "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, "lower-case": { @@ -7091,13 +7146,22 @@ "tslib": "^2.0.3" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "magic-string": { + "version": "0.26.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.4.tgz", + "integrity": "sha512-e5uXtVJ22aEpK9u1+eQf0fSxHeqwyV19K+uGnlROCxUhzwRip9tBsaMViK/0vC3viyPd5Gtucp3UmEp/Q2cPTQ==", "dev": true, "requires": { - "semver": "^6.0.0-beta10" + "sourcemap-codec": "^1.4.8" } }, "mdn-data": { @@ -7119,13 +7183,13 @@ "dev": true }, "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "mime": { @@ -7158,12 +7222,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "mitt": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.2.0.tgz", @@ -7177,9 +7235,9 @@ "dev": true }, "nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "dev": true, "peer": true }, @@ -7200,9 +7258,9 @@ } }, "node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, "normalize-path": { @@ -7218,18 +7276,18 @@ "dev": true }, "nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "requires": { "boolbase": "^1.0.0" } }, "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz", + "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", "dev": true }, "object-assign": { @@ -7238,6 +7296,12 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true }, + "object-path": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", + "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", + "dev": true + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -7250,7 +7314,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -7288,27 +7352,9 @@ "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", "dev": true }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, "p-queue": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", @@ -7328,12 +7374,6 @@ "p-finally": "^1.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -7345,20 +7385,12 @@ } }, "parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", + "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", "dev": true, "requires": { - "entities": "^4.3.0" - }, - "dependencies": { - "entities": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", - "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", - "dev": true - } + "entities": "^4.4.0" } }, "parseurl": { @@ -7377,16 +7409,10 @@ "tslib": "^2.0.3" } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-parse": { @@ -7401,10 +7427,16 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pify": { @@ -7424,161 +7456,156 @@ } }, "postcss": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", - "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "version": "8.4.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", + "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", "dev": true, "peer": true, "requires": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", - "source-map-js": "^0.6.2" + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" } }, "postcss-calc": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.0.0.tgz", - "integrity": "sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", "dev": true, "requires": { - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" } }, "postcss-colormin": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.0.tgz", - "integrity": "sha512-+HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", + "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", "dev": true, "requires": { "browserslist": "^4.16.6", "caniuse-api": "^3.0.0", - "colord": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" } }, "postcss-convert-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz", - "integrity": "sha512-C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz", + "integrity": "sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "browserslist": "^4.20.3", + "postcss-value-parser": "^4.2.0" } }, "postcss-discard-comments": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz", - "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", + "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==", "dev": true, "requires": {} }, "postcss-discard-duplicates": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz", - "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", "dev": true, "requires": {} }, "postcss-discard-empty": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz", - "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", + "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==", "dev": true, "requires": {} }, "postcss-discard-overridden": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz", - "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", "dev": true, "requires": {} }, "postcss-load-config": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.0.tgz", - "integrity": "sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", "dev": true, "requires": { - "import-cwd": "^3.0.0", - "lilconfig": "^2.0.3", + "lilconfig": "^2.0.5", "yaml": "^1.10.2" } }, "postcss-merge-longhand": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz", - "integrity": "sha512-BMlg9AXSI5G9TBT0Lo/H3PfUy63P84rVz3BjCFE9e9Y9RXQZD3+h3YO1kgTNsNJy7bBc1YQp8DmSnwLIW5VPcw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", + "integrity": "sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==", "dev": true, "requires": { - "css-color-names": "^1.0.1", - "postcss-value-parser": "^4.1.0", - "stylehacks": "^5.0.1" + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.1.0" } }, "postcss-merge-rules": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz", - "integrity": "sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz", + "integrity": "sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==", "dev": true, "requires": { "browserslist": "^4.16.6", "caniuse-api": "^3.0.0", - "cssnano-utils": "^2.0.1", - "postcss-selector-parser": "^6.0.5", - "vendors": "^1.0.3" + "cssnano-utils": "^3.1.0", + "postcss-selector-parser": "^6.0.5" } }, "postcss-minify-font-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz", - "integrity": "sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", + "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-minify-gradients": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz", - "integrity": "sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz", + "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==", "dev": true, "requires": { - "colord": "^2.6", - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "colord": "^2.9.1", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" } }, "postcss-minify-params": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz", - "integrity": "sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz", + "integrity": "sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==", "dev": true, "requires": { - "alphanum-sort": "^1.0.2", - "browserslist": "^4.16.0", - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0", - "uniqs": "^2.0.0" + "browserslist": "^4.16.6", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" } }, "postcss-minify-selectors": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz", - "integrity": "sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz", + "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==", "dev": true, "requires": { - "alphanum-sort": "^1.0.2", "postcss-selector-parser": "^6.0.5" } }, "postcss-modules": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.2.2.tgz", - "integrity": "sha512-/H08MGEmaalv/OU8j6bUKi/kZr2kqGF6huAW8m9UAgOLWtpFdhA14+gPBoymtqyv+D4MLsmqaF2zvIegdCxJXg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.3.1.tgz", + "integrity": "sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==", "dev": true, "requires": { - "generic-names": "^2.0.1", + "generic-names": "^4.0.0", "icss-replace-symbols": "^1.1.0", "lodash.camelcase": "^4.3.0", "postcss-modules-extract-imports": "^3.0.0", @@ -7625,124 +7652,119 @@ } }, "postcss-normalize-charset": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz", - "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", "dev": true, "requires": {} }, "postcss-normalize-display-values": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz", - "integrity": "sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", + "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-positions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz", - "integrity": "sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", + "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-repeat-style": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz", - "integrity": "sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", + "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-string": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz", - "integrity": "sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", + "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-timing-functions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz", - "integrity": "sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", + "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-unicode": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz", - "integrity": "sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz", + "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==", "dev": true, "requires": { - "browserslist": "^4.16.0", - "postcss-value-parser": "^4.1.0" + "browserslist": "^4.16.6", + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-url": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz", - "integrity": "sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", + "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", "dev": true, "requires": { - "is-absolute-url": "^3.0.3", "normalize-url": "^6.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-whitespace": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz", - "integrity": "sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz", + "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-ordered-values": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz", - "integrity": "sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", + "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" } }, "postcss-reduce-initial": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz", - "integrity": "sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz", + "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==", "dev": true, "requires": { - "browserslist": "^4.16.0", + "browserslist": "^4.16.6", "caniuse-api": "^3.0.0" } }, "postcss-reduce-transforms": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz", - "integrity": "sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", + "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", "dev": true, "requires": { - "cssnano-utils": "^2.0.1", - "postcss-value-parser": "^4.1.0" + "postcss-value-parser": "^4.2.0" } }, "postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", "dev": true, "requires": { "cssesc": "^3.0.0", @@ -7750,36 +7772,34 @@ } }, "postcss-svgo": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.0.2.tgz", - "integrity": "sha512-YzQuFLZu3U3aheizD+B1joQ94vzPfE6BNUcSYuceNxlVnKKsOtdo6hL9/zyC168Q8EwfLSgaDSalsUGa9f2C0A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz", + "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", "dev": true, "requires": { - "postcss-value-parser": "^4.1.0", - "svgo": "^2.3.0" + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" } }, "postcss-unique-selectors": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz", - "integrity": "sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz", + "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==", "dev": true, "requires": { - "alphanum-sort": "^1.0.2", - "postcss-selector-parser": "^6.0.5", - "uniqs": "^2.0.0" + "postcss-selector-parser": "^6.0.5" } }, "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true }, "prettier": { @@ -7791,13 +7811,13 @@ "promise.series": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz", - "integrity": "sha1-LMfr6Vn8OmYZwEq029yeRS2GS70=", + "integrity": "sha512-VWQJyU2bcDTgZw8kpfBpB/ejZASlCrzwz5f2hjb/zlujOEB4oeiAhHygAWq8ubsX2GVkD4kCU5V2dwOTaCY5EQ==", "dev": true }, "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "punycode": { @@ -7812,6 +7832,12 @@ "integrity": "sha512-AY4g8t3LMboim0t6XWFdz6J5OuJ1ZNYu54SXihS/OMpgyCqYmcAJnWqkNSOjSjWmq3xxy+GF9uWQI2lI/7tKIA==", "dev": true }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7845,10 +7871,19 @@ "unpipe": "1.0.0" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", "dev": true }, "require-directory": { @@ -7864,13 +7899,14 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -7887,17 +7923,6 @@ "requires": { "debug": "^2.2.0", "minimatch": "^3.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } } }, "reusify": { @@ -7934,42 +7959,6 @@ "rollup-pluginutils": "^2.8.2", "safe-identifier": "^0.4.2", "style-inject": "^0.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "rollup-plugin-terser": { @@ -7984,22 +7973,28 @@ "terser": "^5.0.0" } }, - "rollup-plugin-typescript2": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.34.0.tgz", - "integrity": "sha512-dGtOz2kL6nQVgfIOmnA4Xh+5cFrs3bdu4jja/ej7WKR92RzOOixsn71LY5ZFFmKe1R677nUh+k2++NiY3un2PQ==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^4.1.2", - "find-cache-dir": "^3.3.2", - "fs-extra": "^10.0.0", + "rollup-plugin-ts": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-ts/-/rollup-plugin-ts-3.0.2.tgz", + "integrity": "sha512-67qi2QTHewhLyKDG6fX3jpohWpmUPPIT/xJ7rsYK46X6MqmoWy64Ti0y8ygPfLv8mXDCdRZUofM3mTxDfCswRA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^4.2.1", + "@wessberg/stringutil": "^1.0.19", + "ansi-colors": "^4.1.3", + "browserslist": "^4.20.4", + "browserslist-generator": "^1.0.66", + "compatfactory": "^1.0.1", + "crosspath": "^2.0.0", + "magic-string": "^0.26.2", + "ts-clone-node": "^1.0.0", "tslib": "^2.4.0" }, "dependencies": { "@rollup/pluginutils": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", - "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", "dev": true, "requires": { "estree-walker": "^2.0.1", @@ -8011,33 +8006,6 @@ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true - }, - "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true } } }, @@ -8112,9 +8080,9 @@ }, "dependencies": { "immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", "dev": true } } @@ -8129,10 +8097,13 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "send": { "version": "0.16.2", @@ -8155,15 +8126,6 @@ "statuses": "~1.4.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -8226,15 +8188,6 @@ "parseurl": "~1.3.2" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -8310,9 +8263,9 @@ "dev": true }, "socket.io": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.1.tgz", - "integrity": "sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", + "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", "dev": true, "requires": { "accepts": "~1.3.4", @@ -8320,7 +8273,24 @@ "debug": "~4.3.2", "engine.io": "~6.2.0", "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.0.4" + "socket.io-parser": "~4.2.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "socket.io-adapter": { @@ -8330,9 +8300,9 @@ "dev": true }, "socket.io-client": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.1.tgz", - "integrity": "sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.2.tgz", + "integrity": "sha512-naqYfFu7CLDiQ1B7AlLhRXKX3gdeaIMfgigwavDzgJoIUYulc1qHH5+2XflTsXTPY7BlPH5rppJyUjhjrKQKLg==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", @@ -8341,27 +8311,48 @@ "socket.io-parser": "~4.2.0" }, "dependencies": { - "socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" + "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, "socket.io-parser": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", - "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", + "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", "dev": true, "requires": { - "@types/component-emitter": "^1.2.10", - "component-emitter": "~1.3.0", + "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "source-map": { @@ -8371,21 +8362,27 @@ "dev": true }, "source-map-js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true }, "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, "spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -8412,12 +8409,20 @@ "requires": { "commander": "^2.2.0", "limiter": "^1.0.5" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "string-hash": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", + "integrity": "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==", "dev": true }, "string-width": { @@ -8429,32 +8434,15 @@ "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^5.0.1" } }, "style-inject": { @@ -8464,33 +8452,42 @@ "dev": true }, "stylehacks": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.1.tgz", - "integrity": "sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", + "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==", "dev": true, "requires": { - "browserslist": "^4.16.0", + "browserslist": "^4.16.6", "postcss-selector-parser": "^6.0.4" } }, "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, "svgo": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.6.0.tgz", - "integrity": "sha512-ATpRmynNSjP/5hSM4Ij4Pg3L+BCN6IBES7wRLh1ZtVxJB7Xn8omiGttLW6v6ZbqrV5pCVB3XfdbUoY8IpgIwvw==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", "dev": true, "requires": { "@trysound/sax": "0.2.0", - "colorette": "^1.3.0", "commander": "^7.2.0", "css-select": "^4.1.3", "css-tree": "^1.1.3", "csso": "^4.2.0", + "picocolors": "^1.0.0", "stable": "^0.1.8" }, "dependencies": { @@ -8524,6 +8521,14 @@ "acorn": "^8.5.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "tfunk": { @@ -8534,14 +8539,50 @@ "requires": { "chalk": "^1.1.3", "dlv": "^1.1.3" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + } } }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8558,14 +8599,23 @@ "dev": true }, "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + } } }, "tr46": { @@ -8583,6 +8633,15 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "ts-clone-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ts-clone-node/-/ts-clone-node-1.0.0.tgz", + "integrity": "sha512-/cDYbr2HAXxFNeTT41c/xs/2bhLJjqnYheHsmA3AoHSt+n4JA4t0FL9Lk5O8kWnJ6jeB3kPcUoXIFtwERNzv6Q==", + "dev": true, + "requires": { + "compatfactory": "^1.0.1" + } + }, "tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -8592,7 +8651,7 @@ "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "requires": { "prelude-ls": "~1.1.2" @@ -8610,12 +8669,6 @@ "integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==", "dev": true }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -8628,10 +8681,30 @@ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true }, + "update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "utils-merge": { @@ -8646,12 +8719,6 @@ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true - }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -8727,44 +8794,18 @@ "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "dev": true, "requires": {} }, @@ -8792,6 +8833,12 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", diff --git a/package.json b/package.json index 9485b6b1b..548b394bb 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "Jonathan Peterson" }, "name": "@eonasdan/tempus-dominus", - "version": "6.1.2", + "version": "6.1.3", "style": "dist/css/tempus-dominus.css", "sass": "scss/tempus-dominus.scss", "main": "dist/js/tempus-dominus.js", @@ -39,9 +39,8 @@ "description": "A robust and powerful date/time picker component. For usage, installation and demos see Project Site on GitHub", "devDependencies": { "@popperjs/core": "^2.11.6", - "@rollup/plugin-node-resolve": "^13.3.0", - "@rollup/plugin-typescript": "^8.5.0", - "@types/node": "^18.7.18", + "@rollup/plugin-node-resolve": "^14.1.0", + "@types/node": "^18.7.20", "bootstrap": "^5.2.1", "browser-sync": "^2.27.10", "chokidar": "^3.5.3", @@ -56,7 +55,7 @@ "rollup": "^2.79.1", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "0.34.0", + "rollup-plugin-ts": "^3.0.2", "sass": "^1.55.0", "terser": "^5.15.0", "tslib": "^2.4.0", diff --git a/src/docs/js/docs.js b/src/docs/js/docs.js index 277a86269..fed1c82e4 100644 --- a/src/docs/js/docs.js +++ b/src/docs/js/docs.js @@ -35,25 +35,6 @@ document.addEventListener('DOMContentLoaded', () => { }); }); - const events = [ - 'change.td', - 'update.td', - 'error.td', - 'show.td', - 'hide.td', - 'click.td' - ]; - - document.querySelectorAll('.log-event').forEach(element => { - events.forEach((listen) => { - element.addEventListener(listen, (e) => { - logger(element.closest('section').getElementsByClassName('logger')[0], - listen === 'error.td' ? 'error' : 'log', - `${element.getAttribute('id')} -> ${listen}:`, JSON.stringify(e.detail, null, 2)); - }); - }); - }); - const subToc = document.getElementById('subToc'); if (subToc) { diff --git a/src/docs/templates/index.html b/src/docs/templates/index.html index 0ac6eeac4..90e34e9fc 100644 --- a/src/docs/templates/index.html +++ b/src/docs/templates/index.html @@ -17,7 +17,7 @@

Powerful and robust date and time picker

- Currently v6.1.2 + Currently v6.1.3 · v5 docs

diff --git a/src/docs/templates/shell.html b/src/docs/templates/shell.html index d5e1c73df..6d56ca10d 100644 --- a/src/docs/templates/shell.html +++ b/src/docs/templates/shell.html @@ -181,7 +181,7 @@ target='_blank' rel='license noopener'>MIT, docs CC BY 3.0. -
  • Currently v6.1.2
  • +
  • Currently v6.1.3
  • @@ -207,9 +207,9 @@
    Community
    - - - + + + diff --git a/src/js/display/index.ts b/src/js/display/index.ts index ba147644c..65b8408c1 100644 --- a/src/js/display/index.ts +++ b/src/js/display/index.ts @@ -276,8 +276,17 @@ export default class Display { } async createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise { - const { createPopper } = await import('@popperjs/core'); - this._popperInstance = createPopper(element, widget, options); + let createPopperFunction; + if((window as any)?.Popper) { + createPopperFunction = (window as any)?.Popper?.createPopper; + } + else { + const { createPopper } = await import('@popperjs/core'); + createPopperFunction = createPopper; + } + if(createPopperFunction){ + this._popperInstance = createPopperFunction(element, widget, options); + } } updatePopup(): void { diff --git a/src/js/jQuery-provider.js b/src/js/jQuery-provider.js index e8d4cc5b8..79660e641 100644 --- a/src/js/jQuery-provider.js +++ b/src/js/jQuery-provider.js @@ -2,7 +2,7 @@ /*global $, tempusDominus */ /*! - * Tempus Dominus v6.1.2 (https://getdatepicker.com/) + * Tempus Dominus v6.1.3 (https://getdatepicker.com/) * Copyright 2013-2021 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/src/js/tempus-dominus.ts b/src/js/tempus-dominus.ts index 8f4e7b1f5..be73a5eff 100644 --- a/src/js/tempus-dominus.ts +++ b/src/js/tempus-dominus.ts @@ -558,7 +558,7 @@ const extend = function (plugin, option) { return tempusDominus; }; -const version = '6.1.2'; +const version = '6.1.3'; const tempusDominus = { TempusDominus, @@ -581,5 +581,6 @@ export { DefaultOptions, DateTime, Unit, - version + version, + DateTimeFormatOptions } diff --git a/src/nuget/TempusDominus.nuspec b/src/nuget/TempusDominus.nuspec index 8e640c02a..859e2c40c 100644 --- a/src/nuget/TempusDominus.nuspec +++ b/src/nuget/TempusDominus.nuspec @@ -2,7 +2,7 @@ TempusDominus - 6.1.2 + 6.1.3 Tempus Dominus Eonasdan Eonasdan diff --git a/src/nuget/TempusDominus.scss.nuspec b/src/nuget/TempusDominus.scss.nuspec index f1665e319..803434f61 100644 --- a/src/nuget/TempusDominus.scss.nuspec +++ b/src/nuget/TempusDominus.scss.nuspec @@ -2,7 +2,7 @@ TempusDominus.scss - 6.1.2 + 6.1.3 Tempus Dominus Eonasdan Eonasdan diff --git a/tsconfig.json b/tsconfig.json index 64c3b42a9..98d88f229 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,11 @@ { "compilerOptions": { - "module": "es2020", - "target": "ES6", - "lib": ["es6", "dom", "es2016", "es2017", "dom.iterable", "es2019", "ES2021.String"], + "module": "ES2020", + "target": "ES2020", + "lib": ["es6", "dom", "es2016", "es2017", "dom.iterable", "es2019", "ES2021"], "moduleResolution": "node", "rootDir": "./src/js", + "declaration": true, "declarationDir": "./types", "emitDecoratorMetadata": true, "experimentalDecorators": true diff --git a/types/tempus-dominus.d.ts b/types/tempus-dominus.d.ts index 58565e27e..03ca64fe5 100644 --- a/types/tempus-dominus.d.ts +++ b/types/tempus-dominus.d.ts @@ -1,6 +1,6 @@ import Display from './display/index'; import Dates from './dates'; -import { DateTime, Unit } from './datetime'; +import { DateTime, DateTimeFormatOptions, Unit } from './datetime'; import Namespace from './utilities/namespace'; import Options from './utilities/options'; import DefaultOptions from './utilities/default-options'; @@ -158,5 +158,5 @@ declare const extend: (plugin: any, option: any) => { Unit: typeof Unit; version: string; }; -declare const version = "6.1.2"; -export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Unit, version }; +declare const version = "6.1.3"; +export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Unit, version, DateTimeFormatOptions }; diff --git a/types/tempus-dominus.esm.d.ts b/types/tempus-dominus.esm.d.ts new file mode 100644 index 000000000..acc9e2655 --- /dev/null +++ b/types/tempus-dominus.esm.d.ts @@ -0,0 +1,1255 @@ +/** + * Creates and updates the grid for `date` + */ +declare class DateDisplay { + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; + /*** + * Generates an html row that contains the days of the week. + * @private + */ + private _daysOfTheWeek; +} +/** + * Creates and updates the grid for `month` + */ +declare class MonthDisplay { + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `year` + */ +declare class YearDisplay { + private _startYear; + private _endYear; + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `seconds` + */ +declare class DecadeDisplay { + private _startDecade; + private _endDecade; + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLDivElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates the clock display + */ +declare class TimeDisplay { + private _gridColumns; + private optionsStore; + private validation; + private dates; + constructor(); + /** + * Build the container html for the clock display + * @private + */ + getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement; + /** + * Populates the various elements with in the clock display + * like the current hour and if the manipulation icons are enabled. + * @private + */ + _update(widget: HTMLElement): void; + /** + * Creates the table for the clock display depending on what options are selected. + * @private + */ + private _grid; +} +/** + * Creates and updates the grid for `hours` + */ +declare class HourDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `minutes` + */ +declare class MinuteDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `seconds` + */ +declare class secondDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +declare module secondDisplayWrapper { + export { secondDisplay }; +} +import SecondDisplay = secondDisplayWrapper.secondDisplay; +declare enum Unit { + seconds = "seconds", + minutes = "minutes", + hours = "hours", + date = "date", + month = "month", + year = "year" +} +interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { + timeStyle?: "short" | "medium" | "long"; + dateStyle?: "short" | "medium" | "long" | "full"; + numberingSystem?: string; +} +/** + * For the most part this object behaves exactly the same way + * as the native Date object with a little extra spice. + */ +declare class DateTime extends Date { + /** + * Used with Intl.DateTimeFormat + */ + locale: string; + /** + * Chainable way to set the {@link locale} + * @param value + */ + setLocale(value: string): this; + /** + * Converts a plain JS date object to a DateTime object. + * Doing this allows access to format, etc. + * @param date + * @param locale + */ + static convert(date: Date, locale?: string): DateTime; + /** + * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates. + * @param input + * @param localization + */ + static fromString(input: string, localization: any): DateTime; + /** + * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object. + */ + get clone(): DateTime; + /** + * Sets the current date to the start of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month') + * would return April 1, 2021, 12:00:00.000 AM (midnight) + * @param unit + * @param startOfTheWeek Allows for the changing the start of the week. + */ + startOf(unit: Unit | "weekDay", startOfTheWeek?: number): this; + /** + * Sets the current date to the end of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month') + * would return April 30, 2021, 11:59:59.999 PM + * @param unit + * @param startOfTheWeek + */ + endOf(unit: Unit | "weekDay", startOfTheWeek?: number): this; + /** + * Change a {@link unit} value. Value can be positive or negative + * 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') + * would return May 30, 2021, 11:45:32.984 AM + * @param value A positive or negative number + * @param unit + */ + manipulate(value: number, unit: Unit): this; + /** + * Returns a string format. + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat + * for valid templates and locale objects + * @param template An object. Uses browser defaults otherwise. + * @param locale Can be a string or an array of strings. Uses browser defaults otherwise. + */ + format(template: DateTimeFormatOptions, locale?: string): string; + /** + * Return true if {@link compare} is before this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isBefore(compare: DateTime, unit?: Unit): boolean; + /** + * Return true if {@link compare} is after this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isAfter(compare: DateTime, unit?: Unit): boolean; + /** + * Return true if {@link compare} is same this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isSame(compare: DateTime, unit?: Unit): boolean; + /** + * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive. + * @param left + * @param right + * @param unit. + * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion. + * If the inclusivity parameter is used, both indicators must be passed. + */ + isBetween(left: DateTime, right: DateTime, unit?: Unit, inclusivity?: "()" | "[]" | "(]" | "[)"): boolean; + /** + * Returns flattened object of the date. Does not include literals + * @param locale + * @param template + */ + parts(locale?: string, template?: any): any; + /** + * Shortcut to Date.getSeconds() + */ + get seconds(): number; + /** + * Shortcut to Date.setSeconds() + */ + set seconds(value: number); + /** + * Returns two digit hours + */ + get secondsFormatted(): string; + /** + * Shortcut to Date.getMinutes() + */ + get minutes(): number; + /** + * Shortcut to Date.setMinutes() + */ + set minutes(value: number); + /** + * Returns two digit minutes + */ + get minutesFormatted(): string; + /** + * Shortcut to Date.getHours() + */ + get hours(): number; + /** + * Shortcut to Date.setHours() + */ + set hours(value: number); + /** + * Returns two digit hours + */ + get hoursFormatted(): string; + /** + * Returns two digit hours but in twelve hour mode e.g. 13 -> 1 + */ + get twelveHoursFormatted(): string; + /** + * Get the meridiem of the date. E.g. AM or PM. + * If the {@link locale} provides a "dayPeriod" then this will be returned, + * otherwise it will return AM or PM. + * @param locale + */ + meridiem(locale?: string): string; + /** + * Shortcut to Date.getDate() + */ + get date(): number; + /** + * Shortcut to Date.setDate() + */ + set date(value: number); + /** + * Return two digit date + */ + get dateFormatted(): string; + /** + * Shortcut to Date.getDay() + */ + get weekDay(): number; + /** + * Shortcut to Date.getMonth() + */ + get month(): number; + /** + * Shortcut to Date.setMonth() + */ + set month(value: number); + /** + * Return two digit, human expected month. E.g. January = 1, December = 12 + */ + get monthFormatted(): string; + /** + * Shortcut to Date.getFullYear() + */ + get year(): number; + /** + * Shortcut to Date.setFullYear() + */ + set year(value: number); + // borrowed a bunch of stuff from Luxon + /** + * Gets the week of the year + */ + get week(): number; + weeksInWeekYear(weekYear: any): 53 | 52; + get isLeapYear(): boolean; + private computeOrdinal; + private nonLeapLadder; + private leapLadder; +} +type ViewMode = { + clock: any; + calendar: any; + months: any; + years: any; + decades: any; +}; +type ViewUpdateValues = Unit | "clock" | "calendar" | "all"; +/** + * Main class for all things display related. + */ +declare class Display { + private _widget; + private _popperInstance; + private _isVisible; + private optionsStore; + private validation; + private dates; + dateDisplay: DateDisplay; + monthDisplay: MonthDisplay; + yearDisplay: YearDisplay; + decadeDisplay: DecadeDisplay; + timeDisplay: TimeDisplay; + hourDisplay: HourDisplay; + minuteDisplay: MinuteDisplay; + secondDisplay: SecondDisplay; + private _eventEmitters; + constructor(); + /** + * Returns the widget body or undefined + * @private + */ + get widget(): HTMLElement | undefined; + /** + * Returns this visible state of the picker (shown) + */ + get isVisible(): boolean; + /** + * Updates the table for a particular unit. Used when an option as changed or + * whenever the class list might need to be refreshed. + * @param unit + * @private + */ + _update(unit: ViewUpdateValues): void; + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit: Unit | "decade", _date: DateTime, _classes: string[], _element: HTMLElement): void; + /** + * Shows the picker and creates a Popper instance if needed. + * Add document click event to hide when clicking outside the picker. + * fires Events#show + */ + show(): void; + createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise; + updatePopup(): void; + /** + * Changes the calendar view mode. E.g. month <-> year + * @param direction -/+ number to move currentViewMode + * @private + */ + _showMode(direction?: number): void; + /** + * Changes the theme. E.g. light, dark or auto + * @param theme the theme name + * @private + */ + _updateTheme(theme?: "light" | "dark" | "auto"): void; + _getThemeClass(): string; + _updateCalendarHeader(): void; + /** + * Hides the picker if needed. + * Remove document click event to hide when clicking outside the picker. + * fires Events#hide + */ + hide(): void; + /** + * Toggles the picker's open state. Fires a show/hide event depending. + */ + toggle(): void; + /** + * Removes document and data-action click listener and reset the widget + * @private + */ + _dispose(): void; + /** + * Builds the widgets html template. + * @private + */ + private _buildWidget; + /** + * Returns true if the hours, minutes, or seconds component is turned on + */ + get _hasTime(): boolean; + /** + * Returns true if the year, month, or date component is turned on + */ + get _hasDate(): boolean; + /** + * Get the toolbar html based on options like buttons.today + * @private + */ + getToolbarElements(): HTMLElement[]; + /*** + * Builds the base header template with next and previous icons + * @private + */ + getHeadTemplate(): HTMLElement; + /** + * Builds an icon tag as either an `` + * or with icons.type is `sprites` then a svg tag instead + * @param iconClass + * @private + */ + _iconTag(iconClass: string): HTMLElement | SVGElement; + /** + * A document click event to hide the widget if click is outside + * @private + * @param e MouseEvent + */ + private _documentClickEvent; + /** + * Click event for any action like selecting a date + * @param e MouseEvent + * @private + */ + private _actionsClickEvent; + /** + * Causes the widget to get rebuilt on next show. If the picker is already open + * then hide and reshow it. + * @private + */ + _rebuild(): void; +} +type Paint = (unit: Unit | "decade", innerDate: DateTime, classes: string[], element: HTMLElement) => void; +declare class Dates { + private _dates; + private optionsStore; + private validation; + private _eventEmitters; + constructor(); + /** + * Returns the array of selected dates + */ + get picked(): DateTime[]; + /** + * Returns the last picked value. + */ + get lastPicked(): DateTime; + /** + * Returns the length of picked dates -1 or 0 if none are selected. + */ + get lastPickedIndex(): number; + /** + * Formats a DateTime object to a string. Used when setting the input value. + * @param date + */ + formatInput(date: DateTime): string; + /** + * parse the value into a DateTime object. + * this can be overwritten to supply your own parsing. + */ + parseInput(value: any): DateTime; + /** + * Tries to convert the provided value to a DateTime object. + * If value is null|undefined then clear the value of the provided index (or 0). + * @param value Value to convert or null|undefined + * @param index When using multidates this is the index in the array + */ + setFromInput(value: any, index?: number): void; + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date: DateTime): void; + /** + * Returns true if the `targetDate` is part of the selected dates array. + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + isPicked(targetDate: DateTime, unit?: Unit): boolean; + /** + * Returns the index at which `targetDate` is in the array. + * This is used for updating or removing a date when multi-date is used + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + pickedIndex(targetDate: DateTime, unit?: Unit): number; + /** + * Clears all selected dates. + */ + clear(): void; + /** + * Find the "book end" years given a `year` and a `factor` + * @param factor e.g. 100 for decades + * @param year e.g. 2021 + */ + static getStartEndYear(factor: number, year: number): [ + number, + number, + number + ]; + /** + * Attempts to either clear or set the `target` date at `index`. + * If the `target` is null then the date will be cleared. + * If multi-date is being used then it will be removed from the array. + * If `target` is valid and multi-date is used then if `index` is + * provided the date at that index will be replaced, otherwise it is appended. + * @param target + * @param index + */ + setValue(target?: DateTime, index?: number): void; +} +declare class ErrorMessages { + private base; + //#region out to console + /** + * Throws an error indicating that a key in the options object is invalid. + * @param optionName + */ + unexpectedOption(optionName: string): void; + /** + * Throws an error indicating that one more keys in the options object is invalid. + * @param optionName + */ + unexpectedOptions(optionName: string[]): void; + /** + * Throws an error when an option is provide an unsupported value. + * For example a value of 'cheese' for toolbarPlacement which only supports + * 'top', 'bottom', 'default'. + * @param optionName + * @param badValue + * @param validOptions + */ + unexpectedOptionValue(optionName: string, badValue: string, validOptions: string[]): void; + /** + * Throws 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. + * @param optionName + * @param badType + * @param expectedType + */ + typeMismatch(optionName: string, badType: string, expectedType: string): void; + /** + * Throws an error when an option value is outside of the expected range. + * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6. + * @param optionName + * @param lower + * @param upper + */ + numbersOutOfRage(optionName: string, lower: number, upper: number): void; + /** + * Throws an error when a value for a date options couldn't be parsed. Either + * the option was an invalid string or an invalid Date object. + * @param optionName + * @param date + * @param soft If true, logs a warning instead of an error. + */ + failedToParseDate(optionName: string, date: any, soft?: boolean): void; + /** + * Throws when an element to attach to was not provided in the constructor. + */ + mustProvideElement(): void; + /** + * Throws if providing an array for the events to subscribe method doesn't have + * the same number of callbacks. E.g., subscribe([1,2], [1]) + */ + subscribeMismatch(): void; + /** + * Throws if the configuration has conflicting rules e.g. minDate is after maxDate + */ + conflictingConfiguration(message?: string): void; + /** + * customDateFormat errors + */ + customDateFormatError(message?: string): void; + /** + * Logs a warning if a date option value is provided as a string, instead of + * a date/datetime object. + */ + dateString(): void; + throwError(message: any): void; + //#endregion + //#region used with notify.error + /** + * Used with an Error Event type if the user selects a date that + * fails restriction validation. + */ + failedToSetInvalidDate: string; + /** + * 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: string; +} +/** + * Events + */ +declare class Events { + key: string; + /** + * Change event. Fired when the user selects a date. + * See also EventTypes.ChangeEvent + */ + change: string; + /** + * Emit when the view changes for example from month view to the year view. + * See also EventTypes.ViewUpdateEvent + */ + update: string; + /** + * Emits when a selected date or value from the input field fails to meet the provided validation rules. + * See also EventTypes.FailEvent + */ + error: string; + /** + * Show event + * @event Events#show + */ + show: string; + /** + * Hide event + * @event Events#hide + */ + hide: string; + // blur and focus are used in the jQuery provider but are otherwise unused. + // keyup/down will be used later for keybinding options + blur: string; + focus: string; + keyup: string; + keydown: string; +} +declare class Css { + /** + * The outer element for the widget. + */ + widget: string; + /** + * Hold the previous, next and switcher divs + */ + calendarHeader: string; + /** + * The element for the action to change the calendar view. E.g. month -> year. + */ + switch: string; + /** + * The elements for all the toolbar options + */ + toolbar: string; + /** + * Disables the hover and rounding affect. + */ + noHighlight: string; + /** + * Applied to the widget element when the side by side option is in use. + */ + sideBySide: string; + /** + * The element for the action to change the calendar view, e.g. August -> July + */ + previous: string; + /** + * The element for the action to change the calendar view, e.g. August -> September + */ + next: string; + /** + * Applied to any action that would violate any restriction options. ALso applied + * to an input field if the disabled function is called. + */ + disabled: string; + /** + * Applied to any date that is less than requested view, + * e.g. the last day of the previous month. + */ + old: string; + /** + * Applied to any date that is greater than of requested view, + * e.g. the last day of the previous month. + */ + new: string; + /** + * Applied to any date that is currently selected. + */ + active: string; + //#region date element + /** + * The outer element for the calendar view. + */ + dateContainer: string; + /** + * The outer element for the decades view. + */ + decadesContainer: string; + /** + * Applied to elements within the decades container, e.g. 2020, 2030 + */ + decade: string; + /** + * The outer element for the years view. + */ + yearsContainer: string; + /** + * Applied to elements within the years container, e.g. 2021, 2021 + */ + year: string; + /** + * The outer element for the month view. + */ + monthsContainer: string; + /** + * Applied to elements within the month container, e.g. January, February + */ + month: string; + /** + * The outer element for the calendar view. + */ + daysContainer: string; + /** + * Applied to elements within the day container, e.g. 1, 2..31 + */ + day: string; + /** + * If display.calendarWeeks is enabled, a column displaying the week of year + * is shown. This class is applied to each cell in that column. + */ + calendarWeeks: string; + /** + * Applied to the first row of the calendar view, e.g. Sunday, Monday + */ + dayOfTheWeek: string; + /** + * Applied to the current date on the calendar view. + */ + today: string; + /** + * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday + */ + weekend: string; + //#endregion + //#region time element + /** + * The outer element for all time related elements. + */ + timeContainer: string; + /** + * Applied the separator columns between time elements, e.g. hour *:* minute *:* second + */ + separator: string; + /** + * The outer element for the clock view. + */ + clockContainer: string; + /** + * The outer element for the hours selection view. + */ + hourContainer: string; + /** + * The outer element for the minutes selection view. + */ + minuteContainer: string; + /** + * The outer element for the seconds selection view. + */ + secondContainer: string; + /** + * Applied to each element in the hours selection view. + */ + hour: string; + /** + * Applied to each element in the minutes selection view. + */ + minute: string; + /** + * Applied to each element in the seconds selection view. + */ + second: string; + /** + * Applied AM/PM toggle button. + */ + toggleMeridiem: string; + //#endregion + //#region collapse + /** + * Applied the element of the current view mode, e.g. calendar or clock. + */ + show: string; + /** + * Applied to the currently showing view mode during a transition + * between calendar and clock views + */ + collapsing: string; + /** + * Applied to the currently hidden view mode. + */ + collapse: string; + //#endregion + /** + * Applied to the widget when the option display.inline is enabled. + */ + inline: string; + /** + * Applied to the widget when the option display.theme is light. + */ + lightTheme: string; + /** + * Applied to the widget when the option display.theme is dark. + */ + darkTheme: string; + /** + * Used for detecting if the system color preference is dark mode + */ + isDarkPreferredQuery: string; +} +declare class Namespace { + static NAME: string; + // noinspection JSUnusedGlobalSymbols + static dataKey: string; + static events: Events; + static css: Css; + static errorMessages: ErrorMessages; +} +interface Options { + restrictions?: { + minDate?: DateTime; + maxDate?: DateTime; + enabledDates?: DateTime[]; + disabledDates?: DateTime[]; + enabledHours?: number[]; + disabledHours?: number[]; + disabledTimeIntervals?: { + from: DateTime; + to: DateTime; + }[]; + daysOfWeekDisabled?: number[]; + }; + display?: { + toolbarPlacement?: "top" | "bottom"; + components?: { + calendar?: boolean; + date?: boolean; + month?: boolean; + year?: boolean; + decades?: boolean; + clock?: boolean; + hours?: boolean; + minutes?: boolean; + seconds?: boolean; + useTwentyfourHour?: boolean; + }; + buttons?: { + today?: boolean; + close?: boolean; + clear?: boolean; + }; + calendarWeeks?: boolean; + icons?: { + date?: string; + next?: string; + previous?: string; + today?: string; + clear?: string; + time?: string; + up?: string; + type?: "icons" | "sprites"; + down?: string; + close?: string; + }; + viewMode?: keyof ViewMode; + sideBySide?: boolean; + inline?: boolean; + keepOpen?: boolean; + theme?: "light" | "dark" | "auto"; + }; + stepping?: number; + useCurrent?: boolean; + defaultDate?: DateTime; + localization?: Localization; + keepInvalid?: boolean; + debug?: boolean; + allowInputToggle?: boolean; + viewDate?: DateTime; + multipleDates?: boolean; + multipleDatesSeparator?: string; + promptTimeOnDateChange?: boolean; + promptTimeOnDateChangeTransitionDelay?: number; + meta?: {}; + container?: HTMLElement; +} +interface FormatLocalization { + locale?: string; + dateFormats?: { + LTS?: string; + LT?: string; + L?: string; + LL?: string; + LLL?: string; + LLLL?: string; + }; + ordinal?: (n: number) => any; + format?: string; +} +interface Localization extends FormatLocalization { + nextMonth?: string; + pickHour?: string; + incrementSecond?: string; + nextDecade?: string; + selectDecade?: string; + dayViewHeaderFormat?: DateTimeFormatOptions; + decrementHour?: string; + selectDate?: string; + incrementHour?: string; + previousCentury?: string; + decrementSecond?: string; + today?: string; + previousMonth?: string; + selectYear?: string; + pickSecond?: string; + nextCentury?: string; + close?: string; + incrementMinute?: string; + selectTime?: string; + clear?: string; + toggleMeridiem?: string; + selectMonth?: string; + decrementMinute?: string; + pickMinute?: string; + nextYear?: string; + previousYear?: string; + previousDecade?: string; + startOfTheWeek?: number; +} +declare const DefaultOptions: Options; +/** + * A robust and powerful date/time picker component. + */ +declare class TempusDominus { + _subscribers: { + [key: string]: ((event: any) => {})[]; + }; + private _isDisabled; + private _toggle; + private _currentPromptTimeTimeout; + private actions; + private optionsStore; + private _eventEmitters; + display: Display; + dates: Dates; + constructor(element: HTMLElement, options?: Options); + get viewDate(): DateTime; + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + updateOptions(options: any, reset?: boolean): void; + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + toggle(): void; + /** + * Shows the picker unless the picker is disabled. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Shows the picker unless the picker is disabled. + * @public + */ + show(): void; + /** + * Hides the picker unless the picker is disabled. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker unless the picker is disabled. + * @public + */ + hide(): void; + /** + * Disables the picker and the target input field. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Disables the picker and the target input field. + * @public + */ + disable(): void; + /** + * Enables the picker and the target input field. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Enables the picker and the target input field. + * @public + */ + enable(): void; + /** + * Clears all the selected dates + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Clears all the selected dates + * @public + */ + clear(): void; + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + subscribe(eventTypes: string | string[], callbacks: (event: any) => void | ((event: any) => void)[]): { + unsubscribe: () => void; + } | { + unsubscribe: () => void; + }[]; + /** + * Hides the picker and removes event listeners + */ + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker and removes event listeners + */ + dispose(): void; + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language: string): void; + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + private _triggerEvent; + private _publish; + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + private _viewUpdate; + private _unsubscribe; + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + private _initializeOptions; + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + private _initializeInput; + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + private _initializeToggle; + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + private _handleAfterChangeEvent; + /** + * Event for when the input field changes. This is a class level method so there's + * something for the remove listener function. + * @private + */ + private _inputChangeEvent; + /** + * Event for when the toggle is clicked. This is a class level method so there's + * something for the remove listener function. + * @private + */ + private _toggleClickEvent; +} +/** + * Called from a locale plugin. + * @param l locale object for localization options + */ +declare const loadLocale: (l: any) => void; +/** + * A sets the global localization options to the provided locale name. + * `loadLocale` MUST be called first. + * @param l + */ +declare const locale: (l: string) => void; +/** + * Called from a plugin to extend or override picker defaults. + * @param plugin + * @param option + */ +declare const extend: (plugin: any, option: any) => { + TempusDominus: typeof TempusDominus; + extend: any; + loadLocale: (l: any) => void; + locale: (l: string) => void; + Namespace: typeof Namespace; + DefaultOptions: Options; + DateTime: typeof DateTime; + Unit: typeof Unit; + version: string; +}; +declare const version = "6.1.3"; +export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Unit, version, DateTimeFormatOptions }; diff --git a/types/tempus-dominus.esm.min.d.ts b/types/tempus-dominus.esm.min.d.ts new file mode 100644 index 000000000..acc9e2655 --- /dev/null +++ b/types/tempus-dominus.esm.min.d.ts @@ -0,0 +1,1255 @@ +/** + * Creates and updates the grid for `date` + */ +declare class DateDisplay { + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; + /*** + * Generates an html row that contains the days of the week. + * @private + */ + private _daysOfTheWeek; +} +/** + * Creates and updates the grid for `month` + */ +declare class MonthDisplay { + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `year` + */ +declare class YearDisplay { + private _startYear; + private _endYear; + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `seconds` + */ +declare class DecadeDisplay { + private _startDecade; + private _endDecade; + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLDivElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates the clock display + */ +declare class TimeDisplay { + private _gridColumns; + private optionsStore; + private validation; + private dates; + constructor(); + /** + * Build the container html for the clock display + * @private + */ + getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement; + /** + * Populates the various elements with in the clock display + * like the current hour and if the manipulation icons are enabled. + * @private + */ + _update(widget: HTMLElement): void; + /** + * Creates the table for the clock display depending on what options are selected. + * @private + */ + private _grid; +} +/** + * Creates and updates the grid for `hours` + */ +declare class HourDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `minutes` + */ +declare class MinuteDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `seconds` + */ +declare class secondDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +declare module secondDisplayWrapper { + export { secondDisplay }; +} +import SecondDisplay = secondDisplayWrapper.secondDisplay; +declare enum Unit { + seconds = "seconds", + minutes = "minutes", + hours = "hours", + date = "date", + month = "month", + year = "year" +} +interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { + timeStyle?: "short" | "medium" | "long"; + dateStyle?: "short" | "medium" | "long" | "full"; + numberingSystem?: string; +} +/** + * For the most part this object behaves exactly the same way + * as the native Date object with a little extra spice. + */ +declare class DateTime extends Date { + /** + * Used with Intl.DateTimeFormat + */ + locale: string; + /** + * Chainable way to set the {@link locale} + * @param value + */ + setLocale(value: string): this; + /** + * Converts a plain JS date object to a DateTime object. + * Doing this allows access to format, etc. + * @param date + * @param locale + */ + static convert(date: Date, locale?: string): DateTime; + /** + * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates. + * @param input + * @param localization + */ + static fromString(input: string, localization: any): DateTime; + /** + * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object. + */ + get clone(): DateTime; + /** + * Sets the current date to the start of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month') + * would return April 1, 2021, 12:00:00.000 AM (midnight) + * @param unit + * @param startOfTheWeek Allows for the changing the start of the week. + */ + startOf(unit: Unit | "weekDay", startOfTheWeek?: number): this; + /** + * Sets the current date to the end of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month') + * would return April 30, 2021, 11:59:59.999 PM + * @param unit + * @param startOfTheWeek + */ + endOf(unit: Unit | "weekDay", startOfTheWeek?: number): this; + /** + * Change a {@link unit} value. Value can be positive or negative + * 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') + * would return May 30, 2021, 11:45:32.984 AM + * @param value A positive or negative number + * @param unit + */ + manipulate(value: number, unit: Unit): this; + /** + * Returns a string format. + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat + * for valid templates and locale objects + * @param template An object. Uses browser defaults otherwise. + * @param locale Can be a string or an array of strings. Uses browser defaults otherwise. + */ + format(template: DateTimeFormatOptions, locale?: string): string; + /** + * Return true if {@link compare} is before this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isBefore(compare: DateTime, unit?: Unit): boolean; + /** + * Return true if {@link compare} is after this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isAfter(compare: DateTime, unit?: Unit): boolean; + /** + * Return true if {@link compare} is same this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isSame(compare: DateTime, unit?: Unit): boolean; + /** + * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive. + * @param left + * @param right + * @param unit. + * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion. + * If the inclusivity parameter is used, both indicators must be passed. + */ + isBetween(left: DateTime, right: DateTime, unit?: Unit, inclusivity?: "()" | "[]" | "(]" | "[)"): boolean; + /** + * Returns flattened object of the date. Does not include literals + * @param locale + * @param template + */ + parts(locale?: string, template?: any): any; + /** + * Shortcut to Date.getSeconds() + */ + get seconds(): number; + /** + * Shortcut to Date.setSeconds() + */ + set seconds(value: number); + /** + * Returns two digit hours + */ + get secondsFormatted(): string; + /** + * Shortcut to Date.getMinutes() + */ + get minutes(): number; + /** + * Shortcut to Date.setMinutes() + */ + set minutes(value: number); + /** + * Returns two digit minutes + */ + get minutesFormatted(): string; + /** + * Shortcut to Date.getHours() + */ + get hours(): number; + /** + * Shortcut to Date.setHours() + */ + set hours(value: number); + /** + * Returns two digit hours + */ + get hoursFormatted(): string; + /** + * Returns two digit hours but in twelve hour mode e.g. 13 -> 1 + */ + get twelveHoursFormatted(): string; + /** + * Get the meridiem of the date. E.g. AM or PM. + * If the {@link locale} provides a "dayPeriod" then this will be returned, + * otherwise it will return AM or PM. + * @param locale + */ + meridiem(locale?: string): string; + /** + * Shortcut to Date.getDate() + */ + get date(): number; + /** + * Shortcut to Date.setDate() + */ + set date(value: number); + /** + * Return two digit date + */ + get dateFormatted(): string; + /** + * Shortcut to Date.getDay() + */ + get weekDay(): number; + /** + * Shortcut to Date.getMonth() + */ + get month(): number; + /** + * Shortcut to Date.setMonth() + */ + set month(value: number); + /** + * Return two digit, human expected month. E.g. January = 1, December = 12 + */ + get monthFormatted(): string; + /** + * Shortcut to Date.getFullYear() + */ + get year(): number; + /** + * Shortcut to Date.setFullYear() + */ + set year(value: number); + // borrowed a bunch of stuff from Luxon + /** + * Gets the week of the year + */ + get week(): number; + weeksInWeekYear(weekYear: any): 53 | 52; + get isLeapYear(): boolean; + private computeOrdinal; + private nonLeapLadder; + private leapLadder; +} +type ViewMode = { + clock: any; + calendar: any; + months: any; + years: any; + decades: any; +}; +type ViewUpdateValues = Unit | "clock" | "calendar" | "all"; +/** + * Main class for all things display related. + */ +declare class Display { + private _widget; + private _popperInstance; + private _isVisible; + private optionsStore; + private validation; + private dates; + dateDisplay: DateDisplay; + monthDisplay: MonthDisplay; + yearDisplay: YearDisplay; + decadeDisplay: DecadeDisplay; + timeDisplay: TimeDisplay; + hourDisplay: HourDisplay; + minuteDisplay: MinuteDisplay; + secondDisplay: SecondDisplay; + private _eventEmitters; + constructor(); + /** + * Returns the widget body or undefined + * @private + */ + get widget(): HTMLElement | undefined; + /** + * Returns this visible state of the picker (shown) + */ + get isVisible(): boolean; + /** + * Updates the table for a particular unit. Used when an option as changed or + * whenever the class list might need to be refreshed. + * @param unit + * @private + */ + _update(unit: ViewUpdateValues): void; + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit: Unit | "decade", _date: DateTime, _classes: string[], _element: HTMLElement): void; + /** + * Shows the picker and creates a Popper instance if needed. + * Add document click event to hide when clicking outside the picker. + * fires Events#show + */ + show(): void; + createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise; + updatePopup(): void; + /** + * Changes the calendar view mode. E.g. month <-> year + * @param direction -/+ number to move currentViewMode + * @private + */ + _showMode(direction?: number): void; + /** + * Changes the theme. E.g. light, dark or auto + * @param theme the theme name + * @private + */ + _updateTheme(theme?: "light" | "dark" | "auto"): void; + _getThemeClass(): string; + _updateCalendarHeader(): void; + /** + * Hides the picker if needed. + * Remove document click event to hide when clicking outside the picker. + * fires Events#hide + */ + hide(): void; + /** + * Toggles the picker's open state. Fires a show/hide event depending. + */ + toggle(): void; + /** + * Removes document and data-action click listener and reset the widget + * @private + */ + _dispose(): void; + /** + * Builds the widgets html template. + * @private + */ + private _buildWidget; + /** + * Returns true if the hours, minutes, or seconds component is turned on + */ + get _hasTime(): boolean; + /** + * Returns true if the year, month, or date component is turned on + */ + get _hasDate(): boolean; + /** + * Get the toolbar html based on options like buttons.today + * @private + */ + getToolbarElements(): HTMLElement[]; + /*** + * Builds the base header template with next and previous icons + * @private + */ + getHeadTemplate(): HTMLElement; + /** + * Builds an icon tag as either an `` + * or with icons.type is `sprites` then a svg tag instead + * @param iconClass + * @private + */ + _iconTag(iconClass: string): HTMLElement | SVGElement; + /** + * A document click event to hide the widget if click is outside + * @private + * @param e MouseEvent + */ + private _documentClickEvent; + /** + * Click event for any action like selecting a date + * @param e MouseEvent + * @private + */ + private _actionsClickEvent; + /** + * Causes the widget to get rebuilt on next show. If the picker is already open + * then hide and reshow it. + * @private + */ + _rebuild(): void; +} +type Paint = (unit: Unit | "decade", innerDate: DateTime, classes: string[], element: HTMLElement) => void; +declare class Dates { + private _dates; + private optionsStore; + private validation; + private _eventEmitters; + constructor(); + /** + * Returns the array of selected dates + */ + get picked(): DateTime[]; + /** + * Returns the last picked value. + */ + get lastPicked(): DateTime; + /** + * Returns the length of picked dates -1 or 0 if none are selected. + */ + get lastPickedIndex(): number; + /** + * Formats a DateTime object to a string. Used when setting the input value. + * @param date + */ + formatInput(date: DateTime): string; + /** + * parse the value into a DateTime object. + * this can be overwritten to supply your own parsing. + */ + parseInput(value: any): DateTime; + /** + * Tries to convert the provided value to a DateTime object. + * If value is null|undefined then clear the value of the provided index (or 0). + * @param value Value to convert or null|undefined + * @param index When using multidates this is the index in the array + */ + setFromInput(value: any, index?: number): void; + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date: DateTime): void; + /** + * Returns true if the `targetDate` is part of the selected dates array. + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + isPicked(targetDate: DateTime, unit?: Unit): boolean; + /** + * Returns the index at which `targetDate` is in the array. + * This is used for updating or removing a date when multi-date is used + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + pickedIndex(targetDate: DateTime, unit?: Unit): number; + /** + * Clears all selected dates. + */ + clear(): void; + /** + * Find the "book end" years given a `year` and a `factor` + * @param factor e.g. 100 for decades + * @param year e.g. 2021 + */ + static getStartEndYear(factor: number, year: number): [ + number, + number, + number + ]; + /** + * Attempts to either clear or set the `target` date at `index`. + * If the `target` is null then the date will be cleared. + * If multi-date is being used then it will be removed from the array. + * If `target` is valid and multi-date is used then if `index` is + * provided the date at that index will be replaced, otherwise it is appended. + * @param target + * @param index + */ + setValue(target?: DateTime, index?: number): void; +} +declare class ErrorMessages { + private base; + //#region out to console + /** + * Throws an error indicating that a key in the options object is invalid. + * @param optionName + */ + unexpectedOption(optionName: string): void; + /** + * Throws an error indicating that one more keys in the options object is invalid. + * @param optionName + */ + unexpectedOptions(optionName: string[]): void; + /** + * Throws an error when an option is provide an unsupported value. + * For example a value of 'cheese' for toolbarPlacement which only supports + * 'top', 'bottom', 'default'. + * @param optionName + * @param badValue + * @param validOptions + */ + unexpectedOptionValue(optionName: string, badValue: string, validOptions: string[]): void; + /** + * Throws 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. + * @param optionName + * @param badType + * @param expectedType + */ + typeMismatch(optionName: string, badType: string, expectedType: string): void; + /** + * Throws an error when an option value is outside of the expected range. + * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6. + * @param optionName + * @param lower + * @param upper + */ + numbersOutOfRage(optionName: string, lower: number, upper: number): void; + /** + * Throws an error when a value for a date options couldn't be parsed. Either + * the option was an invalid string or an invalid Date object. + * @param optionName + * @param date + * @param soft If true, logs a warning instead of an error. + */ + failedToParseDate(optionName: string, date: any, soft?: boolean): void; + /** + * Throws when an element to attach to was not provided in the constructor. + */ + mustProvideElement(): void; + /** + * Throws if providing an array for the events to subscribe method doesn't have + * the same number of callbacks. E.g., subscribe([1,2], [1]) + */ + subscribeMismatch(): void; + /** + * Throws if the configuration has conflicting rules e.g. minDate is after maxDate + */ + conflictingConfiguration(message?: string): void; + /** + * customDateFormat errors + */ + customDateFormatError(message?: string): void; + /** + * Logs a warning if a date option value is provided as a string, instead of + * a date/datetime object. + */ + dateString(): void; + throwError(message: any): void; + //#endregion + //#region used with notify.error + /** + * Used with an Error Event type if the user selects a date that + * fails restriction validation. + */ + failedToSetInvalidDate: string; + /** + * 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: string; +} +/** + * Events + */ +declare class Events { + key: string; + /** + * Change event. Fired when the user selects a date. + * See also EventTypes.ChangeEvent + */ + change: string; + /** + * Emit when the view changes for example from month view to the year view. + * See also EventTypes.ViewUpdateEvent + */ + update: string; + /** + * Emits when a selected date or value from the input field fails to meet the provided validation rules. + * See also EventTypes.FailEvent + */ + error: string; + /** + * Show event + * @event Events#show + */ + show: string; + /** + * Hide event + * @event Events#hide + */ + hide: string; + // blur and focus are used in the jQuery provider but are otherwise unused. + // keyup/down will be used later for keybinding options + blur: string; + focus: string; + keyup: string; + keydown: string; +} +declare class Css { + /** + * The outer element for the widget. + */ + widget: string; + /** + * Hold the previous, next and switcher divs + */ + calendarHeader: string; + /** + * The element for the action to change the calendar view. E.g. month -> year. + */ + switch: string; + /** + * The elements for all the toolbar options + */ + toolbar: string; + /** + * Disables the hover and rounding affect. + */ + noHighlight: string; + /** + * Applied to the widget element when the side by side option is in use. + */ + sideBySide: string; + /** + * The element for the action to change the calendar view, e.g. August -> July + */ + previous: string; + /** + * The element for the action to change the calendar view, e.g. August -> September + */ + next: string; + /** + * Applied to any action that would violate any restriction options. ALso applied + * to an input field if the disabled function is called. + */ + disabled: string; + /** + * Applied to any date that is less than requested view, + * e.g. the last day of the previous month. + */ + old: string; + /** + * Applied to any date that is greater than of requested view, + * e.g. the last day of the previous month. + */ + new: string; + /** + * Applied to any date that is currently selected. + */ + active: string; + //#region date element + /** + * The outer element for the calendar view. + */ + dateContainer: string; + /** + * The outer element for the decades view. + */ + decadesContainer: string; + /** + * Applied to elements within the decades container, e.g. 2020, 2030 + */ + decade: string; + /** + * The outer element for the years view. + */ + yearsContainer: string; + /** + * Applied to elements within the years container, e.g. 2021, 2021 + */ + year: string; + /** + * The outer element for the month view. + */ + monthsContainer: string; + /** + * Applied to elements within the month container, e.g. January, February + */ + month: string; + /** + * The outer element for the calendar view. + */ + daysContainer: string; + /** + * Applied to elements within the day container, e.g. 1, 2..31 + */ + day: string; + /** + * If display.calendarWeeks is enabled, a column displaying the week of year + * is shown. This class is applied to each cell in that column. + */ + calendarWeeks: string; + /** + * Applied to the first row of the calendar view, e.g. Sunday, Monday + */ + dayOfTheWeek: string; + /** + * Applied to the current date on the calendar view. + */ + today: string; + /** + * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday + */ + weekend: string; + //#endregion + //#region time element + /** + * The outer element for all time related elements. + */ + timeContainer: string; + /** + * Applied the separator columns between time elements, e.g. hour *:* minute *:* second + */ + separator: string; + /** + * The outer element for the clock view. + */ + clockContainer: string; + /** + * The outer element for the hours selection view. + */ + hourContainer: string; + /** + * The outer element for the minutes selection view. + */ + minuteContainer: string; + /** + * The outer element for the seconds selection view. + */ + secondContainer: string; + /** + * Applied to each element in the hours selection view. + */ + hour: string; + /** + * Applied to each element in the minutes selection view. + */ + minute: string; + /** + * Applied to each element in the seconds selection view. + */ + second: string; + /** + * Applied AM/PM toggle button. + */ + toggleMeridiem: string; + //#endregion + //#region collapse + /** + * Applied the element of the current view mode, e.g. calendar or clock. + */ + show: string; + /** + * Applied to the currently showing view mode during a transition + * between calendar and clock views + */ + collapsing: string; + /** + * Applied to the currently hidden view mode. + */ + collapse: string; + //#endregion + /** + * Applied to the widget when the option display.inline is enabled. + */ + inline: string; + /** + * Applied to the widget when the option display.theme is light. + */ + lightTheme: string; + /** + * Applied to the widget when the option display.theme is dark. + */ + darkTheme: string; + /** + * Used for detecting if the system color preference is dark mode + */ + isDarkPreferredQuery: string; +} +declare class Namespace { + static NAME: string; + // noinspection JSUnusedGlobalSymbols + static dataKey: string; + static events: Events; + static css: Css; + static errorMessages: ErrorMessages; +} +interface Options { + restrictions?: { + minDate?: DateTime; + maxDate?: DateTime; + enabledDates?: DateTime[]; + disabledDates?: DateTime[]; + enabledHours?: number[]; + disabledHours?: number[]; + disabledTimeIntervals?: { + from: DateTime; + to: DateTime; + }[]; + daysOfWeekDisabled?: number[]; + }; + display?: { + toolbarPlacement?: "top" | "bottom"; + components?: { + calendar?: boolean; + date?: boolean; + month?: boolean; + year?: boolean; + decades?: boolean; + clock?: boolean; + hours?: boolean; + minutes?: boolean; + seconds?: boolean; + useTwentyfourHour?: boolean; + }; + buttons?: { + today?: boolean; + close?: boolean; + clear?: boolean; + }; + calendarWeeks?: boolean; + icons?: { + date?: string; + next?: string; + previous?: string; + today?: string; + clear?: string; + time?: string; + up?: string; + type?: "icons" | "sprites"; + down?: string; + close?: string; + }; + viewMode?: keyof ViewMode; + sideBySide?: boolean; + inline?: boolean; + keepOpen?: boolean; + theme?: "light" | "dark" | "auto"; + }; + stepping?: number; + useCurrent?: boolean; + defaultDate?: DateTime; + localization?: Localization; + keepInvalid?: boolean; + debug?: boolean; + allowInputToggle?: boolean; + viewDate?: DateTime; + multipleDates?: boolean; + multipleDatesSeparator?: string; + promptTimeOnDateChange?: boolean; + promptTimeOnDateChangeTransitionDelay?: number; + meta?: {}; + container?: HTMLElement; +} +interface FormatLocalization { + locale?: string; + dateFormats?: { + LTS?: string; + LT?: string; + L?: string; + LL?: string; + LLL?: string; + LLLL?: string; + }; + ordinal?: (n: number) => any; + format?: string; +} +interface Localization extends FormatLocalization { + nextMonth?: string; + pickHour?: string; + incrementSecond?: string; + nextDecade?: string; + selectDecade?: string; + dayViewHeaderFormat?: DateTimeFormatOptions; + decrementHour?: string; + selectDate?: string; + incrementHour?: string; + previousCentury?: string; + decrementSecond?: string; + today?: string; + previousMonth?: string; + selectYear?: string; + pickSecond?: string; + nextCentury?: string; + close?: string; + incrementMinute?: string; + selectTime?: string; + clear?: string; + toggleMeridiem?: string; + selectMonth?: string; + decrementMinute?: string; + pickMinute?: string; + nextYear?: string; + previousYear?: string; + previousDecade?: string; + startOfTheWeek?: number; +} +declare const DefaultOptions: Options; +/** + * A robust and powerful date/time picker component. + */ +declare class TempusDominus { + _subscribers: { + [key: string]: ((event: any) => {})[]; + }; + private _isDisabled; + private _toggle; + private _currentPromptTimeTimeout; + private actions; + private optionsStore; + private _eventEmitters; + display: Display; + dates: Dates; + constructor(element: HTMLElement, options?: Options); + get viewDate(): DateTime; + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + updateOptions(options: any, reset?: boolean): void; + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + toggle(): void; + /** + * Shows the picker unless the picker is disabled. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Shows the picker unless the picker is disabled. + * @public + */ + show(): void; + /** + * Hides the picker unless the picker is disabled. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker unless the picker is disabled. + * @public + */ + hide(): void; + /** + * Disables the picker and the target input field. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Disables the picker and the target input field. + * @public + */ + disable(): void; + /** + * Enables the picker and the target input field. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Enables the picker and the target input field. + * @public + */ + enable(): void; + /** + * Clears all the selected dates + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Clears all the selected dates + * @public + */ + clear(): void; + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + subscribe(eventTypes: string | string[], callbacks: (event: any) => void | ((event: any) => void)[]): { + unsubscribe: () => void; + } | { + unsubscribe: () => void; + }[]; + /** + * Hides the picker and removes event listeners + */ + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker and removes event listeners + */ + dispose(): void; + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language: string): void; + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + private _triggerEvent; + private _publish; + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + private _viewUpdate; + private _unsubscribe; + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + private _initializeOptions; + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + private _initializeInput; + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + private _initializeToggle; + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + private _handleAfterChangeEvent; + /** + * Event for when the input field changes. This is a class level method so there's + * something for the remove listener function. + * @private + */ + private _inputChangeEvent; + /** + * Event for when the toggle is clicked. This is a class level method so there's + * something for the remove listener function. + * @private + */ + private _toggleClickEvent; +} +/** + * Called from a locale plugin. + * @param l locale object for localization options + */ +declare const loadLocale: (l: any) => void; +/** + * A sets the global localization options to the provided locale name. + * `loadLocale` MUST be called first. + * @param l + */ +declare const locale: (l: string) => void; +/** + * Called from a plugin to extend or override picker defaults. + * @param plugin + * @param option + */ +declare const extend: (plugin: any, option: any) => { + TempusDominus: typeof TempusDominus; + extend: any; + loadLocale: (l: any) => void; + locale: (l: string) => void; + Namespace: typeof Namespace; + DefaultOptions: Options; + DateTime: typeof DateTime; + Unit: typeof Unit; + version: string; +}; +declare const version = "6.1.3"; +export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Unit, version, DateTimeFormatOptions }; diff --git a/types/tempus-dominus.min.d.ts b/types/tempus-dominus.min.d.ts new file mode 100644 index 000000000..acc9e2655 --- /dev/null +++ b/types/tempus-dominus.min.d.ts @@ -0,0 +1,1255 @@ +/** + * Creates and updates the grid for `date` + */ +declare class DateDisplay { + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; + /*** + * Generates an html row that contains the days of the week. + * @private + */ + private _daysOfTheWeek; +} +/** + * Creates and updates the grid for `month` + */ +declare class MonthDisplay { + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `year` + */ +declare class YearDisplay { + private _startYear; + private _endYear; + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `seconds` + */ +declare class DecadeDisplay { + private _startDecade; + private _endDecade; + private optionsStore; + private dates; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLDivElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates the clock display + */ +declare class TimeDisplay { + private _gridColumns; + private optionsStore; + private validation; + private dates; + constructor(); + /** + * Build the container html for the clock display + * @private + */ + getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement; + /** + * Populates the various elements with in the clock display + * like the current hour and if the manipulation icons are enabled. + * @private + */ + _update(widget: HTMLElement): void; + /** + * Creates the table for the clock display depending on what options are selected. + * @private + */ + private _grid; +} +/** + * Creates and updates the grid for `hours` + */ +declare class HourDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `minutes` + */ +declare class MinuteDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +/** + * Creates and updates the grid for `seconds` + */ +declare class secondDisplay { + private optionsStore; + private validation; + constructor(); + /** + * Build the container html for the display + * @private + */ + getPicker(): HTMLElement; + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget: HTMLElement, paint: Paint): void; +} +declare module secondDisplayWrapper { + export { secondDisplay }; +} +import SecondDisplay = secondDisplayWrapper.secondDisplay; +declare enum Unit { + seconds = "seconds", + minutes = "minutes", + hours = "hours", + date = "date", + month = "month", + year = "year" +} +interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { + timeStyle?: "short" | "medium" | "long"; + dateStyle?: "short" | "medium" | "long" | "full"; + numberingSystem?: string; +} +/** + * For the most part this object behaves exactly the same way + * as the native Date object with a little extra spice. + */ +declare class DateTime extends Date { + /** + * Used with Intl.DateTimeFormat + */ + locale: string; + /** + * Chainable way to set the {@link locale} + * @param value + */ + setLocale(value: string): this; + /** + * Converts a plain JS date object to a DateTime object. + * Doing this allows access to format, etc. + * @param date + * @param locale + */ + static convert(date: Date, locale?: string): DateTime; + /** + * Attempts to create a DateTime from a string. A customDateFormat is required for non US dates. + * @param input + * @param localization + */ + static fromString(input: string, localization: any): DateTime; + /** + * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object. + */ + get clone(): DateTime; + /** + * Sets the current date to the start of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month') + * would return April 1, 2021, 12:00:00.000 AM (midnight) + * @param unit + * @param startOfTheWeek Allows for the changing the start of the week. + */ + startOf(unit: Unit | "weekDay", startOfTheWeek?: number): this; + /** + * Sets the current date to the end of the {@link unit} provided + * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month') + * would return April 30, 2021, 11:59:59.999 PM + * @param unit + * @param startOfTheWeek + */ + endOf(unit: Unit | "weekDay", startOfTheWeek?: number): this; + /** + * Change a {@link unit} value. Value can be positive or negative + * 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') + * would return May 30, 2021, 11:45:32.984 AM + * @param value A positive or negative number + * @param unit + */ + manipulate(value: number, unit: Unit): this; + /** + * Returns a string format. + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat + * for valid templates and locale objects + * @param template An object. Uses browser defaults otherwise. + * @param locale Can be a string or an array of strings. Uses browser defaults otherwise. + */ + format(template: DateTimeFormatOptions, locale?: string): string; + /** + * Return true if {@link compare} is before this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isBefore(compare: DateTime, unit?: Unit): boolean; + /** + * Return true if {@link compare} is after this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isAfter(compare: DateTime, unit?: Unit): boolean; + /** + * Return true if {@link compare} is same this date + * @param compare The Date/DateTime to compare + * @param unit If provided, uses {@link startOf} for + * comparision. + */ + isSame(compare: DateTime, unit?: Unit): boolean; + /** + * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive. + * @param left + * @param right + * @param unit. + * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion. + * If the inclusivity parameter is used, both indicators must be passed. + */ + isBetween(left: DateTime, right: DateTime, unit?: Unit, inclusivity?: "()" | "[]" | "(]" | "[)"): boolean; + /** + * Returns flattened object of the date. Does not include literals + * @param locale + * @param template + */ + parts(locale?: string, template?: any): any; + /** + * Shortcut to Date.getSeconds() + */ + get seconds(): number; + /** + * Shortcut to Date.setSeconds() + */ + set seconds(value: number); + /** + * Returns two digit hours + */ + get secondsFormatted(): string; + /** + * Shortcut to Date.getMinutes() + */ + get minutes(): number; + /** + * Shortcut to Date.setMinutes() + */ + set minutes(value: number); + /** + * Returns two digit minutes + */ + get minutesFormatted(): string; + /** + * Shortcut to Date.getHours() + */ + get hours(): number; + /** + * Shortcut to Date.setHours() + */ + set hours(value: number); + /** + * Returns two digit hours + */ + get hoursFormatted(): string; + /** + * Returns two digit hours but in twelve hour mode e.g. 13 -> 1 + */ + get twelveHoursFormatted(): string; + /** + * Get the meridiem of the date. E.g. AM or PM. + * If the {@link locale} provides a "dayPeriod" then this will be returned, + * otherwise it will return AM or PM. + * @param locale + */ + meridiem(locale?: string): string; + /** + * Shortcut to Date.getDate() + */ + get date(): number; + /** + * Shortcut to Date.setDate() + */ + set date(value: number); + /** + * Return two digit date + */ + get dateFormatted(): string; + /** + * Shortcut to Date.getDay() + */ + get weekDay(): number; + /** + * Shortcut to Date.getMonth() + */ + get month(): number; + /** + * Shortcut to Date.setMonth() + */ + set month(value: number); + /** + * Return two digit, human expected month. E.g. January = 1, December = 12 + */ + get monthFormatted(): string; + /** + * Shortcut to Date.getFullYear() + */ + get year(): number; + /** + * Shortcut to Date.setFullYear() + */ + set year(value: number); + // borrowed a bunch of stuff from Luxon + /** + * Gets the week of the year + */ + get week(): number; + weeksInWeekYear(weekYear: any): 53 | 52; + get isLeapYear(): boolean; + private computeOrdinal; + private nonLeapLadder; + private leapLadder; +} +type ViewMode = { + clock: any; + calendar: any; + months: any; + years: any; + decades: any; +}; +type ViewUpdateValues = Unit | "clock" | "calendar" | "all"; +/** + * Main class for all things display related. + */ +declare class Display { + private _widget; + private _popperInstance; + private _isVisible; + private optionsStore; + private validation; + private dates; + dateDisplay: DateDisplay; + monthDisplay: MonthDisplay; + yearDisplay: YearDisplay; + decadeDisplay: DecadeDisplay; + timeDisplay: TimeDisplay; + hourDisplay: HourDisplay; + minuteDisplay: MinuteDisplay; + secondDisplay: SecondDisplay; + private _eventEmitters; + constructor(); + /** + * Returns the widget body or undefined + * @private + */ + get widget(): HTMLElement | undefined; + /** + * Returns this visible state of the picker (shown) + */ + get isVisible(): boolean; + /** + * Updates the table for a particular unit. Used when an option as changed or + * whenever the class list might need to be refreshed. + * @param unit + * @private + */ + _update(unit: ViewUpdateValues): void; + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit: Unit | "decade", _date: DateTime, _classes: string[], _element: HTMLElement): void; + /** + * Shows the picker and creates a Popper instance if needed. + * Add document click event to hide when clicking outside the picker. + * fires Events#show + */ + show(): void; + createPopup(element: HTMLElement, widget: HTMLElement, options: any): Promise; + updatePopup(): void; + /** + * Changes the calendar view mode. E.g. month <-> year + * @param direction -/+ number to move currentViewMode + * @private + */ + _showMode(direction?: number): void; + /** + * Changes the theme. E.g. light, dark or auto + * @param theme the theme name + * @private + */ + _updateTheme(theme?: "light" | "dark" | "auto"): void; + _getThemeClass(): string; + _updateCalendarHeader(): void; + /** + * Hides the picker if needed. + * Remove document click event to hide when clicking outside the picker. + * fires Events#hide + */ + hide(): void; + /** + * Toggles the picker's open state. Fires a show/hide event depending. + */ + toggle(): void; + /** + * Removes document and data-action click listener and reset the widget + * @private + */ + _dispose(): void; + /** + * Builds the widgets html template. + * @private + */ + private _buildWidget; + /** + * Returns true if the hours, minutes, or seconds component is turned on + */ + get _hasTime(): boolean; + /** + * Returns true if the year, month, or date component is turned on + */ + get _hasDate(): boolean; + /** + * Get the toolbar html based on options like buttons.today + * @private + */ + getToolbarElements(): HTMLElement[]; + /*** + * Builds the base header template with next and previous icons + * @private + */ + getHeadTemplate(): HTMLElement; + /** + * Builds an icon tag as either an `` + * or with icons.type is `sprites` then a svg tag instead + * @param iconClass + * @private + */ + _iconTag(iconClass: string): HTMLElement | SVGElement; + /** + * A document click event to hide the widget if click is outside + * @private + * @param e MouseEvent + */ + private _documentClickEvent; + /** + * Click event for any action like selecting a date + * @param e MouseEvent + * @private + */ + private _actionsClickEvent; + /** + * Causes the widget to get rebuilt on next show. If the picker is already open + * then hide and reshow it. + * @private + */ + _rebuild(): void; +} +type Paint = (unit: Unit | "decade", innerDate: DateTime, classes: string[], element: HTMLElement) => void; +declare class Dates { + private _dates; + private optionsStore; + private validation; + private _eventEmitters; + constructor(); + /** + * Returns the array of selected dates + */ + get picked(): DateTime[]; + /** + * Returns the last picked value. + */ + get lastPicked(): DateTime; + /** + * Returns the length of picked dates -1 or 0 if none are selected. + */ + get lastPickedIndex(): number; + /** + * Formats a DateTime object to a string. Used when setting the input value. + * @param date + */ + formatInput(date: DateTime): string; + /** + * parse the value into a DateTime object. + * this can be overwritten to supply your own parsing. + */ + parseInput(value: any): DateTime; + /** + * Tries to convert the provided value to a DateTime object. + * If value is null|undefined then clear the value of the provided index (or 0). + * @param value Value to convert or null|undefined + * @param index When using multidates this is the index in the array + */ + setFromInput(value: any, index?: number): void; + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date: DateTime): void; + /** + * Returns true if the `targetDate` is part of the selected dates array. + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + isPicked(targetDate: DateTime, unit?: Unit): boolean; + /** + * Returns the index at which `targetDate` is in the array. + * This is used for updating or removing a date when multi-date is used + * If `unit` is provided then a granularity to that unit will be used. + * @param targetDate + * @param unit + */ + pickedIndex(targetDate: DateTime, unit?: Unit): number; + /** + * Clears all selected dates. + */ + clear(): void; + /** + * Find the "book end" years given a `year` and a `factor` + * @param factor e.g. 100 for decades + * @param year e.g. 2021 + */ + static getStartEndYear(factor: number, year: number): [ + number, + number, + number + ]; + /** + * Attempts to either clear or set the `target` date at `index`. + * If the `target` is null then the date will be cleared. + * If multi-date is being used then it will be removed from the array. + * If `target` is valid and multi-date is used then if `index` is + * provided the date at that index will be replaced, otherwise it is appended. + * @param target + * @param index + */ + setValue(target?: DateTime, index?: number): void; +} +declare class ErrorMessages { + private base; + //#region out to console + /** + * Throws an error indicating that a key in the options object is invalid. + * @param optionName + */ + unexpectedOption(optionName: string): void; + /** + * Throws an error indicating that one more keys in the options object is invalid. + * @param optionName + */ + unexpectedOptions(optionName: string[]): void; + /** + * Throws an error when an option is provide an unsupported value. + * For example a value of 'cheese' for toolbarPlacement which only supports + * 'top', 'bottom', 'default'. + * @param optionName + * @param badValue + * @param validOptions + */ + unexpectedOptionValue(optionName: string, badValue: string, validOptions: string[]): void; + /** + * Throws 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. + * @param optionName + * @param badType + * @param expectedType + */ + typeMismatch(optionName: string, badType: string, expectedType: string): void; + /** + * Throws an error when an option value is outside of the expected range. + * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6. + * @param optionName + * @param lower + * @param upper + */ + numbersOutOfRage(optionName: string, lower: number, upper: number): void; + /** + * Throws an error when a value for a date options couldn't be parsed. Either + * the option was an invalid string or an invalid Date object. + * @param optionName + * @param date + * @param soft If true, logs a warning instead of an error. + */ + failedToParseDate(optionName: string, date: any, soft?: boolean): void; + /** + * Throws when an element to attach to was not provided in the constructor. + */ + mustProvideElement(): void; + /** + * Throws if providing an array for the events to subscribe method doesn't have + * the same number of callbacks. E.g., subscribe([1,2], [1]) + */ + subscribeMismatch(): void; + /** + * Throws if the configuration has conflicting rules e.g. minDate is after maxDate + */ + conflictingConfiguration(message?: string): void; + /** + * customDateFormat errors + */ + customDateFormatError(message?: string): void; + /** + * Logs a warning if a date option value is provided as a string, instead of + * a date/datetime object. + */ + dateString(): void; + throwError(message: any): void; + //#endregion + //#region used with notify.error + /** + * Used with an Error Event type if the user selects a date that + * fails restriction validation. + */ + failedToSetInvalidDate: string; + /** + * 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: string; +} +/** + * Events + */ +declare class Events { + key: string; + /** + * Change event. Fired when the user selects a date. + * See also EventTypes.ChangeEvent + */ + change: string; + /** + * Emit when the view changes for example from month view to the year view. + * See also EventTypes.ViewUpdateEvent + */ + update: string; + /** + * Emits when a selected date or value from the input field fails to meet the provided validation rules. + * See also EventTypes.FailEvent + */ + error: string; + /** + * Show event + * @event Events#show + */ + show: string; + /** + * Hide event + * @event Events#hide + */ + hide: string; + // blur and focus are used in the jQuery provider but are otherwise unused. + // keyup/down will be used later for keybinding options + blur: string; + focus: string; + keyup: string; + keydown: string; +} +declare class Css { + /** + * The outer element for the widget. + */ + widget: string; + /** + * Hold the previous, next and switcher divs + */ + calendarHeader: string; + /** + * The element for the action to change the calendar view. E.g. month -> year. + */ + switch: string; + /** + * The elements for all the toolbar options + */ + toolbar: string; + /** + * Disables the hover and rounding affect. + */ + noHighlight: string; + /** + * Applied to the widget element when the side by side option is in use. + */ + sideBySide: string; + /** + * The element for the action to change the calendar view, e.g. August -> July + */ + previous: string; + /** + * The element for the action to change the calendar view, e.g. August -> September + */ + next: string; + /** + * Applied to any action that would violate any restriction options. ALso applied + * to an input field if the disabled function is called. + */ + disabled: string; + /** + * Applied to any date that is less than requested view, + * e.g. the last day of the previous month. + */ + old: string; + /** + * Applied to any date that is greater than of requested view, + * e.g. the last day of the previous month. + */ + new: string; + /** + * Applied to any date that is currently selected. + */ + active: string; + //#region date element + /** + * The outer element for the calendar view. + */ + dateContainer: string; + /** + * The outer element for the decades view. + */ + decadesContainer: string; + /** + * Applied to elements within the decades container, e.g. 2020, 2030 + */ + decade: string; + /** + * The outer element for the years view. + */ + yearsContainer: string; + /** + * Applied to elements within the years container, e.g. 2021, 2021 + */ + year: string; + /** + * The outer element for the month view. + */ + monthsContainer: string; + /** + * Applied to elements within the month container, e.g. January, February + */ + month: string; + /** + * The outer element for the calendar view. + */ + daysContainer: string; + /** + * Applied to elements within the day container, e.g. 1, 2..31 + */ + day: string; + /** + * If display.calendarWeeks is enabled, a column displaying the week of year + * is shown. This class is applied to each cell in that column. + */ + calendarWeeks: string; + /** + * Applied to the first row of the calendar view, e.g. Sunday, Monday + */ + dayOfTheWeek: string; + /** + * Applied to the current date on the calendar view. + */ + today: string; + /** + * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday + */ + weekend: string; + //#endregion + //#region time element + /** + * The outer element for all time related elements. + */ + timeContainer: string; + /** + * Applied the separator columns between time elements, e.g. hour *:* minute *:* second + */ + separator: string; + /** + * The outer element for the clock view. + */ + clockContainer: string; + /** + * The outer element for the hours selection view. + */ + hourContainer: string; + /** + * The outer element for the minutes selection view. + */ + minuteContainer: string; + /** + * The outer element for the seconds selection view. + */ + secondContainer: string; + /** + * Applied to each element in the hours selection view. + */ + hour: string; + /** + * Applied to each element in the minutes selection view. + */ + minute: string; + /** + * Applied to each element in the seconds selection view. + */ + second: string; + /** + * Applied AM/PM toggle button. + */ + toggleMeridiem: string; + //#endregion + //#region collapse + /** + * Applied the element of the current view mode, e.g. calendar or clock. + */ + show: string; + /** + * Applied to the currently showing view mode during a transition + * between calendar and clock views + */ + collapsing: string; + /** + * Applied to the currently hidden view mode. + */ + collapse: string; + //#endregion + /** + * Applied to the widget when the option display.inline is enabled. + */ + inline: string; + /** + * Applied to the widget when the option display.theme is light. + */ + lightTheme: string; + /** + * Applied to the widget when the option display.theme is dark. + */ + darkTheme: string; + /** + * Used for detecting if the system color preference is dark mode + */ + isDarkPreferredQuery: string; +} +declare class Namespace { + static NAME: string; + // noinspection JSUnusedGlobalSymbols + static dataKey: string; + static events: Events; + static css: Css; + static errorMessages: ErrorMessages; +} +interface Options { + restrictions?: { + minDate?: DateTime; + maxDate?: DateTime; + enabledDates?: DateTime[]; + disabledDates?: DateTime[]; + enabledHours?: number[]; + disabledHours?: number[]; + disabledTimeIntervals?: { + from: DateTime; + to: DateTime; + }[]; + daysOfWeekDisabled?: number[]; + }; + display?: { + toolbarPlacement?: "top" | "bottom"; + components?: { + calendar?: boolean; + date?: boolean; + month?: boolean; + year?: boolean; + decades?: boolean; + clock?: boolean; + hours?: boolean; + minutes?: boolean; + seconds?: boolean; + useTwentyfourHour?: boolean; + }; + buttons?: { + today?: boolean; + close?: boolean; + clear?: boolean; + }; + calendarWeeks?: boolean; + icons?: { + date?: string; + next?: string; + previous?: string; + today?: string; + clear?: string; + time?: string; + up?: string; + type?: "icons" | "sprites"; + down?: string; + close?: string; + }; + viewMode?: keyof ViewMode; + sideBySide?: boolean; + inline?: boolean; + keepOpen?: boolean; + theme?: "light" | "dark" | "auto"; + }; + stepping?: number; + useCurrent?: boolean; + defaultDate?: DateTime; + localization?: Localization; + keepInvalid?: boolean; + debug?: boolean; + allowInputToggle?: boolean; + viewDate?: DateTime; + multipleDates?: boolean; + multipleDatesSeparator?: string; + promptTimeOnDateChange?: boolean; + promptTimeOnDateChangeTransitionDelay?: number; + meta?: {}; + container?: HTMLElement; +} +interface FormatLocalization { + locale?: string; + dateFormats?: { + LTS?: string; + LT?: string; + L?: string; + LL?: string; + LLL?: string; + LLLL?: string; + }; + ordinal?: (n: number) => any; + format?: string; +} +interface Localization extends FormatLocalization { + nextMonth?: string; + pickHour?: string; + incrementSecond?: string; + nextDecade?: string; + selectDecade?: string; + dayViewHeaderFormat?: DateTimeFormatOptions; + decrementHour?: string; + selectDate?: string; + incrementHour?: string; + previousCentury?: string; + decrementSecond?: string; + today?: string; + previousMonth?: string; + selectYear?: string; + pickSecond?: string; + nextCentury?: string; + close?: string; + incrementMinute?: string; + selectTime?: string; + clear?: string; + toggleMeridiem?: string; + selectMonth?: string; + decrementMinute?: string; + pickMinute?: string; + nextYear?: string; + previousYear?: string; + previousDecade?: string; + startOfTheWeek?: number; +} +declare const DefaultOptions: Options; +/** + * A robust and powerful date/time picker component. + */ +declare class TempusDominus { + _subscribers: { + [key: string]: ((event: any) => {})[]; + }; + private _isDisabled; + private _toggle; + private _currentPromptTimeTimeout; + private actions; + private optionsStore; + private _eventEmitters; + display: Display; + dates: Dates; + constructor(element: HTMLElement, options?: Options); + get viewDate(): DateTime; + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. + * @param options + * @param reset + * @public + */ + updateOptions(options: any, reset?: boolean): void; + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Toggles the picker open or closed. If the picker is disabled, nothing will happen. + * @public + */ + toggle(): void; + /** + * Shows the picker unless the picker is disabled. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Shows the picker unless the picker is disabled. + * @public + */ + show(): void; + /** + * Hides the picker unless the picker is disabled. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker unless the picker is disabled. + * @public + */ + hide(): void; + /** + * Disables the picker and the target input field. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Disables the picker and the target input field. + * @public + */ + disable(): void; + /** + * Enables the picker and the target input field. + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Enables the picker and the target input field. + * @public + */ + enable(): void; + /** + * Clears all the selected dates + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Clears all the selected dates + * @public + */ + clear(): void; + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + // noinspection JSUnusedGlobalSymbols + /** + * Allows for a direct subscription to picker events, without having to use addEventListener on the element. + * @param eventTypes See Namespace.Events + * @param callbacks Function to call when event is triggered + * @public + */ + subscribe(eventTypes: string | string[], callbacks: (event: any) => void | ((event: any) => void)[]): { + unsubscribe: () => void; + } | { + unsubscribe: () => void; + }[]; + /** + * Hides the picker and removes event listeners + */ + // noinspection JSUnusedGlobalSymbols + /** + * Hides the picker and removes event listeners + */ + dispose(): void; + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language: string): void; + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + /** + * Triggers an event like ChangeEvent when the picker has updated the value + * of a selected date. + * @param event Accepts a BaseEvent object. + * @private + */ + private _triggerEvent; + private _publish; + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + /** + * Fires a ViewUpdate event when, for example, the month view is changed. + * @private + */ + private _viewUpdate; + private _unsubscribe; + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + /** + * Merges two Option objects together and validates options type + * @param config new Options + * @param mergeTo Options to merge into + * @param includeDataset When true, the elements data-td attributes will be included in the + * @private + */ + private _initializeOptions; + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + /** + * Checks if an input field is being used, attempts to locate one and sets an + * event listener if found. + * @private + */ + private _initializeInput; + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + /** + * Attempts to locate a toggle for the picker and sets an event listener + * @private + */ + private _initializeToggle; + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + /** + * If the option is enabled this will render the clock view after a date pick. + * @param e change event + * @private + */ + private _handleAfterChangeEvent; + /** + * Event for when the input field changes. This is a class level method so there's + * something for the remove listener function. + * @private + */ + private _inputChangeEvent; + /** + * Event for when the toggle is clicked. This is a class level method so there's + * something for the remove listener function. + * @private + */ + private _toggleClickEvent; +} +/** + * Called from a locale plugin. + * @param l locale object for localization options + */ +declare const loadLocale: (l: any) => void; +/** + * A sets the global localization options to the provided locale name. + * `loadLocale` MUST be called first. + * @param l + */ +declare const locale: (l: string) => void; +/** + * Called from a plugin to extend or override picker defaults. + * @param plugin + * @param option + */ +declare const extend: (plugin: any, option: any) => { + TempusDominus: typeof TempusDominus; + extend: any; + loadLocale: (l: any) => void; + locale: (l: string) => void; + Namespace: typeof Namespace; + DefaultOptions: Options; + DateTime: typeof DateTime; + Unit: typeof Unit; + version: string; +}; +declare const version = "6.1.3"; +export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Unit, version, DateTimeFormatOptions };